You are reading the AEM 5.6
version of Using Workflows
This documentation is also available for the following versions:
There are several ways to start a workflow: from a form submission, from the Workflow Console, from the Websites Console, from the Workflow tab in the Sidekick.
In every case a workflow need to be linked to its payload. The payload (including pages, nodes, resources) will then be subject to this instance of the workflow.
At that point, the current version of the workflow model is assigned; if the main copy of the workflow is updated later then the changes will have no impact on the already assigned instance.
See also How to apply workflows to DAM assets.
Starting a workflow from the Workflow console
Open the Workflow console.
From the Models tab select the required workflow.
Click Start from the top navigation.
The Start Workflow dialog opens allowing you to enter the payload and an optional title and comment.
Specify the payload (includes pages, nodes, resources, and so on) to which the workflow is to be applied. You can use the drop down menu to browse the repository when selecting:
Click OK to start a workflow instance with the properties you configured. Now the workflow is running.
Starting a workflow from Sidekick
Open the Websites console.
Select the Workflow tab from the Sidekick.
Expand the Workflow dialog, allowing you to select the Workflow and optionally enter Workflow Title and Comment.
Click Start Workflow to start a new workflow instance with the properties you configured and the current page as the payload. Now the workflow is running.
Once a page has been linked to a workflow it will be indicated in the Status column in the Websites console:
Starting Workflows When Nodes Change
The Workflow Launcher, provides one component to monitor all changes in the content repository and launch workflows dependent on the location and resource type of the changed node.
Using the Launcher tab you can:
see the workflows already launched for specific nodes.
select a workflow to be launched when a certain node/node-type has been modified.
remove an existing workflow-to-node relationship.
A launcher can be created for any node. However, changes to certain nodes do not launch workflows. Changes to nodes below the following paths do not cause workflows to launch:
- Any workflow-inbox node located anywhere in the /home/users branch
- /var/statistics (Exception: Changes to nodes below /var/statistics/tracking do cause workflows to launch.)
Various definitions are included with the standard installation. These are used for digital asset management and social collaboration tasks:
Adding a Launcher relationship
On the Workflow page, click the Launcher tab.
Click Add and configure the new workflow-to-node relationship as required:
- Event Type: The event type that will launch the workflow:
- Notetype: The type of node that the workflow launcher applies to.
- Path: The path that the workflow launcher applies to.
- Conditions: Conditions for node values that, when evaluated, determine whether the worklow is launched. For example, the following condition causes the workflow to launch when the node has a property name with the value User:
- Workflow: The workflow to launch when the Event Type occurs on the Nodetype and/or Path under the defined Condition.
- Activate: Controls whether the workflow launcher is activated:
- Select Enable to launch workflows when the configuration properties are satisfied.
- Select Disable when the workflow should not execute when the configuration properties are satisfied.
- Run Mode(s): The type of server that the workflow launcher applies to. Select Author, Publish, or Author&Publish.
Removing a Launcher relationship
Open the Workflow tab.
Select the Launcher tab.
Click on the entry you want to remove.
Using Workflows for Batch Processing
Workflow packages are packages that can be passed to a workflow for processing.
A workflow package:
- contains links to a set of user-specified resources (such as pages, assets).
- holds package information such as the creation date, the user that created the package and a short description.
- is defined using a specialized page template; such pages allow the user to specify the resources in the package.
- can be used multiple times.
- can be changed by the user (add or remove resources) while the workflow instance is actually running.
Creating a Workflow Package
Navigate to Workflow, then Workflow Packages in the left pane.
Create a New Page...; assign a name of your choice and select the Workflow Package Template.
For each resource add an instance of the Resource Definition component. Then either drag resources from the content finder, or edit the component to select a resource.
Using the Workflow Package in a Workflow
After creating the workflow package page you can apply a workflow. This marks all resources as being subject to the workflow (assets and pages). The workflow will only take action on the resources listed, not on the definition page itself.
- Open the workflow package page.
- Select the Workflow tab from the sidekick.
- Select the required workflow.
- Click Start Workflow.
From the Workflow console you can see the workflow running, with the workflow package page as Payload.
For example, if you:
- add new paragraphs to the Geometrixx Support and Product pages
- create a workflow package holding the Geometrixx Support and Product pages as resources
- apply the Publish Example workflow to this workflow package page
- Complete the Validate Content step
Both the Support and Product pages will be published by the same workflow instance.
Updating a Package While the Workflow is running
Addtional resources can be added to a workflow package page even while a workflow is running:
- Create a workflow package page.
- Add resources to the page.
- Start a workflow for the package.
Using the Websites console, confirm that the Status of the resources indicate they are in a workflow.
- Edit the workflow package page to add new resources.
Using the Websites console, confirm that the Status of the new resources indicate that they are also in the workflow.
Participating in Workflows
Any participant steps that you have created will be assigned to the specific user or group, who will need to take action:
When the task is completed they then acknowledge this fact by completing the workflow step (see Completing a Participant step).
If the specific user(s) are unable to take action they can delegate responsibility to another user or group (see Delegating a Participant step).
If necessary they can step back to repeat a section of the workflow (see Performing Step Back on a Participant step).
Selecting a Participant Step to take action
Before you can take any action on a Participant step, you need to select it:
Open the Inbox console to see when an action is assigned to you. This occurs when a workflow reaches a Participant step with your account, or group, specified:
Completing a Participant step
After you have taken the action indicated you can complete the workflow step, thus allowing the workflow to continue.
Select the workflow step and click the Complete button in the top navigation bar.
In the resulting dialog, select the Next Step; that is, the step to execute next. A drop down list shows all appropriate destinations. A Comment can also be entered.
The number of steps listed depends on the design of the workflow model.
Click OK to confirm the action.
Delegating a Participant Step
If a step has been assigned to you, but for any reason you are unable to take action, you can delegate the step to another user or group.
The users who are availalbe for delegation depend on who was assigned the work item:
- If the work item was assigned to a group, the group members are available.
- If the work item was assigned to a group and then delegated to a user, the group members and the group are available.
- If the work item was assigned to a single user, the work item cannot be delegated.
Click the Delegate button in the top navigation bar.
In the dialog, use the drop-down list to select the User to delegate the work item to. You can also add a Comment.
Click OK to confirm the action.
Performing Step Back on a Participant step
If you discover that a step, or series of steps, needs to be repeated you can step back. This allows you to select a step that occurred earlier in the workflow for reprocessing. The workflow returns to the step you specify, then proceed from there.
Click the Step Back button in the top navigation bar.
In the resulting dialog, select the Previous Step; that is, the step to execute next - even though it is a step that occurs earlier in the workflow. A drop down list shows all appropriate destinations.
Click OK to confirm the action.