Hi,
make sure that all execution is done exclusive within fork - join boundaries.
To make your test pass please add continuation of java activities as exclusive and the same for join
<java /class="com.family168.jbpm4book.x01.x05forkjoin.x0504.TestAction" g="146,239,92,52" method="execute" name="A" continue="exclusive">
<join g="274,331,48,48" name="Join" continue="exclusive">
HTH
Maciej