Process definition examples - 4

sending a reminder every 3 minutes

The idea : sending a workitem to Alice but then send her a reminder every 3 minutes.

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

<process-definition
    name="cron"
    revision="1"
>

    <description>
Testing the cron expression
    </description>

    <concurrence>

        <participant ref="role-alpha" />

        <sequence>
            <set field="__subject__" value="reminder!" />
            <cron
                tab="1-60/3 * * * *"
            >
                <participant ref="role-alpha" />
            </cron>
        </sequence>

    </concurrence>


</process-definition>

Alice has to proceed with the first workitem for the reminders arrival to stop. (Then she has to clean out all the reminder workitems by proceeding each of them).

v2 : making it reusable

A flow where Alice and Bob work in sequence and they each receive reminders.

Actually, reminders will be sent once per hour (from 9am to 5pm).

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

<process-definition
    name="cron"
    revision="2"
>

    <description>
Testing the cron expression
    </description>

    <sequence>
        <reminded-participant rref="role-alpha" />
        <reminded-participant rref="role-bravo" />
    </sequence>


    <process-definition name="reminded-participant">
        <concurrence>

            <participant ref="${rref}" />

            <sequence>
                <set field="__subject__" value="reminder!" />
                <cron
                    tab="* 9-17 * * *"
                >
                    <participant ref="${rref}" />
                </cron>
            </sequence>

        </concurrence>
    </process-definition>

</process-definition>