Issue
There are situations where a workflow may be stuck on a specific workflow activity. Whether there was an error on the activity, a canceled workflow, or for some reason the workflow will not move to the next activity, one of the ways to resolve the issue is to re-run the activity on the workflow. Below, you'll find an example of how to restart the 'Timer' activity after it's been stuck.
Resolution
- Navigate to "Workflow Context" (wf_context.list) and find the canceled workflow you want to restart:
- Navigate to the "Workflow Transition History" tab. You'll want to find the Activity you want to restart. In this case, we want to locate the "1-minute Timer" activity and copy its "sys_id".
- To quickly copy the "sys_id", click on "Activity" (1-minute Timer) activity. Right-click the header and "Copy sys_id". Save the "sys_id" on a notepad. Click the "Back" button of the browser to return to the workflow context.
- Now, we'll need to copy the sys_id of the Workflow Version. To do so, Right-Click the header on the Workflow Context Record and select "Show XML". Now search for "workflow_version" and copy the sys_id in a notepad.
- Go to "Workflow Executing Activities" Tab. "Right-Click" on one of the column headers (Ex. "Started") and navigate to "Configure -> List Control". From the List Control window "uncheck" the "Omit New Button" and then click "Update".
- There should be a "New" button on the "Workflow Executing Activities" Tab.
- Click on the "New" Button. This will open a new "Workflow Executing Activity" form record. However, all the fields are read-only. You'll need to disable a UI policy called "default read-only" (/nav_to.do?uri=sys_ui_policy.do?sys_id=404aa228d77a31008d7dc23c5e610388). You can do this by right-clicking the header and navigating to "Configure" -> "UI Policies". Set the UI policy, "default read-only" to "false".
- Add the "Workflow Version" field by right-clicking the header and navigating to "Configure" -> "Form Layout". Find "Workflow Version" and move it to the right slush bucket.
- Save.
- In the "Activity" field, you'll need to look for the activity from Step 3. Search for the "1-minute Timer" activity by using the filter for sys_id and pasting the sys_id.
- You'll need to do the same thing for "Workflow Version" field by searching the sys_id copied from Step 6.
- Submit the form. You should now have a new Workflow Executing Activity.
*If the workflow context is in "Canceled" state, you'll need to set the following: state=executing, active=true. You can do so by exporting the XML of the workflow context and modify the "State" and "Active" fields in a text editor. Save the xml and import the xml. - Return to the Record where the workflow is running against (in this case, the RITM record), and update the record. This will restart the workflow activity.