We have a requirement to integrate our appian workflow to cafexUI where that UI will get the active taskitems in the form of report and when they open and action any record the relevant taskitem in appian should be closed and the process model should be progressed to next nodes successfully and complete. We need approach and Error handling.
We created an API which will call a!Completetask smart service which will complete the task however we have activity chaining in the process model of the task which will reopen the taskitem based on the integration node failure or it will complete when success. we need to know how to handle this?
Discussion posts and replies are publicly visible
a!completeTask( taskId: tointeger(a!fromJson(http!request.body).taskId), taskInputs: rule!PM_ICC_GetTaskInputs(http!request.body), onSuccess: a!httpResponse( statusCode: 200, body: "Task completed successfully." ), onError: a!httpResponse( statusCode: 500, body: "Failed to complete task." ) )
Run the integration first, and only call a!completeTask() if it succeeds else return an error.Or decouple it by triggering a child process post-task for integration with independent error handling and retries.