atg.svc.workflow.process.action
Class SolutionNextStepAction

java.lang.Object
  extended by atg.process.action.ActionImpl
      extended by atg.epub.workflow.process.action.PublishingAction
          extended by atg.svc.workflow.process.action.ServiceWorkflowAction
              extended by atg.svc.workflow.process.action.SolutionNextStepAction
All Implemented Interfaces:
atg.process.action.Action, atg.process.action.ActionConstants

public class SolutionNextStepAction
extends ServiceWorkflowAction

This action combines all of the actions that need to be performed when advancing the solution in a solution publishing workflow. This action can be used to advance to a non-final state, advance to a final state (complete the workflow) or to go back to a previous state. This includes the following:

  1. Change project's current project's Editable to false
  2. Change Solution Status to for all soltuions in project
  3. Check in project's workspace
  4. Mark Solution Status as undeployed for all solutions in project
  5. Approve project for all targets
  6. Complete project and create project without a workflow and process' project name
  7. Clone project
  8. Change Solution Status to for all solutions in project
solutionStatus is a required parameter and specifies the new solution status. externallyVisible is an optional parameter and determines if a solution should be visible externally in Self Service. shouldCheckin is an optional parameter that determines if this step performs a checkin. finalStep is a flag that determines if this is the final step (publish external/internal) in the workflow. This action can be configured to perform a checkin or not do a checkin. If this is not the final step and a checkin is performed, the project is clone after checkin.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String CONTEXTITEMS_PROPERTY_STRING
          property name: processInstance.contextItemReferences
static java.lang.String PARAM_ASSETNAME_STRING
          parameter: assetName
static java.lang.String PARAM_EXTERNALLYVISIBLE_STRING
          parameter: externallyVisible
static java.lang.String PARAM_FINALSTEP_STRING
          parameter: finalStep
static java.lang.String PARAM_SHOULDCHECKIN_STRING
          parameter: shouldCheckin
static java.lang.String PARAM_SOLUTIONSTATUS_STRING
          parameter: solutionStatus
static java.lang.String PROCESSNAME_PROPERTY_STRING
          property name: project/process.processName
 
Fields inherited from class atg.epub.workflow.process.action.PublishingAction
sTargetParameterName
 
Fields inherited from interface atg.process.action.ActionConstants
ERROR_RESPONSE_CONTINUE, ERROR_RESPONSE_DEFAULT, ERROR_RESPONSE_DELETE, ERROR_RESPONSE_INSTANCE_DELETED, ERROR_RESPONSE_RETRY, EXECUTION_POLICY_COLLECTIVE, EXECUTION_POLICY_INDIVIDUAL
 
Constructor Summary
SolutionNextStepAction()
           
 
Method Summary
protected  void changeSolutionStatus(atg.process.ProcessExecutionContext pContext)
          Calls #markSolutionExternalVisibility(String, int, boolean) for each solution in the current process context
protected  void completeAndCreateProjectForProcess(atg.process.ProcessExecutionContext pContext)
           
 void configure(java.lang.Object pConfiguration)
          Configures the action using the given configuration object.
protected  void executeAction(atg.process.ProcessExecutionContext pContext)
          Executes this action in the given single process execution context.
 java.lang.String getActionName()
          Returns the name of the action.
protected  atg.nucleus.logging.ApplicationLogging getLogger()
           
 atg.repository.RepositoryItem getNamedAsset(atg.process.ProcessExecutionContext pContext)
           
 atg.svc.publishing.service.PublishingService getPublishingService()
           
 SolutionNextStepActionConfiguration getSolutionActionConfiguration()
          Gets the configuration for this action
 java.lang.String getSolutionRepositoryItemType()
           
 java.lang.String getSolutionRepositoryName()
           
 SolutionStatus getSolutionStatus(atg.process.ProcessExecutionContext pContext)
           
 int getVersionForRepItem(atg.repository.RepositoryItem pRepItem)
          get the versioned URI for the repository item
 void initialize(java.util.Map pParameters)
          Initializes the action with the given parameters.
