Hi,
I have a User Task UI developed for my SAP Cloud Workflow. In this UI, I want to give the users the possibility to delegate a task to somebody else.
For this I am trying to change the "recipientUsers" of the task like this:
$.ajax({url: "/bpmworkflowruntime/rest/v1/task-instances/"
+ oWorkflowData.taskData.InstanceID,
method: "PATCH",
contentType: "application/json",
async: false,
data: "{\"recipientUsers\":\"" + oProcessor.ID + "\"}",
....
This works perfectly as long as the acting user has the global role "WorkflowAdmin". Of course, this role is not given to a "normal" user.
So I came up with the idea to assign "instance-specific" roles to every workflow instance right after it has been created. For this I am using this:
$.ajax({url: "/bpmworkflowruntime/rest/v1/workflow-instances/" +
workflowInstanceId + "/roles",
method: "PATCH",
contentType: "application/json",
async: false,
data: "{\"adminGroups\": \"MyWFAdminGroup\",
\"contextAdminGroups\":\"MyWFContextAdminGroup\"}",
...
This also works perfect if the acting user is "WorkflowAdmin". A task modified like this can be delegated by every "WorkflowParticipant" without Admin privileges
But this makes no sense because the Tasks are not created by an Admin...
With this approach, it is for a normal WF User not possible to create a Task that can be delegated to somebody else. But this it what you would expect to do with a Task assigned to you...
So how to solve this? Being able to delegate a task i crucial for our process.
Regards,
Jürgen