Resume the cancelled workflow

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 <sys_id for workflow activity you looked up in step 4>" 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 <sys_id of workflow version you saved in step 6. (See screenshot below)

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

转载于:https://blog.51cto.com/13716461/2308051

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值