KB Version:

Learning Levels

Most Read

Announcements RSS Feed of Announcements

Technical

Example Workflow Builder Walkthrough


In this example, we are going to build a workflow that is initiated when a user creates, copies, or edits an asset. An Administrator will then have the option to edit, approve and publish, send back to the initial user for editing, or delete.

This example assumes that users contributing content that will be initiating the Workflow will be in the "example.com users" group and Administrators responsible for approving content will be in the "example.com admins" group.  If these groups are not available to you, simply substitute your Group of Approvers where ever "example.com admins" are and your Group of contributors with the "example.com users."

Initializing the Workflow

  1. In the Administration area, select Workflow Definitions and then Workflow Builder.
  2. For the Workflow Name field, type “Example Workflow”.
  3. The first step listed is the Initialization step.  Steps can be added by clicking the plus sign or removed by clicking the minus sign.  The order of steps may also by altered by clicking on the up and down arrows.
  4. The Step Identifier name must be entered in lower case with no spaces.  For this first Initialization step, we will keep the default value, “initialize”.
  5. The Step Label is what the user will see to identify the step in the workflow.  We will keep the default value, “Initialization” for this field as well.
  6. Select “system” for the Step Type.  This means that the step is automatically performed in the CMS without user interaction.
  7. An action is required to move to the next step.  Actions may be added by clicking “Add Action” at the bottom right of each step.  For this Initialization action, we will keep the default fields for action identifier and action label, “initialize” and “Initialization”, respectively.
  8. The transition chooser allows you to choose which step will be active upon completion of the current step.  We will select the default value, “Next Ordered Step”.
  9. Because the next step will request the attention of an Administrator, we want to ensure that this user is aware that the asset is awaiting approval.  To do this, we will add a trigger to email that user. In the bottom right corner of the initialization action, select “email” from the Add Trigger chooser and then click the plus sign.
  10. The new trigger will appear below the action.  Click “Add Parameter”.  Parameters can be added or deleted by clicking the plus or minus signs next to each parameter.
  11. Type “mode” into the name field and “notify” into the value field to tell the system to notify the next user in the workflow.

Approval step

  1. The next step in this workflow will be the Approval step.  Type “approval” for Step Identifier and “Approval” for Step Label.
  2. Select “transition” for Step Type, which means that this step requires user interaction for its completion.
  3. This step may be assigned to a user or a group.  We will set the Default Assignment to the group “example.com admins”.

Reject to Initial User action

  1. We will add an action to this step to reject the asset to the initial user.  For the action below this step, type “reject-to-initial-user” for Action Identifier and “Reject to Initial User” for Action Label.
  2. Select “assignToWorkflowOwner” for Add Trigger and click the plus sign.
  3. Because of the various possible results of the Administrator's action, we will need to create Unordered Steps

Creating the Edit by Initial User (unordered) step

  1. Scroll to the bottom of the page and click “Add Unordered Step”.
  2. Type “edit-by-initial-user” for Step Identifier and “Edit by Initial User” for Step Label.
  3. Select “edit” for Step Type, to indicate that only an edit may be performed.
  4. Select Group for Default assignment and click on the group selector icon and select the "example.com users" group.
  5. Check the box for “Allow Reassignment” and select the radio button next to Group.  Click the group icon and select “example.com users”.  This step may now be reassigned to anyone in the "example.com users" group.
  6. Click Add Action on this step.
  7. After the asset has been edited by the initial user, we want to send it back to the Administrators for Approval again.  Type “edit-and-send-back-for-approval” for Action Identifier and “Edit and Send Back For Approval” for Action Label.
  8. Select “Approval” from the Transition chooser to return to that step upon the completion of the edit.
  9. Add another email trigger for the Administrator just like the previous one, with “mode” for name and “notify” for value.
  10. Scroll back up to the Reject to Initial User Action under the Administrator Approval Step.  Choose the newly created unordered step, “Edit by Initial User” from the chooser for Transition.

