2 <dc-workflow workflow_id=
"order_workflow"
3 title=
"Order workflow" description=
""
4 state_variable=
"review_state"
5 initial_state=
"recorded" manager_bypass=
"0">
6 <instance-creation-conditions>
8 <guard-role>Authenticated
</guard-role>
10 </instance-creation-conditions>
11 <permission>Access contents information
</permission>
12 <permission>Delete Owned Objects
</permission>
13 <permission>Manage properties
</permission>
14 <permission>Modify portal content
</permission>
15 <permission>View
</permission>
16 <state state_id=
"canceled" title=
"">
17 <permission-map name=
"Access contents information"
19 <permission-role>Manager
</permission-role>
20 <permission-role>Owner
</permission-role>
22 <permission-map name=
"Delete Owned Objects"
24 <permission-role>Manager
</permission-role>
26 <permission-map name=
"Manage properties" acquired=
"False">
27 <permission-role>Manager
</permission-role>
29 <permission-map name=
"Modify portal content"
31 <permission-role>Manager
</permission-role>
33 <permission-map name=
"View" acquired=
"False">
34 <permission-role>Manager
</permission-role>
35 <permission-role>Owner
</permission-role>
38 <state state_id=
"done" title=
"">
39 <exit-transition transition_id=
"notify_sent"/>
41 <state state_id=
"paid" title=
"">
42 <exit-transition transition_id=
"get_printing_list"/>
43 <exit-transition transition_id=
"notify_done"/>
45 <state state_id=
"recorded" title=
"">
46 <exit-transition transition_id=
"auto_accept_payment"/>
47 <exit-transition transition_id=
"auto_cancel_order"/>
48 <exit-transition transition_id=
"auto_refuse_payment"/>
49 <exit-transition transition_id=
"auto_transaction_failed"/>
50 <exit-transition transition_id=
"cancel"/>
51 <exit-transition transition_id=
"manual_payment"/>
52 <permission-map name=
"Access contents information"
54 <permission-role>Manager
</permission-role>
55 <permission-role>Owner
</permission-role>
57 <permission-map name=
"Delete Owned Objects"
59 <permission-role>Manager
</permission-role>
61 <permission-map name=
"Manage properties" acquired=
"False">
62 <permission-role>Manager
</permission-role>
63 <permission-role>Owner
</permission-role>
65 <permission-map name=
"Modify portal content"
67 <permission-role>Manager
</permission-role>
68 <permission-role>Owner
</permission-role>
70 <permission-map name=
"View" acquired=
"False">
71 <permission-role>Manager
</permission-role>
72 <permission-role>Owner
</permission-role>
75 <state state_id=
"refused" title=
"">
77 <state state_id=
"sent" title=
"">
79 <transition transition_id=
"auto_accept_payment"
80 title=
"Accept payment" new_state=
"paid"
81 trigger=
"USER" before_script=
"" after_script=
"">
82 <description>Payment accepted by the bank
</description>
85 <guard-expression>nothing
</guard-expression>
88 <transition transition_id=
"auto_cancel_order"
89 title=
"Cancel order" new_state=
""
90 trigger=
"USER" before_script=
"" after_script=
"">
91 <description>The customer has canceled the order from payement site.
</description>
94 <guard-expression>nothing
</guard-expression>
97 <transition transition_id=
"auto_refuse_payment"
98 title=
"Refuse payment" new_state=
"refused"
99 trigger=
"USER" before_script=
"" after_script=
"">
100 <description>Payment refused by the bank.
</description>
103 <guard-expression>nothing
</guard-expression>
106 <transition transition_id=
"auto_transaction_failed"
107 title=
"" new_state=
"" trigger=
"USER"
108 before_script=
"" after_script=
"">
111 <guard-expression>nothing
</guard-expression>
114 <transition transition_id=
"cancel" title=
""
115 new_state=
"canceled" trigger=
"USER"
116 before_script=
"" after_script=
"relistCopies">
117 <action url=
"%(content_url)s/order_cancel_form"
118 category=
"workflow">Cancel
</action>
120 <guard-permission>Manage print orders
</guard-permission>
123 <transition transition_id=
"get_printing_list" title=
""
124 new_state=
"" trigger=
"USER" before_script=
""
126 <action url=
"%(object_url)s/order_printing_list"
127 category=
"workflow">Printing list
</action>
129 <guard-permission>Manage print orders
</guard-permission>
132 <transition transition_id=
"manual_payment" title=
""
133 new_state=
"paid" trigger=
"USER"
134 before_script=
"" after_script=
"">
135 <action url=
"%(content_url)s/order_manual_payment_form"
136 category=
"workflow">Manual payment
</action>
138 <guard-permission>Manage print orders
</guard-permission>
141 <transition transition_id=
"notify_done" title=
""
142 new_state=
"done" trigger=
"USER"
143 before_script=
"" after_script=
"">
144 <action url=
"%(content_url)s/order_notify_done_form"
145 category=
"workflow">Notify done
</action>
147 <guard-permission>Manage print orders
</guard-permission>
150 <transition transition_id=
"notify_sent" title=
""
151 new_state=
"sent" trigger=
"USER"
152 before_script=
"" after_script=
"">
153 <action url=
"%(content_url)s/order_notify_sent_form"
154 category=
"workflow">Notify sent
</action>
156 <guard-permission>Manage print orders
</guard-permission>
159 <variable variable_id=
"action" for_catalog=
"False"
160 for_status=
"True" update_always=
"True">
161 <description>The last transition
</description>
164 <expression>transition/getId|nothing
</expression>
169 <variable variable_id=
"actor" for_catalog=
"False"
170 for_status=
"True" update_always=
"True">
171 <description>The ID of the user who performed the last transition
</description>
174 <expression>user/getId
</expression>
179 <variable variable_id=
"comments" for_catalog=
"False"
180 for_status=
"True" update_always=
"True">
181 <description>Comments about the last transition
</description>
184 <expression>python:state_change.kwargs.get('comment', '')
</expression>
189 <variable variable_id=
"email_sent" for_catalog=
"False"
190 for_status=
"True" update_always=
"True">
193 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])
</expression>
198 <variable variable_id=
"review_history" for_catalog=
"False"
199 for_status=
"False" update_always=
"False">
200 <description>Provides access to workflow history
</description>
203 <expression>state_change/getHistory
</expression>
206 <guard-permission>Request review
</guard-permission>
207 <guard-permission>Review portal content
</guard-permission>
210 <variable variable_id=
"time" for_catalog=
"False"
211 for_status=
"True" update_always=
"True">
212 <description>Time of the last transition
</description>
215 <expression>state_change/getDateTime
</expression>
220 <variable variable_id=
"tracking_number" for_catalog=
"False"
221 for_status=
"True" update_always=
"False">
229 <variable variable_id=
"tracking_url" for_catalog=
"False"
230 for_status=
"True" update_always=
"False">
238 <script script_id=
"relistCopies" type=
"Script (Python)"
239 filename=
"workflows/order_workflow/scripts/relistCopies.py"
240 module=
"" function=
""/>
241 <script script_id=
"sendNotificationEmail"
242 type=
"Script (Python)"
243 filename=
"workflows/order_workflow/scripts/sendNotificationEmail.py"
244 module=
"" function=
""/>