How to Implement a callback message which is correlated to the same process instance from which the request message was sent

Hi ,

How to Implement a callback message which is correlated to the same process instance from which the request message was sent.?

Please help.

The callback is going to need 2 things:
a message name - defined by the process
and a business key - created when the process begins.

these can be send in the initial call an then used again to correlate back to the same process.

1 Like

Thanks @Niall ,

1 more doubt :slight_smile:

Will the process variable input to the message api be availble in the bpmn’s next step in execution.getVariable(‘aVariable’) method ?

Shouldn’t be a problem - as long as you create the variable any time before asking for it, it should be there.

For instance if your message name is an expression which take a variable from the context then you can start your process with the name of the return message AND the business key.

1 Like

Thanks again @Niall

How can I carry forward the response of the http connector to the next service task if I am having an intermediate catch event in between.
I am modelling the process using Model API.

Regards,
Albin