Setting Up Conditions to Perform Automatic Rollback to a Workflow Step
Workflow Manager
A Workflow Manager template can employ automatic rollback—which means that the workflow can be automatically rolled back to a specific workflow step based upon administrator input.
Creating a Workflow Manager template with automatic rollback to a workflow step involves the following steps:
Step |
Description |
Step 1: Create template |
Create a workflow template with multiple workflow phases and steps, as described in Creating a New Template. |
Step 2: Create automatic rollback data element |
Create a question (data element) with a single selection answer. The user’s response to this question will determine whether to rollback the workflow. During setup on the Data Element Properties view, you need to specify which responses require rollback to a workflow step by selecting the workflow step that the workflow will be rolled back to. For more information, see Creating a Data Element to Use for Automatic Rollback. |
Step 3: Create workflow step that asks “automatic rollback” question |
Create a workflow step that collects the response to the “automatic rollback” question, as described in Creating a Workflow Step That Asks “Automatic Rollback” Question. |
Creating a Data Element to Use for Automatic Rollback
To create a data element to use for automatic rollback to a workflow step, perform the following steps:
To create a data element to use for automatic rollback:
1. | Begin creating a template as described in Creating a New Template. |
2. | In addition to creating a data group with the When collected? option to At initial submission (which is required), create another data group, and set the When collected? option to Later in the workflow, as described in Creating Data Groups. |
3. | For this second data group, creating a new data element for this data group that asks a single-selection question, as described in Defining Data Elements, making the following choices: |
a. | On the Data Element Details view for your new data element, set the Data type to either Single Selection or Radio Button. Enter list values or labels for each radio button in the Selection list items box, one value or label per line. |
b. | If desired, enter a value in the Default value field. This must match one of the values you just entered in the Selection list items box, and the corresponding value will be the default one chosen when the person completing the workflow request first encounters this data item. |
c. | Set the Use to define conditions/branching option to Yes. |
d. | Set the Define a condition for automatic rollback? option to Yes. Additional fields are displayed: Rollback Value and Rollback to: |
e. | To trigger an automatic rollback for a response, select the workflow step that you want to roll back to from the Rollback to list. For all other responses, leave Rollback to set to Not Defined. |
Note:For responses that you want to result in the completion of a workflow step rather than a rollback, it is important that you do not make a selection in the Rollback to list and just leave it set to Not Defined. For example, if the question was Has package passed all critical tests?, for the No response, you would want to trigger a rollback to a testing workflow step, so you would select that workflow step from the Rollback to list. However, if the answer to the question was Yes, you would not want to perform a rollback, so you would leave Rollback to set to Not Defined; do not select a subsequent workflow step.
4. | Click the Create button to create this new data element and add it to the Data tree. |
Next, proceed with Creating a Workflow Step That Asks “Automatic Rollback” Question.
Creating a Workflow Step That Asks “Automatic Rollback” Question
In this step, we will see how to create a workflow phase that collects the answer to the “automatic rollback” question and “rolls back” the workflow if the specified answer is provided.
To create a workflow step that asks the “automatic rollback” question:
1. | Complete the steps in Creating a Data Element to Use for Automatic Rollback. |
2. | Begin creating a workflow phase as described in Creating Subsequent Workflow Phases. |
3. | Add a workflow step to this workflow phase with a Step type of Normal. |
4. | Set the workflow step’s Collect a data group in this workflow step? option to Yes. |
5. | From the Select the data group list, select the data group that contains the “automatic rollback” question. |
6. | Click Create to create the workflow step. |
7. | Test this new workflow template as described in Validating a Template. |