martinweiler opened a new issue, #1778: URL: https://github.com/apache/incubator-kie-issues/issues/1778
When the `referenceId` is set as `kogitoprocrefid` extension in an event, this event can then be correlated to a target instance by the [ProcessEventDispatcher](https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/api/kogito-events-core/src/main/java/org/kie/kogito/event/impl/ProcessEventDispatcher.java#L80-L83). This mechanism is successfully used in the [PingPongMessageIT](https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/quarkus/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/PingPongMessageIT.java) example which follows this flow: * ping process is started through REST and sends message to `pong_start` * ping process then waits in *Intermediate Message Catch Event* on `pong_end` * pong process is started through *Message Start Event* on `pong_start` * pong process sends message through *Message End Event* on `pong_end` * ping process is signaled and continues to execute The last step in this flow uses the above mentioned mechanism to correlate the incoming message to a specific process instance using the `referenceId`. However, the following execution flow currently fails: * receiver process is started through REST and waits in *Intermediate Message Catch Event* on `msg_channel` * sender process is started through REST and sends a message through *Intermediate Message Throw Event* on `msg_channel` There is no correlation between the two process instances and signaling of the receiver process instance fails. In order to make this work, the REST API to start a process instance needs to be enhanced to read the `referenceId` from the `X-KOGITO-ReferenceId` header and use it in the process instance creation. With this approach, the message sent from the sender to the receiver process has the `kogitoprocrefid` extension set and the two instances are properly correlated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
