<!--
This is a single workflow type which can be instantiated separately
from the others; all workflows have access to the same universe of
validators and conditions (described below)
-->
<workflow>
<type>Ticket</type>
<description>This is the workflow for sample application Ticket</description>
<persister>TestPersister</persister>
<state name="INITIAL">
<description>This is the state the workflow enters when
instantiated. It's like a 'state zero' but since we're
using names rather than IDs we cannot assume</description>
<!-- This action is accessible from this state by everyone -->
<action name="create issue"
resulting_state="CREATED"/>
</state>
<state name="CREATED">
<description>State of ticket after it has been created</description>
<action name="add comment" resulting_state="NOCHANGE">
<condition test="defined $context->{ticket}" />
</action>
<!--
<action name="close issue"
resulting_state="CLOSED">
<condition name="IsAdminUser"/>
</action>
-->
<action name="edit issue"
resulting_state="IN_PROGRESS">
<condition name="IsWorker"/>
</action>
</state>
<state name="IN_PROGRESS">
<description>State of ticket after developers start work</description>
<action name="close issue"
resulting_state="CLOSED">
<condition name="IsCreator"/>
</action>
<action name="add comment"
resulting_state="NOCHANGE"/>
</state>
<!--
<state name="AWAITS_APPROVAL">
<description>State of ticket after developers complete work</description>
<action name="close issue"
resulting_state="CLOSED">
<condition name="IsCreationUser"/>
</action>
<action name="escalate issue"
resulting_state="CREATED_ESCALATED">
<condition name="IsCreationUser"/>
</action>
</state>
-->
<state name="CLOSED">
<description>State of ticket after creator approves the work done</description>
<action name="reopen issue"
resulting_state="CREATED">
<condition name="IsCreator"/>
</action>
</state>
</workflow>