We are trying out Camunda and don’t want to use Java but NodeJS to interact with Camunda via the camunda-external-task-client-js - it works fine to have an external worker doing some sync REST calls, but now we have one REST call to an external system that has to be done async by using a callback URI. The body payload of this callback call has to be saved in a variable to re-use it later in the process.
I could handle the callback in the external JS worker that initiates the call, but that seems to cause a lot of problems (the service task needs to stay locked and in the callback, I would have to fetch it again so I’ll be able to complete it and edit variables, which seems to be not supported in the camunda-external-task-client-js - only fetch and lock over polling).
So I thought about using a Receive Task and pass the external REST API a callback URI directly to the process engine. But I have no control over the headers and body of this callback call, only the URI that is called. I can only find examples of the Receive Task combined with Java, and I have no idea how I can approach this if I only use external workers. Could anyone jump-start me in the right direction?
Just to sum up the requirements:
- I have an NodeJS external worker where I initiate an async REST call, passing a callback URI to this service - the URI can be anything I want
- The process has to wait for this callback and store the body content in a variable for later re-use
- I have no control over the headers and body contents of this callback, only the URI
- We want to go only with external workers if coding is necessary and no Java code
Thanks for any help!