Process definition examples - 1

a simple sequence

<?xml version="1.0" encoding="UTF-8"?>

<process-definition
    name="example_0.0"
    revision="0"
>
    <sequence>
        <participant ref="role-alpha" />
        <participant ref="role-bravo" />
        <participant ref="role-charly" />
    </sequence>

</process-definition>

a concurrence

<?xml version="1.0" encoding="UTF-8"?>

<process-definition
    name="example_0.1"
    revision="0"
>
    <concurrence>
        <participant ref="role-alpha" />
        <participant ref="role-bravo" />
        <participant ref="role-charly" />
    </concurrence>

</process-definition>

an if

<?xml version="1.0" encoding="UTF-8"?>

<process-definition
    name="example_0.2"
    revision="0"
>
    <sequence>

        <participant ref="role-alpha" />

        <if>
            <equals field-value="approved" other-value="true" />
            <!-- then -->
            <participant ref="role-bravo" />
            <!-- else -->
            <participant ref="role-charly" />
        </if>

    </sequence>

</process-definition>

a lighter version of the same if :

        <if test="${f:approved} == 'true'">
        <!-- or
        <if test="${f:approved}">
        -->
            <!-- then -->
            <participant ref="role-bravo" />
            <!-- else -->
            <participant ref="role-charly" />
        </if>