I am writing this article to show how a cancelled workflow can be resumed. This came about due to a customer where several workflows got cancelled due to a looping workflow that exceeded the "Max Activity Count" Workflow property. The "Max Activity Count" workflow parameter is a fail safe on workflows preventing endlessly looping workflows from being a drain on a customer's instance. In this case, the "Max Activity Count" was set too low and thus we needed a way to resume the workflows from where they left off.

I wish I could say I was smart enough to have devised these procedures myself, but the true hero here was Sean Hamilton, from our support department, who showed me how to accomplish this.

The steps below show how to manually resume, but this process could be automated via a UI action if need be. Perhaps, I will send out another post with an automated way of doing this.

  1. Navigate to "Workflow Context" and find cancelled workflow you want to restart:

    workflowcontext_1.jpg
  2. From there goto "Workflow Transition History" Tab and find the step you want to resume at (See Red 2 in screenshot below)

    (NOTE: This step will be run again)
  3. You need to get the "sys_id" of this step by doing the following:

    - Click on the "From" Column to bring up "Workflow Activity" screen (See Red 3 in screenshot below)

Transition_History_2.jpg

  1. From "Workflow Activity" Screen Right Click on header and select "Copy sys_id" from menu and copy and save that in notepad making sure to add label so you know what sys_id it is (See Screenshot below)

    workflowactivity_3.jpg

  2. Go back to "Workflow Context" record, by hitting back button on browser

  3. Right Click on header and click on "Show XML" and search for "version" and not the workflow version sys_id and copy and paste that in notepad putting label by it so you know what sys_id it is. (See Screenshot below)

ShowXML_4.jpg

  1. Close "XML" window

  2. Go to "Workflow Executing Activities" Tab and "Right Click" on one of the column headers (Ex. "Started") and select "Personalize -> List Control" and from List Control window "uncheck" the "Omit New Button" and then click "Update" (See Screenshot below)

ListControl_5.jpg

  1. You now have "New" Button on "Workflow Execuring Activities" Tab. (See Screenshot Below)

NewButton_6.jpg

  1. Click on "New" Button and from the "Workflow Executing Activity" screen you will want to search for "Activity", but use filter and search using "Sys_id starts with " and select resulting workflow activity (See Screenshot below)

WorkflowContextSysID_7.jpg

  1. Do the same steps for "Workflow Version" field, but search for "sys_id starts with

WorkflowVersionSysID_8.jpg

  1. Click "Submit" to save the record and you should now have a record in the "Workflow Executing Activities" Tab (See Screenshot)

WFExecActivity_9.jpg

  1. Set "State = Executing" and "Active" is checked.

  2. To actually resume the workflow we now need update the "ID" field on the "Workflow context record". Do this by clicking on the "box" icon next to "ID" field and update label in some fashion and click "Update". This will make the record dirty and cause the workflow to be processed. (See Screenshot Below)

UpdateWFID_10.jpg

  1. Your Workflow should now continue executing and you can verify this by looking at "Transition History" tab or clicking on "Show Workflow" link