Hi,
we are integrating camunda into a client-server deployment, where the client calls the camunda rest api to start a process and then gets variables from the results from the process instance. I was looking around in the documentation and the forum - there were some explanations on how to call processes from inside camunda, but couldn’t find anything on how to do this specifically. To be more precise, what I would want is to be notified once a process instance has finished (say a callback or a - possibly - push notification from inside camunda), so we can fetch the process instance variables.
The options that I’ve found so far:
-
check regularly from the client:
i) /process-definition/{id}/submit-form
ii) process-instance/{processId}/variables/{variableName}
If not completed do ii) again (in polling intervals) until waited too long or tried too often. -
implement a callback from inside the camunda process:
(There’s a very rough pattern lined out at https://docs.camunda.org/manual/7.5/examples/tutorials/inter-process-communication-ws/, but I don’t think it applies to my use case.)
It could use something like an ExecutionListener:
public class NotificationExecutionListener implements ExecutionListener {
public void notify(DelegateExecution execution) throws Exception {
pingback(); // however this works like
}
}
I find 1) clunky and I am reluctant to implement 2) so far, because it introduces more complexity.
Does anyone have ideas or hints for this?
Ben.