Martin Steinle found a similar problem and posted his BPEL code in topic "Unexpected process end in the mid of a bpel". Does that look like your own process?
Yeah, I responded to the posting with the solution I used. Exactly the same.
If you put the second assign in a while loop you have a very "nice" stack trace (instead of end process event)
I think I know what that is: the Hibernate session is closed, on finalize I suspect, and the message gets lost. The session is closed upon reply, and the gc kicks in sometimes after that.
So how does copying the message part to a temporary variable make things different?
Sorry, I meant jPBM session.
I have no time for code-digging. I just noticed that errors like that happens immediately after jBPM session that was used to receive the request closes.
I bet that in the context instance the message variables are somehow linked with the session but i have no time to check (issue is not critical).
Alex, let me know your opinon though.
If the session is somehow being closed ahead of time, that would also explain the invalid transaction ID that appears at random.
I appreciate your insight into this issue. Now I know at least where to start.