On complete event of User task , we have few workflow logics. External api will invoke taskService.Complete(). Usertask complete events get triggered and code starts executed. We need to return the results of the execution back to external api synchronously. Is there any callback mechanism support or what is your suggestion on results back to external api.
That's how we are passing arguments from external api . Will it be synchronous i.e when an external application invokes complete task ? Also need to create second call to engine to get the result from execution…
A call to taskService.complete will carry on the process in the calling thread (so synchronous, yes) until a wait-state is reached (eg. another user task or receive-task), process ends or an activity with 'async=true' is encountered. The transact up until that point will be committed and process state is available after the completeTask() call completes. So it's perfectly possible to return execution-state to the external caller at this point.