Administering Workflows

You are reading the AEM 5.6 version of Administering Workflows.
This documentation is also available for the following versions: CQ 5.5 

Required User Permissions for Workflows

Actions on workflows can only be undertaken if either:

  • you are working with the admin account
  • the account has been assigned to the default group workflow-users, which holds all the privileges necessary for your users to perform workflow actions.

Configuring Access to Workflows

Workflow models inherit a default access control list (ACL) for controlling how users can interact with workflows. To customize user access for a workflow, modify the Access Control List (ACL) for the workflow model node in the repository.

For information about using CRXDE Lite to configure ACLs, see Access Control

The following example restricts content authors from starting a workflow called mymodel. To restrict access, the Authors group is denied read access to the /etc/workflows/models/mymodel node.

The following diagram shows the default ACL for mymodel (the default ACL for all new models). The Authors group is a member of the contributor group, so Authors are allowed the jcr:read privilege for the node.

file

Because authors have read-access to the model, the workflow is available in Sidekick when authoring pages:

file

The following procedure adds an access list entry (ACE) that denies the jcr:read privilege for the content-author group.

  1. Open CRXDE Lite in your web browser (http://localhost:4502/crx/de).

  2. In the node tree, select the node for the workflow model (/etc/workflow/models/mymodel).

  3. Click the Access Control tab.

  4. In the Applicable Access Control Policy table, click the plus icon.

    file
  5. Click the plus icon to add a new ACE with the following properties:

    • Principal: content-authors
    • Type: Deny
    • Privileges: jcr:read

    file

    The Effective Access Control Policies table now includes the restriction for content-authors.

    file
  6. Click Save All.

    The mymodel workflow is no longer available to members of the content-author group.

    file

Administering Workflow Instances

Monitoring the Status of Workflow Instances

A workflow can have one of the following status:

  • RUNNING: The workflow instance is running.
  • COMPLETED: The workflow instance has been successfully ended.
  • SUSPENDED: The workflow instance has been suspended.
  • ABORTED: The workflow instance has been terminated.
  • STALE: Progression of the workflow instance requires that a background job executes, however the job cannot be found in the system. This situation can occur when an error occurs when executing the workflow.

To monitor the status of workflow instances, you can use the Instances or Archive tabs.

  • Instances tab: Shows all running instances.
  • Archive tab: Shows terminated workflow instances.Monitoring Workflows in progress

Note: When the execution of a Process Step results in errors, the step appears in the administrator's Inbox and the workflow status is RUNNING. 

From the Instances tab you can see the status of a Workflow in progress. A list of the active Models is shown; in this case RUNNING:

file

With the Instances tab you can take various actions (see Suspending, Resuming, and Terminating a Workflow instance) and also Open History to show the actions executed to date on the workflow instance:

file

Suspending, Resuming, and Terminating a Workflow Instance

Perform actions on running workflow instances when you need to intervene in the normal progression of a workflow instance:

  • Suspend: Temporarily stops the execution of the workflow. Suspending is useful in exceptional cases when you do not want the workflow to proceed, for example for maintenance. Suspending changes the workflow state to Suspended.
  • Resume: Restarts a suspended workflow at the same point of execution where it was suspended, using the same configuration. 
  • Terminate: Ends the workflow execution and changes the state to ABORTED. An aborted workflow instance cannot be restarted.
  1. Select the Instances tab. You will see a list of active (neither finished, nor terminated) workflow instances.

    file
  2. Select an entry.

  3. In the navigation bar, click Suspend, Resume, or Terminate.

The Instances tab is not only useful for taking action on running workflows, you can also use it to monitor workflow instances, without necessarily modifying them.

Fixing Workflow Instances Failures

Workflow instances appear on the Failures tab of the Workflows console when the execution of a Process Step component results in errors. The Failures tab enables you to investigate the cause of the errors, and provides options for resuming execution when the causes are fixed:

  • Failure Details: Provides information about the execution error, including the name of the step that failed, the error message, and the stack trace for the error.

    file
  • Retry Step: Executes the Script Step component instance again. Use the Retry Step command after you have fixed the cause of the original errror. For example, retry the step after you fix a bug in the script that the Process Step executes.

  • Terminate Workflow: Terminate the workflow if the error has caused an irreconsilable situation for the workflow. For example, the workflow can rely on environmental conditions such as information in the respository that are no longer valid for the workflow intance.

  • Terminate and Start New Workflow: Similar to Terminate except that a new workflow instance is started using the original payload, title, and description.

  1. Select the Failurs tab and select a workflow intance.

  2. Click Failure Details, Retry Step, Terminate Workflow, or Terminate and Start New Workflow.

Archived Workflows

After a Workflow instance has finished, for example after being terminated or after successful completion, it can (only) be seen in the Archive tab:

file

As the workflow has already completed, no further action can be taken on these instances. However, if you need further details of a completed workflow you can use Open History.


Your comments are welcome!
Did you notice a way we could improve the documentation on this page? Is something unclear or insufficiently explained? Please leave your comments below and we will make the appropriate changes. Comments that have been addressed, by improving the documentation accordingly, will then be removed.

ADD A COMMENT

 

In order to post a comment, you need to sign-in.

Note: Customers with DayCare user accounts need to create a new account for use on day.com.

***