You are not doing anything wrong.
You have a process will all synchrnous activities. The engine will run one after the other in a cascade, that's why the events look out of order.
if you have a process like:
Start -> A -> B -> C - > D -> End
And all the activities are sync (A, B, C, D) the logs will print all the before* prints (before each activity) and as soon as it reaches the end the cascade will go back and print out all the afters*
If you add the node names to your listener you will that it make sense.
Thank you for your prompt response.
It appears as if implementing the Process Event Listener is not the route we should take. My question is what is your recommendation? We were attaching both a JMX monitoring bean (for live monitoring) and a session bean to record to the database each action through the process. In other words, we wanted to know where in the process (which node) the engine was at, and how long each node was taking to execute. We also wanted to know how many of these processes were running and had run.
Do you have a suggestion on a soltuion for these real-time monitoring requirements? Is there another listener that records each step as you go?
Thank you very much.