This pattern is about spawning new threads of control. Take this simple flow :
<process-definition name="pattern12" revision="0.01">
<description>
Modelling the workflow pattern #12 (Multiple Instances without Synchronization)
</description>
<!-- body of the flow -->
<sequence>
<participant ref="a" />
<participant ref="b" />
<participant ref="c" />
</sequence>
<!-- subprocesses -->
<process-definition name="x">
<participant ref="x" />
</process-definition>
</process-definition>
Within the activity (participant) 'b', the subflow pattern12.xml#x may be launched. This is rather articifial.
We could embed this in the process definition language by doing :
<process-definition name="pattern12" revision="0.01">
<description>
Modelling the workflow pattern #12 (Multiple Instances without Synchronization
</description>
<!-- body of the flow -->
<sequence>
<participant ref="a" />
<subprocess ref="b" />
<participant ref="c" />
</sequence>
<!-- subprocesses -->
<process-definition name="b">
<sequence>
<participant ref="b" />
<if>
<equals field-value="spawn" other-value="true" />
<!-- spawn independent subprocess 'x' -->
<subprocess ref="x" forget="true" />
</if>
<if>
<equals field-value="loop" other-value="true" />
<!-- stay in 'activity' b -->
<subprocess ref="b" />
</if>
</sequence>
</process-definition>
<process-definition name="x">
<participant ref="x" />
</process-definition>
</process-definition>
The things to implement in the interface of participant 'b' would need to only incorporate a toggle for 'spawn' and one for 'loop'. By looping and spawning, any number of independant (and forgotten) subflow 'x' may be launched. Setting 'forget' to 'true' makes the main flow immediately forget about the just spawned subflow and resume.
There is a more elegant way :
<process-definition name="pattern12" revision="0.01">
<description>
Modelling the workflow pattern #12 (Multiple Instances without Synchronization)
</description>
<!-- body of the flow -->
<sequence>
<participant ref="a" />
<loop>
<sequence>
<participant ref="b">
<if>
<equals field-value="spawn" other-value="true" />
<!-- spawn independent subprocess 'x' -->
<subprocess ref="x" forget="true" />
</if>
</sequence>
<while>
<equals field-value="loop" other-value="true" />
</while>
</loop>
<participant ref="c" />
</sequence>
<!-- subprocesses -->
<process-definition name="x">
<participant ref="x" />
</process-definition>
</process-definition>
The 'loop' expression is used here. It is documented at the section called “loop”.