cancel
Showing results for 
Search instead for 
Did you mean: 

Getting User Last task decision - Workflow cloud foundry API

mani_ac
Participant

Hi All,

We have a requirement to do the multiple levels of approvals in workflow cloud foundry from UI. We have done the following things

1. Create a workflow Instance

2. Task collections

3. Approve or Reject.

Above all are working fine for one level but for multi-level is not working since we need to get the last user task decision.

we need to fetch this ${usertasks.<definition id>.last.decision} through API.

Could you please help us?.

We have tried all our possible ways to figure it out but could not succeed.

qmacro
Developer Advocate
Developer Advocate
0 Kudos

Please share the details of what you've tried already.

View Entire Topic
stefan_henke
Contributor

Just to add: would be interesting to know

- if you are using forms or a custom task ui

- how and when you access ${usertasks.<definition id>.last.decision}

- how you modeled the multi-level approval (sequential user tasks or in a loop

Best regards,

Stefan

mani_ac
Participant
0 Kudos

Hi Stefan,

Thank you for the reply

- Using Custom task UI
- We need to take the user-task's last decision after one user approves, we get decision as 'approve' and use that decision for the next user.
- Multi level approval is using Sequential user tasks

For approval currently we use the below API & payload and the whole workflow gets completed instead going to the next level. So we think that we need to pass the last decision in the context.

url: /bpmworkflowruntime/v1/task-instances/TaskID
method: "PATCH"
{status: "COMPLETED", context: {equipApproved: "true"}}
<br>

Thanks
Mani