Creating the Edit by Administrator (unordered) step and action

  1. We want to add a second Unordered Step to allow the Administrator to have the option to edit the asset directly.  Scroll back down to the Unordered Step that was just created and click the plus sign in the upper left corner to add another step.
  2. Type “admin-edit” for Step Identifier and “Administrator Edit” for Step Label.
  3. Choose “edit” for Step Type and Group for Default Assignment.  Click the group icon and select “example.com admins”.
  4. Click Add Action.  We will again transition to the Administrator Approval Step.
  5. Type “edit-and-send-to-approval” for Action Identifier and “Edit and Send To Approval” for Action Label.
  6. For Transition, select Administrator Approval.  Because the Administrator just edited the asset, he or she knows it needs to be approved, so we do not need to set up an email trigger.
  7. Scroll back up to the Administrator Approval step and add another action to transition to the Unordered Step that was just created.
  8. For Action Identifier, type “go-to-admin-edit”.  For Action Label, type “Go to Administrator Edit”.  Choose the step Administrator Edit from the transition chooser.
  9. Select “preserveCurrentUser” for Add Trigger and click the plus sign. This will keep the next action for the Workflow assigned to the current user.

Creating the Approve action

  1. We will now add another action to the Administrator Approval step for content approval.  Click Add Action and type in “approve” for Action Identifier and “Approve” for Action Label.
  2. Choose “Next Ordered Step” for Transition.

Creating the Delete action

  1. One final action is needed for this step to allow the Administrator to reject all changes to the asset.  Click Add Action once again and type “delete” for Action Identifier, “Delete” for Action Label, and choose “Finished” for Transition.

Finalizing step - allowing assets to be Versioned, Merged, and Published

  1. Once the asset has been approved, it must go through a Finalizing step, which will merge it into the system, before it can be published.  Scroll down to see that the Finalizing step is automatically set up next with default values in the Workflow Builder, including a Finish Workflow action with Merge and Email triggers. The completion of the Finalizing system step will trigger the Publishing step, which is also already set up with default values and a Completed action with Publish and Email triggers.  We can leave all of the values for the Finalizing and Publishing steps as they are pre-set in the system.
  2. The final default step in the Workflow Builder is the Finished step.  Every workflow must have a Finished step to indicate that all steps, actions, and triggers in the workflow are finalized. The asset associated with the workflow is then no longer to be considered in workflow any longer and is returned to a normal state.
  3. Now that the workflow is complete, scroll to the bottom of the page and click Submit.
  4. You will be forwarded to the main Edit Workflow tab where you may enter the name, location, and applicable groups.

Final steps for Creating your Workflow

  1. For Workflow Type, check the boxes for Create, Edit, and Copy.
  2. For Instance Name, select the radio button for Auto-name.
  3. Select all groups under Applicable Groups and click the arrow to move them into the selected box.
  4. On this screen, advanced users may also directly edit the XML for the workflow or upload an XML file.  Click Submit to save your new workflow.

Additional option within Workflow

If there is concern that the Administrators will take too long to Approve or Reject an item, we can add an additional unordered step that will allow the "admin" to be notified of items waiting to be approved or rejected and allow this user to simply approve or reject the change.

  1. An unordered step will need to be added to the bottom of the Workflow within the Unordered Steps section. Scroll back down to the Unordered Step that were created and click the plus sign in the upper left corner to add another step.
  2. Type “admin-approval” for Step Identifier and “Administrator Approval” for Step Label.
  3. Choose “transition” for Step Type and User for Default Assignment.  Click the User radio option and select “admin”.
  4. Click Add Action.  Type “approve” for Action Identifier and “Approve” for Action Label.
  5. For Transition, select Finalizing so the asset will be Merged and Published.
  6. Click Add Action.  Type “delete” for Action Identifier and “Delete” for Action Label.
  7. For Transition, select Finished so the asset will be left unchanged and Workflow will be complete.
  8. Scroll back up to the Administrator Approval step and select "Override - Admin Approval" in the “Escalate To” dropdown and choose “72” and “hours” for the “Escalation Period” data.  This means that the Workflow will automatically tranisition to the "Override - Admin Approval" step if no one from the "example.com admins" group responds to this step after 72 hours.