+<?xml version="1.0" encoding="UTF-8"?>
+<dc-workflow workflow_id="order_workflow"
+ title="Order workflow" description=""
+ state_variable="review_state"
+ initial_state="recorded" manager_bypass="False">
+ <instance-creation-conditions>
+ <guard>
+ <guard-role>Authenticated</guard-role>
+ </guard>
+ </instance-creation-conditions>
+ <permission>Access contents information</permission>
+ <permission>Delete Owned Objects</permission>
+ <permission>Manage properties</permission>
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <state state_id="canceled" title="">
+ <permission-map name="Access contents information"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ <permission-map name="Delete Owned Objects"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Manage properties" acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Modify portal content"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="View" acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ </state>
+ <state state_id="done" title="">
+ <exit-transition transition_id="notify_sent"/>
+ <permission-map name="Access contents information"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ <permission-map name="Delete Owned Objects"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Manage properties" acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Modify portal content"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="View" acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ </state>
+ <state state_id="paid" title="">
+ <exit-transition transition_id="get_printing_list"/>
+ <exit-transition transition_id="notify_done"/>
+ <permission-map name="Access contents information"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ <permission-map name="Delete Owned Objects"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Manage properties" acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Modify portal content"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="View" acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ </state>
+ <state state_id="recorded" title="">
+ <exit-transition transition_id="cancel"/>
+ <exit-transition transition_id="manual_payment"/>
+ <exit-transition transition_id="paypal_pay"/>
+ <permission-map name="Access contents information"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ <permission-map name="Delete Owned Objects"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Manage properties" acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ <permission-map name="Modify portal content"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ <permission-map name="View" acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ </state>
+ <state state_id="refused" title="">
+ <permission-map name="Access contents information"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ <permission-map name="Delete Owned Objects"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Manage properties" acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Modify portal content"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="View" acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ </state>
+ <state state_id="sent" title="">
+ <permission-map name="Access contents information"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ <permission-map name="Delete Owned Objects"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Manage properties" acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="Modify portal content"
+ acquired="False">
+ <permission-role>Manager</permission-role>
+ </permission-map>
+ <permission-map name="View" acquired="False">
+ <permission-role>Manager</permission-role>
+ <permission-role>Owner</permission-role>
+ </permission-map>
+ </state>
+ <transition transition_id="cancel" title=""
+ new_state="canceled" trigger="USER"
+ before_script="" after_script="relistCopies">
+ <action url="%(content_url)s/order_cancel_form"
+ category="workflow" icon="">Cancel</action>
+ <guard>
+ <guard-permission>Manage print orders</guard-permission>
+ </guard>
+ </transition>
+ <transition transition_id="get_printing_list" title=""
+ new_state="" trigger="USER" before_script=""
+ after_script="">
+ <action url="%(object_url)s/order_printing_list"
+ category="workflow" icon="">Printing list</action>
+ <guard>
+ <guard-permission>Manage print orders</guard-permission>
+ </guard>
+ </transition>
+ <transition transition_id="manual_payment" title=""
+ new_state="paid" trigger="USER"
+ before_script="" after_script="">
+ <action url="%(content_url)s/order_manual_payment_form"
+ category="workflow" icon="">Manual payment</action>
+ <guard>
+ <guard-permission>Manage print orders</guard-permission>
+ </guard>
+ </transition>
+ <transition transition_id="notify_done" title=""
+ new_state="done" trigger="USER"
+ before_script="" after_script="">
+ <action url="%(content_url)s/order_notify_done_form"
+ category="workflow" icon="">Notify done</action>
+ <guard>
+ <guard-permission>Manage print orders</guard-permission>
+ </guard>
+ </transition>
+ <transition transition_id="notify_sent" title=""
+ new_state="sent" trigger="USER"
+ before_script="" after_script="">
+ <action url="%(content_url)s/order_notify_sent_form"
+ category="workflow" icon="">Notify sent</action>
+ <guard>
+ <guard-permission>Manage print orders</guard-permission>
+ </guard>
+ </transition>
+ <transition transition_id="paypal_pay" title=""
+ new_state="paid" trigger="USER"
+ before_script="" after_script="">
+
+ <guard>
+ <guard-role>Owner</guard-role>
+ </guard>
+ </transition>
+ <variable variable_id="action" for_catalog="False"
+ for_status="True" update_always="True">
+ <description>The last transition</description>
+ <default>
+
+ <expression>transition/getId|nothing</expression>
+ </default>
+ <guard>
+ </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+ for_status="True" update_always="True">
+ <description>The ID of the user who performed the last transition</description>
+ <default>
+
+ <expression>user/getId</expression>
+ </default>
+ <guard>
+ </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+ for_status="True" update_always="True">
+ <description>Comments about the last transition</description>
+ <default>
+
+ <expression>python:state_change.kwargs.get('comment', '')</expression>
+ </default>
+ <guard>
+ </guard>
+ </variable>
+ <variable variable_id="email_sent" for_catalog="False"
+ for_status="True" update_always="True">
+ <default>
+
+ <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
+ </default>
+ <guard>
+ </guard>
+ </variable>
+ <variable variable_id="review_history" for_catalog="False"
+ for_status="False" update_always="False">
+ <description>Provides access to workflow history</description>
+ <default>
+
+ <expression>state_change/getHistory</expression>
+ </default>
+ <guard>
+ <guard-permission>Request review</guard-permission>
+ <guard-permission>Review portal content</guard-permission>
+ </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="False"
+ for_status="True" update_always="True">
+ <description>Time of the last transition</description>
+ <default>
+
+ <expression>state_change/getDateTime</expression>
+ </default>
+ <guard>
+ </guard>
+ </variable>
+ <variable variable_id="tracking_number" for_catalog="False"
+ for_status="True" update_always="False">
+ <default>
+
+
+ </default>
+ <guard>
+ </guard>
+ </variable>
+ <variable variable_id="tracking_url" for_catalog="False"
+ for_status="True" update_always="False">
+ <default>
+
+
+ </default>
+ <guard>
+ </guard>
+ </variable>
+ <script script_id="relistCopies" type="Script (Python)"
+ filename="workflows/order_workflow/scripts/relistCopies.py"
+ module="" function=""/>
+ <script script_id="sendNotificationEmail"
+ type="Script (Python)"
+ filename="workflows/order_workflow/scripts/sendNotificationEmail.py"
+ module="" function=""/>
+</dc-workflow>