Insert user-task from one process to another

@andypr, Yes, it’s possible to communicate between the tasks in the different process/pools using intermediate message events/Receive task.

Reference: processCommunication.bpmn (8.9 KB)

In the UserTask Task 2.2 → TaskListener → Complete Event → Delegate Expression → Provide implementation to correlate the message with name “completeTask”.

In the messageSender listener provide the implementation like this:

delegateTask.getExecution().getProcessEngineServices().getRuntimeServices()
       .createMessageCorrelation("completeTask")
       .processInstanceBusinessKey("someOrderId")
       .setVariable("CANCEL_REASON", "someReason")
       .setVariable("CANCEL_TIMESTAMP", new Date())
       .correlate();

In the ReceiveTask 1.2 → Message Name → configure the message name as “completeTask”.

For more details, refer this blog for Fluent API for Message Correlation.