Inline request-response pattern
You can use the route command to write EPL that exhibits inline (synchronous) request-response behavior. The following example shows that when you want to perform an ordered pattern of operations that contain (as one operation) a request to another monitor, the subsequent operations must wait until the requesting monitor receives the response.
The ordering of the route and on statements is not relevant. The correlator sets up the event listener before processing the routed event.
A common mistake is to place code after the on statement code block and expect that code to execute after the code in the on statement code block.