on ‎2023 Jul 25 11:43 AM
Hello,
I have a requirement to cancel the workflow in SBPA. the sue case is - User will trigger a workflow cancellation from SAPUI5 app and it should change the status to CANCELLED.
How can this be achieved? Is any API available?
Request clarification before answering.
Hi Purva,
You can check out my post on consuming the buid api in a cap service: (use the first approach, client credentials)
Regards,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Purva,
If you want the user to cancel the workflow then that user must have ProcessAutomationAdmin role. You can also use client credentials to cancel the workflow but with this you may loose the trace of who cancelled the workflow because it will always be a fixed client. You can decide accordingly.
Regards,
Archana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Archana,
Is there a way we can wrap this API as a CAP service and then use it so that we don't require admin role? Or if we can use a dummy user and assign process automation admin role to only that user and use this user for cancellation of workflow?
Just want to know if there is any workaround to handle the admin role(as we cannot provide admin role to all our users)
You can run the PATCH method of this API: https://api.sap.com/api/SPA_Workflow_Runtime/path/patch_v1_workflow_instances__workflowInstanceId_
Or you can delete an instance completely: https://api.sap.com/api/SPA_Workflow_Runtime/path/patch_v1_workflow_instances
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.