protected  boolean isExternallyVisible(atg.process.ProcessExecutionContext pContext)
           
protected  boolean isFinalStep(atg.process.ProcessExecutionContext pContext)
           
protected  void markSolutionExternalVisibility(atg.process.ProcessExecutionContext pContext)
          Calls #markSolutionExternalVisibility(String, int, boolean) for each solution in the current process context
 void setServiceActionConfiguration(SolutionNextStepActionConfiguration pConfiguration)
          Sets the configuration for this action
 void setSolutionRepositoryItemType(java.lang.String pSolutionRepositoryItemType)
           
 void setSolutionRepositoryName(java.lang.String pSolutionRepositoryName)
           
protected  boolean shouldCheckin(atg.process.ProcessExecutionContext pContext)
           
 
Methods inherited from class atg.svc.workflow.process.action.ServiceWorkflowAction
approveProject, approveProject, approveProjectForAllTargets, checkInProject, deployProject, deployProject, deployProjectToAllTargets, getNonNullProcessData, getServiceActionConfiguration, setServiceActionConfiguration
 
Methods inherited from class atg.epub.workflow.process.action.PublishingAction
getActionConfiguration, getProcess, getProcessHome, getProject, getProjectHome, getResource, getResource, getTarget, getUser, setActionConfiguration
 
Methods inherited from class atg.process.action.ActionImpl
execute, execute, getParameterExpression, getParameterValue, storeOptionalParameter, storeRequiredMutableParameter, storeRequiredParameter, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


PARAM_SOLUTIONSTATUS_STRING

public static final java.lang.String PARAM_SOLUTIONSTATUS_STRING
parameter: solutionStatus

See Also:
Constant Field Values

PARAM_ASSETNAME_STRING

public static final java.lang.String PARAM_ASSETNAME_STRING
parameter: assetName

See Also:
Constant Field Values

PARAM_EXTERNALLYVISIBLE_STRING

public static final java.lang.String PARAM_EXTERNALLYVISIBLE_STRING
parameter: externallyVisible

See Also:
Constant Field Values

PARAM_SHOULDCHECKIN_STRING

public static final java.lang.String PARAM_SHOULDCHECKIN_STRING
parameter: shouldCheckin

See Also:
Constant Field Values

PARAM_FINALSTEP_STRING

public static final java.lang.String PARAM_FINALSTEP_STRING
parameter: finalStep

See Also:
Constant Field Values

PROCESSNAME_PROPERTY_STRING

public static final java.lang.String PROCESSNAME_PROPERTY_STRING
property name: project/process.processName

See Also:
Constant Field Values

CONTEXTITEMS_PROPERTY_STRING

public static final java.lang.String CONTEXTITEMS_PROPERTY_STRING
property name: processInstance.contextItemReferences

See Also:
Constant Field Values
Constructor Detail

SolutionNextStepAction

public SolutionNextStepAction()
Method Detail

getSolutionRepositoryName

public java.lang.String getSolutionRepositoryName()

setSolutionRepositoryName

public void setSolutionRepositoryName(java.lang.String pSolutionRepositoryName)

getSolutionRepositoryItemType

public java.lang.String getSolutionRepositoryItemType()

setSolutionRepositoryItemType

public void setSolutionRepositoryItemType(java.lang.String pSolutionRepositoryItemType)

getPublishingService

public atg.svc.publishing.service.PublishingService getPublishingService()
                                                                  throws javax.naming.NamingException
Throws:
javax.naming.NamingException

getLogger

protected atg.nucleus.logging.ApplicationLogging getLogger()

getSolutionActionConfiguration

public SolutionNextStepActionConfiguration getSolutionActionConfiguration()
Gets the configuration for this action

Returns:
the configuration for this action

setServiceActionConfiguration

