object/view comme vue après création d'un Portfolio, au lieu de l'upload java obsolète.
[Plinn.git] / profiles / photo / workflows / order_workflow / definition.xml
1 <?xml version="1.0"?>
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>
7 <guard>
8 <guard-role>Authenticated</guard-role>
9 </guard>
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"
18 acquired="False">
19 <permission-role>Manager</permission-role>
20 <permission-role>Owner</permission-role>
21 </permission-map>
22 <permission-map name="Delete Owned Objects"
23 acquired="False">
24 <permission-role>Manager</permission-role>
25 </permission-map>
26 <permission-map name="Manage properties" acquired="False">
27 <permission-role>Manager</permission-role>
28 </permission-map>
29 <permission-map name="Modify portal content"
30 acquired="False">
31 <permission-role>Manager</permission-role>
32 </permission-map>
33 <permission-map name="View" acquired="False">
34 <permission-role>Manager</permission-role>
35 <permission-role>Owner</permission-role>
36 </permission-map>
37 </state>
38 <state state_id="done" title="">
39 <exit-transition transition_id="notify_sent"/>
40 </state>
41 <state state_id="paid" title="">
42 <exit-transition transition_id="get_printing_list"/>
43 <exit-transition transition_id="notify_done"/>
44 </state>
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"
53 acquired="False">
54 <permission-role>Manager</permission-role>
55 <permission-role>Owner</permission-role>
56 </permission-map>
57 <permission-map name="Delete Owned Objects"
58 acquired="False">
59 <permission-role>Manager</permission-role>
60 </permission-map>
61 <permission-map name="Manage properties" acquired="False">
62 <permission-role>Manager</permission-role>
63 <permission-role>Owner</permission-role>
64 </permission-map>
65 <permission-map name="Modify portal content"
66 acquired="False">
67 <permission-role>Manager</permission-role>
68 <permission-role>Owner</permission-role>
69 </permission-map>
70 <permission-map name="View" acquired="False">
71 <permission-role>Manager</permission-role>
72 <permission-role>Owner</permission-role>
73 </permission-map>
74 </state>
75 <state state_id="refused" title="">
76 </state>
77 <state state_id="sent" title="">
78 </state>
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>
83
84 <guard>
85 <guard-expression>nothing</guard-expression>
86 </guard>
87 </transition>
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>
92
93 <guard>
94 <guard-expression>nothing</guard-expression>
95 </guard>
96 </transition>
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>
101
102 <guard>
103 <guard-expression>nothing</guard-expression>
104 </guard>
105 </transition>
106 <transition transition_id="auto_transaction_failed"
107 title="" new_state="" trigger="USER"
108 before_script="" after_script="">
109
110 <guard>
111 <guard-expression>nothing</guard-expression>
112 </guard>
113 </transition>
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>
119 <guard>
120 <guard-permission>Manage print orders</guard-permission>
121 </guard>
122 </transition>
123 <transition transition_id="get_printing_list" title=""
124 new_state="" trigger="USER" before_script=""
125 after_script="">
126 <action url="%(object_url)s/order_printing_list"
127 category="workflow">Printing list</action>
128 <guard>
129 <guard-permission>Manage print orders</guard-permission>
130 </guard>
131 </transition>
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>
137 <guard>
138 <guard-permission>Manage print orders</guard-permission>
139 </guard>
140 </transition>
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>
146 <guard>
147 <guard-permission>Manage print orders</guard-permission>
148 </guard>
149 </transition>
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>
155 <guard>
156 <guard-permission>Manage print orders</guard-permission>
157 </guard>
158 </transition>
159 <variable variable_id="action" for_catalog="False"
160 for_status="True" update_always="True">
161 <description>The last transition</description>
162 <default>
163
164 <expression>transition/getId|nothing</expression>
165 </default>
166 <guard>
167 </guard>
168 </variable>
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>
172 <default>
173
174 <expression>user/getId</expression>
175 </default>
176 <guard>
177 </guard>
178 </variable>
179 <variable variable_id="comments" for_catalog="False"
180 for_status="True" update_always="True">
181 <description>Comments about the last transition</description>
182 <default>
183
184 <expression>python:state_change.kwargs.get('comment', '')</expression>
185 </default>
186 <guard>
187 </guard>
188 </variable>
189 <variable variable_id="email_sent" for_catalog="False"
190 for_status="True" update_always="True">
191 <default>
192
193 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
194 </default>
195 <guard>
196 </guard>
197 </variable>
198 <variable variable_id="review_history" for_catalog="False"
199 for_status="False" update_always="False">
200 <description>Provides access to workflow history</description>
201 <default>
202
203 <expression>state_change/getHistory</expression>
204 </default>
205 <guard>
206 <guard-permission>Request review</guard-permission>
207 <guard-permission>Review portal content</guard-permission>
208 </guard>
209 </variable>
210 <variable variable_id="time" for_catalog="False"
211 for_status="True" update_always="True">
212 <description>Time of the last transition</description>
213 <default>
214
215 <expression>state_change/getDateTime</expression>
216 </default>
217 <guard>
218 </guard>
219 </variable>
220 <variable variable_id="tracking_number" for_catalog="False"
221 for_status="True" update_always="False">
222 <default>
223
224
225 </default>
226 <guard>
227 </guard>
228 </variable>
229 <variable variable_id="tracking_url" for_catalog="False"
230 for_status="True" update_always="False">
231 <default>
232
233
234 </default>
235 <guard>
236 </guard>
237 </variable>
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=""/>
245 </dc-workflow>