1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <dc-workflow workflow_id=
"order_workflow"
3 title=
"Order workflow" description=
""
4 state_variable=
"review_state"
5 initial_state=
"recorded" manager_bypass=
"False">
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"/>
40 <permission-map name=
"Access contents information"
42 <permission-role>Manager
</permission-role>
43 <permission-role>Owner
</permission-role>
45 <permission-map name=
"Delete Owned Objects"
47 <permission-role>Manager
</permission-role>
49 <permission-map name=
"Manage properties" acquired=
"False">
50 <permission-role>Manager
</permission-role>
52 <permission-map name=
"Modify portal content"
54 <permission-role>Manager
</permission-role>
56 <permission-map name=
"View" acquired=
"False">
57 <permission-role>Manager
</permission-role>
58 <permission-role>Owner
</permission-role>
61 <state state_id=
"paid" title=
"">
62 <exit-transition transition_id=
"get_printing_list"/>
63 <exit-transition transition_id=
"notify_done"/>
64 <permission-map name=
"Access contents information"
66 <permission-role>Manager
</permission-role>
67 <permission-role>Owner
</permission-role>
69 <permission-map name=
"Delete Owned Objects"
71 <permission-role>Manager
</permission-role>
73 <permission-map name=
"Manage properties" acquired=
"False">
74 <permission-role>Manager
</permission-role>
76 <permission-map name=
"Modify portal content"
78 <permission-role>Manager
</permission-role>
80 <permission-map name=
"View" acquired=
"False">
81 <permission-role>Manager
</permission-role>
82 <permission-role>Owner
</permission-role>
85 <state state_id=
"recorded" title=
"">
86 <exit-transition transition_id=
"cancel"/>
87 <exit-transition transition_id=
"manual_payment"/>
88 <exit-transition transition_id=
"paypal_pay"/>
89 <permission-map name=
"Access contents information"
91 <permission-role>Manager
</permission-role>
92 <permission-role>Owner
</permission-role>
94 <permission-map name=
"Delete Owned Objects"
96 <permission-role>Manager
</permission-role>
98 <permission-map name=
"Manage properties" acquired=
"False">
99 <permission-role>Manager
</permission-role>
100 <permission-role>Owner
</permission-role>
102 <permission-map name=
"Modify portal content"
104 <permission-role>Manager
</permission-role>
105 <permission-role>Owner
</permission-role>
107 <permission-map name=
"View" acquired=
"False">
108 <permission-role>Manager
</permission-role>
109 <permission-role>Owner
</permission-role>
112 <state state_id=
"refused" title=
"">
113 <permission-map name=
"Access contents information"
115 <permission-role>Manager
</permission-role>
116 <permission-role>Owner
</permission-role>
118 <permission-map name=
"Delete Owned Objects"
120 <permission-role>Manager
</permission-role>
122 <permission-map name=
"Manage properties" acquired=
"False">
123 <permission-role>Manager
</permission-role>
125 <permission-map name=
"Modify portal content"
127 <permission-role>Manager
</permission-role>
129 <permission-map name=
"View" acquired=
"False">
130 <permission-role>Manager
</permission-role>
131 <permission-role>Owner
</permission-role>
134 <state state_id=
"sent" title=
"">
135 <permission-map name=
"Access contents information"
137 <permission-role>Manager
</permission-role>
138 <permission-role>Owner
</permission-role>
140 <permission-map name=
"Delete Owned Objects"
142 <permission-role>Manager
</permission-role>
144 <permission-map name=
"Manage properties" acquired=
"False">
145 <permission-role>Manager
</permission-role>
147 <permission-map name=
"Modify portal content"
149 <permission-role>Manager
</permission-role>
151 <permission-map name=
"View" acquired=
"False">
152 <permission-role>Manager
</permission-role>
153 <permission-role>Owner
</permission-role>
156 <transition transition_id=
"cancel" title=
""
157 new_state=
"canceled" trigger=
"USER"
158 before_script=
"" after_script=
"relistCopies">
159 <action url=
"%(content_url)s/order_cancel_form"
160 category=
"workflow" icon=
"">Cancel
</action>
162 <guard-permission>Manage print orders
</guard-permission>
165 <transition transition_id=
"get_printing_list" title=
""
166 new_state=
"" trigger=
"USER" before_script=
""
168 <action url=
"%(object_url)s/order_printing_list"
169 category=
"workflow" icon=
"">Printing list
</action>
171 <guard-permission>Manage print orders
</guard-permission>
174 <transition transition_id=
"manual_payment" title=
""
175 new_state=
"paid" trigger=
"USER"
176 before_script=
"" after_script=
"">
177 <action url=
"%(content_url)s/order_manual_payment_form"
178 category=
"workflow" icon=
"">Manual payment
</action>
180 <guard-permission>Manage print orders
</guard-permission>
183 <transition transition_id=
"notify_done" title=
""
184 new_state=
"done" trigger=
"USER"
185 before_script=
"" after_script=
"">
186 <action url=
"%(content_url)s/order_notify_done_form"
187 category=
"workflow" icon=
"">Notify done
</action>
189 <guard-permission>Manage print orders
</guard-permission>
192 <transition transition_id=
"notify_sent" title=
""
193 new_state=
"sent" trigger=
"USER"
194 before_script=
"" after_script=
"">
195 <action url=
"%(content_url)s/order_notify_sent_form"
196 category=
"workflow" icon=
"">Notify sent
</action>
198 <guard-permission>Manage print orders
</guard-permission>
201 <transition transition_id=
"paypal_pay" title=
""
202 new_state=
"paid" trigger=
"USER"
203 before_script=
"" after_script=
"">
206 <guard-role>Owner
</guard-role>
209 <variable variable_id=
"action" for_catalog=
"False"
210 for_status=
"True" update_always=
"True">
211 <description>The last transition
</description>
214 <expression>transition/getId|nothing
</expression>
219 <variable variable_id=
"actor" for_catalog=
"False"
220 for_status=
"True" update_always=
"True">
221 <description>The ID of the user who performed the last transition
</description>
224 <expression>user/getId
</expression>
229 <variable variable_id=
"comments" for_catalog=
"False"
230 for_status=
"True" update_always=
"True">
231 <description>Comments about the last transition
</description>
234 <expression>python:state_change.kwargs.get('comment', '')
</expression>
239 <variable variable_id=
"email_sent" for_catalog=
"False"
240 for_status=
"True" update_always=
"True">
243 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])
</expression>
248 <variable variable_id=
"review_history" for_catalog=
"False"
249 for_status=
"False" update_always=
"False">
250 <description>Provides access to workflow history
</description>
253 <expression>state_change/getHistory
</expression>
256 <guard-permission>Request review
</guard-permission>
257 <guard-permission>Review portal content
</guard-permission>
260 <variable variable_id=
"time" for_catalog=
"False"
261 for_status=
"True" update_always=
"True">
262 <description>Time of the last transition
</description>
265 <expression>state_change/getDateTime
</expression>
270 <variable variable_id=
"tracking_number" for_catalog=
"False"
271 for_status=
"True" update_always=
"False">
279 <variable variable_id=
"tracking_url" for_catalog=
"False"
280 for_status=
"True" update_always=
"False">
288 <script script_id=
"relistCopies" type=
"Script (Python)"
289 filename=
"workflows/order_workflow/scripts/relistCopies.py"
290 module=
"" function=
""/>
291 <script script_id=
"sendNotificationEmail"
292 type=
"Script (Python)"
293 filename=
"workflows/order_workflow/scripts/sendNotificationEmail.py"
294 module=
"" function=
""/>