Cancel running process
Is it possible that a process with N approvers can be canceled by the initiator before the flow is complete? In the same form
-
Hello Loren
Sure, I'll give you more detail.
I have a flow of approvers, once the process is started by a requestor at any time I can cancel the whole flow.
Something equivalent to the cancel process button in the Inbox section
but within the read-only form.
If this cancellation is not possible, how could I catch this cancellation action
in my flow?Regards.
-
I don't think you will be able to cancel the process from the eForms Report View screen. That screen/form is as you said, purely read-only, and it is not even a real task that you could then take action from.
I can think of two ways that you might be able to do what you are trying to do.
The first way would be to create a separate branch of your workflow that has a cancel task that sits in someone's queue while the approvals are going on. If they want to cancel the process, they go to the "Cancel" task and complete it. Then use an OR condition to join the paths back together and end the process. The OR condition can be configured to automatically cancel the remaining approval tasks.
Here is a diagram of what I am talking about:
Of course, the downside to this is that someone has to have a Cancel Task sitting in their inbox queue the entire time that the process is running.
The second way to do this would be to create a separate utility app that has a start task that has a drop-down list of all the active approval processes that are running. The drop-down would need to be populated with an auto lookup against the AgilePoint database to bring back a list of the Process Instances that are running and store the ProcessID as the Value. Then the user can select which process they want to cancel and submit the form. You would then need to configure a REST API call in this utility process to cancel the selected process. Documentation for the REST Cancel Process method can be viewed here:
https://documentation.agilepoint.com/11/developer/restmethodCancelProcInst.html -
Hi Christian,
Process initiator can use the "Process I Started" tab of the Work Center inbox, which will list instances he has initiated.
Clicking on the Process Instance Name will open the context menu, and if initiator has the permission to "Cancel Process Instance", then this option will be available as well. This is equivalent to the Cancel Process option in the My Tasks.
This is also available under the "Process I've Worked" which will lists users process interfaces they have been participated in (i.e as an approver). See screen shot below:

Important to mention that this an administrative canceling, meaning it external to the process.
If you need to take certain actions as part of the cancel logic, than its much better to have the cancel process activity and flow as part of the process model, as Loren mentioned in his answer above using a "Cancel Brunch" and exclusive OR merging.... according to actual process logic needed.
I would recommend to start with the one-two of the above options, which are the most strait forward, and easy to implement.
If more dedicated/customised behaviour is required, many other options are available for implementation, as also noted by Loren, by leveraging AgilePoint APIs:
- Create a form widget to list instance and allow to take actions, as like Cancel Process Instance.
- Add a custom button to your form which will allow to cancel the instance right from the form...
- Leverage the runtime management UI
- And more...
Hope this helps.
Thanks,
Yaniv.
请先登录再写评论。
评论
5 条评论