public void setServiceActionConfiguration(SolutionNextStepActionConfiguration pConfiguration)
Sets the configuration for this action

Parameters:
pConfiguration - the configuration for this action

getNamedAsset

public atg.repository.RepositoryItem getNamedAsset(atg.process.ProcessExecutionContext pContext)
                                            throws atg.process.ProcessException
Returns:
Returns a named asset associated with this process if any asset is specifically named or null if no asset is specifically named.
Throws:
atg.process.ProcessException

isExternallyVisible

protected boolean isExternallyVisible(atg.process.ProcessExecutionContext pContext)
                               throws atg.process.ProcessException
Throws:
atg.process.ProcessException

shouldCheckin

protected boolean shouldCheckin(atg.process.ProcessExecutionContext pContext)
                         throws atg.process.ProcessException
Throws:
atg.process.ProcessException

isFinalStep

protected boolean isFinalStep(atg.process.ProcessExecutionContext pContext)
                       throws atg.process.ProcessException
Throws:
atg.process.ProcessException

configure

public void configure(java.lang.Object pConfiguration)
               throws atg.process.ProcessException,
                      java.lang.UnsupportedOperationException
Configures the action using the given configuration object. The configuration object is typically a global Nucleus component which is configured with the information necessary for the action's operation.

This operation is optional. If the action does not need to be configured, it can simply throw an UnsupportedOperationException.

Specified by:
configure in interface atg.process.action.Action
Overrides:
configure in class ServiceWorkflowAction
Throws:
atg.process.ProcessException - if the action could not be configured - for example, because some of the required properties are missing from the configuration
java.lang.UnsupportedOperationException - if this action is not configurable

initialize

public void initialize(java.util.Map pParameters)
                throws atg.process.ProcessException
Initializes the action with the given parameters. The keys in the parameter Map are the String parameter names; the values are the Expression objects representing parameter values.

Specified by:
initialize in interface atg.process.action.Action
Overrides:
initialize in class atg.process.action.ActionImpl
Throws:
atg.process.ProcessException - if the action could not be properly initialized - for example, if not all of the required parameters are present in the Map

executeAction

protected void executeAction(atg.process.ProcessExecutionContext pContext)
                      throws atg.process.ProcessException
Executes this action in the given single process execution context. Called by both of the execute methods.

Specified by:
executeAction in class atg.process.action.ActionImpl
Throws:
atg.process.ProcessException - if the action can not be executed

getActionName

public java.lang.String getActionName()
Returns the name of the action.

Overrides:
getActionName in class atg.process.action.ActionImpl

getVersionForRepItem

public int getVersionForRepItem(atg.repository.RepositoryItem pRepItem)
                         throws atg.repository.RepositoryException
get the versioned URI for the repository item

Overrides:
getVersionForRepItem in class ServiceWorkflowAction
Parameters:
the - repository item who's URI we want to get
Returns:
the URI that gives the current version of the item
Throws:
atg.repository.RepositoryException

markSolutionExternalVisibility

protected void markSolutionExternalVisibility(atg.process.ProcessExecutionContext pContext)
                                       throws atg.process.ProcessException
Calls #markSolutionExternalVisibility(String, int, boolean) for each solution in the current process context

Throws:
atg.process.ProcessException

changeSolutionStatus

protected void changeSolutionStatus(atg.process.ProcessExecutionContext pContext)
                             throws atg.process.ProcessException
Calls #markSolutionExternalVisibility(String, int, boolean) for each solution in the current process context

Throws:
atg.process.ProcessException

getSolutionStatus

public SolutionStatus getSolutionStatus(atg.process.ProcessExecutionContext pContext)
                                 throws atg.process.ProcessException
Returns:
Returns the solutionStatus.
Throws:
atg.process.ProcessException

completeAndCreateProjectForProcess

protected void completeAndCreateProjectForProcess(atg.process.ProcessExecutionContext pContext)
                                           throws atg.process.ProcessException
Throws:
atg.process.ProcessException