Thanks for your help.
I tried to build something similar with the help of the docs. They say, that you can check conditions before a state changes over. So i built up a simpel state machine which uses a “Ready for export” state … now i want to check that whenever all these items from this order has the “Ready for export” state, the order should go over into the real “Export” State
<process name="Order" main="true">
<state name="new" reserved="true"/>
<state name="prepared for export" reserved="true"/>
<state name="exported" reserved="true"/>
<target>prepared for export</target>
<event>prepare for export</event>
<transition happy="true" condition="Oms/IsCompleteOrder">
<source>prepared for export</source>
<event name="export" onEnter="true" manual="false" command="Oms/Export"/>
<event name="prepare for export" manual="true"/>
As you can see, the “prepare for export” event can be triggered manually for all items. When it’s in the “prepared for export” state it checks if all other items are also in this state. When no, it stays in the state, if yes, this item and all other items should go over into the “export” state (including the export command)
The first problem: Even if i say “manual=false”, you still can trigger the export manually (button is shown next to each item)
The second problem: How to retrigger the condition check for all the other items after the last not “ready for export” item is now in “ready for export” state?
How to solve this?