on 2023 Sep 19 9:49 AM
Hello Expert,
i have created a workflow on SAP Build which has 2 step approval process.
These 2 steps are designed using approval form which has "Approve" and "Reject" branch as shown in the screenshot.

i am able to call the API to get the task Details and now i want to mark first user task as Completed.
hence i am calling API :
/v1/task-instances/{taskInstanceId}
With following context:
{<br> "context": {},<br> "status": "COMPLETED",<br> "decision": "",<br> "subject": "",<br> "description": "",<br> "recipientUsers": "",<br> "recipientGroups": "",<br> "processor": "",<br> "dueDate": "2023-09-19T08:14:52.691Z",<br> "priority": "VERY_HIGH",<br> "confidenceLevel": 0<br>}
But it returns with error saying :
{<br> "error": {<br> "message": "No outgoing sequence flow of element 'form_firstlevelapprovaluw_1' could be selected for continuing the process",<br> "logId": "eb60dd13-50b0-4c5f-a4c2-cb93dcc-eu10"<br> }<br>}
Note: Setting status "Approve" or "Reject" doesnt work as it throws message saying invalid status. so i guess "COMPLETED" is the way to go. but not sure what branch and sequence flow it needs.
Thanks in advance for your time.
Request clarification before answering.
Hi,
please refer to the API documentation: https://api.sap.com/api/SPA_Workflow_Runtime/path/patch_v1_task_instances__taskInstanceId_
I think the empty decision value you provide causes the issue. See the specific description in the API documentation:
Specify the decision taken by the user when the task status is set to 'COMPLETED'.
The decision can be evaluated with a respective expression to adapt the control flow accordingly.
Regards,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tobias,
thanks for the reply. I tried to add Decision = "APPROVE" and Status="COMPLETED" while calling the patch API but the error remains the same.
so i thought may be my workflow needs a Decision elements so i added it as follow .

Still no luck and error remain the same saying "No outgoing sequence flow ..."
Note : i did tested my workflow by manual approval in Workflow inbox and it moves to second level approval after i click on Approve on the first task in inbox. Not sure what's missing.
may be i am missing very basic thing. any idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.