Skip to main content
luisr0004
February 28, 2022
Question

Cancel process - User with administration rights gets "The user [xxxx] does not have sufficient privileges to perform the requested action" message

  • February 28, 2022
  • 8 replies
  • 0 views

Hi,

This is my use case:

- I have a process launched waiting on a user tasks. The process was launched via webapi, and it gets the security configuration from its process model, as usual.
- The security on the process model is setted to give Administration rights to the service account represented by api-key I'm using on my web apis
- From another web-api using the same api-key, I execute cancelProcess function, and I get an error talking about inssuficient privileges to do the cancel

To my understanding, the process should cancel without errors because the service account used in web-api has administration rights on the process I want to cancel, but this is not what is happenning.

Any help will be appreciated

8 replies

andrewh0007
February 28, 2022

From my understanding you would need to be a System Administrator in order to cancel a process, even using a!cancelProcess(). The documentation (https://docs.appian.com/suite/help/21.4/Cancel_Process_Smart_Service.html) does read that just being an Administrator of the process will allow cancellation but I have just done some testing and I cannot get this to work. I would be keen to know if anyone knows if it is in fact the case that you need to be a System Administrator, and not just a Process Administrator, to cancel a process.

One solution is to have the second WebAPI call a different process model that has the cancel process node in a swim lane that is set to run as whoever designed the process model. Just tested this and it works fine.

luisr0004
luisr0004Author
February 28, 2022

Thank you.

Yes, I already have the second WebAPI in the way you mention, and effectively it works. It's just I was expecting it works on the other way, because cancel process documentation states that.

stewart.burchell
February 28, 2022

An alternative to actually issuing a "Cancel" on the process is to send it a message which, when received by the target process, causes it to transition immediately to a terminate end node. This results in the same outcome in that any user tasks that are waiting can no longer be accessed.

This also has the benefit in that the process ends "normally" and isn't flagged as having been cancelled.

Here's a good place to start: docs.appian.com/.../Send_Message_Event.html

stefanhelzle0001
Brainy
February 28, 2022

I support Stewarts recommendation as it prevents any process alert messages to the alert receiver group. This becomes a problem as soon as you tell them they need to act on these messages.