summaryrefslogtreecommitdiffstats
path: root/src/pfwbged/policy/profiles/default/workflows/versionnote_workflow/definition.xml
blob: 3dd09f43413ac3370f947d6ede30b9b8e1c1f848 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<?xml version="1.0"?>
<dc-workflow workflow_id="versionnote_workflow"
             title="Version Note Workflow"
             description=""
             state_variable="review_state"
             initial_state="draft"
             manager_bypass="True"
             xmlns:i18n="http://xml.zope.org/namespaces/i18n"
             i18n:domain="plone">
 <permission>Access contents information</permission>
 <permission>Delete objects</permission>
 <permission>Modify portal content</permission>
 <permission>View</permission>
 <state state_id="draft" title="Draft" i18n:attributes="title">
  <exit-transition transition_id="finish_without_validation"/>
  <exit-transition transition_id="submit"/>
  <exit-transition transition_id="ask_opinion"/>
  <exit-transition transition_id="obsolete"/>
  <exit-transition transition_id="cancel-refusal"/>
  <permission-map name="View" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Reader</permission-role>
   <permission-role>Reviewer</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
  <permission-map name="Access contents information" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Reader</permission-role>
   <permission-role>Reviewer</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
  <permission-map name="Modify portal content" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
  <permission-map name="Delete objects" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
 </state>
 <state state_id="finished" title="Finished" i18n:attributes="title">
  <exit-transition transition_id="obsolete"/>
  <exit-transition transition_id="back_to_draft"/>
  <exit-transition transition_id="send_to_trash"/>
  <permission-map name="View" acquired="True">
  </permission-map>
  <permission-map name="Access contents information" acquired="True">
  </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="Delete objects" acquired="False">
   <permission-role>Manager</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
 </state>
 <state state_id="obsolete" title="Obsolete" i18n:attributes="title">
  <permission-map name="View" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Reader</permission-role>
   <permission-role>Reviewer</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
  <permission-map name="Access contents information" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Reader</permission-role>
   <permission-role>Reviewer</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
  <permission-map name="Modify portal content" acquired="False">
   <permission-role>Manager</permission-role>
  </permission-map>
  <permission-map name="Delete objects" acquired="False">
   <permission-role>Manager</permission-role>
  </permission-map>
 </state>
 <state state_id="pending" title="Waiting validation" i18n:attributes="title">
  <exit-transition transition_id="refuse"/>
  <exit-transition transition_id="validate"/>
  <exit-transition transition_id="obsolete"/>
  <permission-map name="View" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Reader</permission-role>
   <permission-role>Reviewer</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
  <permission-map name="Access contents information" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Reader</permission-role>
   <permission-role>Reviewer</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
  <permission-map name="Modify portal content" acquired="False">
   <permission-role>Manager</permission-role>
  </permission-map>
  <permission-map name="Delete objects" acquired="False">
   <permission-role>Manager</permission-role>
  </permission-map>
 </state>
 <state state_id="validated" title="Validated" i18n:attributes="title">
  <exit-transition transition_id="finish"/>
  <exit-transition transition_id="obsolete"/>
  <exit-transition transition_id="submit"/>
  <exit-transition transition_id="cancel-validation"/>
  <permission-map name="View" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Reader</permission-role>
   <permission-role>Reviewer</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
  <permission-map name="Access contents information" acquired="False">
   <permission-role>Editor</permission-role>
   <permission-role>Manager</permission-role>
   <permission-role>Reader</permission-role>
   <permission-role>Reviewer</permission-role>
   <permission-role>Owner</permission-role>
  </permission-map>
  <permission-map name="Modify portal content" acquired="False">
   <permission-role>Manager</permission-role>
  </permission-map>
  <permission-map name="Delete objects" acquired="False">
   <permission-role>Manager</permission-role>
  </permission-map>
 </state>
 <state state_id="trashed" title="Trashed" i18n:attributes="title">
  <exit-transition transition_id="restore_from_trash"/>
  <permission-map name="View" acquired="False">
   <permission-role>Manager</permission-role>
  </permission-map>
 </state>
 <transition transition_id="back_to_draft" title="Back to draft" new_state="draft" trigger="USER" before_script="" after_script="" i18n:attributes="title">
   <action url="" category="workflow" icon="" i18n:translate="">Back to draft</action>
  <guard>
   <guard-role>Manager</guard-role>
   <guard-role>Owner</guard-role>
  </guard>
 </transition>
 <transition transition_id="restore_from_trash" title="Restore" new_state="finished" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="" category="workflow" icon="" i18n:translate="">Restore</action>
  <guard>
   <guard-role>Manager</guard-role>
  </guard>
 </transition>
 <transition transition_id="send_to_trash" title="Send to trash" new_state="trashed" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="" category="hidden_workflow" icon="" i18n:translate="">Send to trash</action>
  <guard>
   <guard-role>Manager</guard-role>
   <guard-role>Owner</guard-role>
   <guard-expression>here/@@can_be_trashed</guard-expression>
  </guard>
 </transition>
 <transition transition_id="finish" title="Finish" new_state="finished" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="" category="workflow" icon="" i18n:translate="">Finish</action>
  <guard>
    <guard-role>Owner</guard-role>
    <guard-role>Reviewer</guard-role>
  </guard>
 </transition>
 <transition transition_id="finish_without_validation" title="Validate and finish" new_state="finished" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="" category="workflow" icon="" i18n:translate="">Validate and finish</action>
  <guard>
    <guard-role>Owner</guard-role>
    <guard-expression>here/@@no_validation_in_progress</guard-expression>
  </guard>
 </transition>
 <transition transition_id="obsolete" title="Make obsolete" new_state="obsolete" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="" category="hidden_workflow" icon="" i18n:translate="">Make obsolete</action>
  <guard>
  </guard>
 </transition>
 <transition transition_id="refuse" title="Refuse" new_state="draft" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="%(content_url)s/@@refuse?workflow_action=refuse" category="workflow" icon="" i18n:translate="">Refuse</action>
  <guard>
   <guard-expression>here/@@can_validate_or_refuse</guard-expression>
  </guard>
 </transition>
 <transition transition_id="ask_opinion" title="Ask opinion" new_state="draft" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="%(content_url)s/@@ask_opinion" category="workflow" icon="" i18n:translate="">Ask opinion</action>
  <guard>
    <guard-role>Owner</guard-role>
    <guard-role>Manager</guard-role>
  </guard>
 </transition>
 <transition transition_id="submit" title="Ask validation" new_state="pending" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="%(content_url)s/@@ask_validation" category="workflow" icon="" i18n:translate="">Ask validation</action>
  <guard>
    <guard-role>Owner</guard-role>
    <guard-role>Reviewer</guard-role>
    <guard-expression>here/@@no_validation_in_progress</guard-expression>
  </guard>
 </transition>
 <transition transition_id="validate" title="Validate" new_state="validated" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="" category="workflow" icon="" i18n:translate="">Validate</action>
  <guard>
   <guard-expression>here/@@can_validate_or_refuse</guard-expression>
  </guard>
 </transition>
 <transition transition_id="cancel-validation" title="Cancel validation" new_state="pending" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="" category="workflow" icon="" i18n:translate="">Cancel validation</action>
  <guard>
   <guard-expression>here/@@can_cancel_validation</guard-expression>
  </guard>
 </transition>
 <transition transition_id="cancel-refusal" title="Cancel refusal" new_state="pending" trigger="USER" before_script="" after_script="" i18n:attributes="title">
  <action url="" category="workflow" icon="" i18n:translate="">Cancel validation</action>
  <guard>
   <guard-expression>here/@@can_cancel_refusal</guard-expression>
  </guard>
 </transition>
 <variable variable_id="action" for_catalog="False" for_status="True" update_always="True">
  <description>Previous 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>Comment about the last transition</description>
  <default>
   <expression>python:state_change.kwargs.get('comment', '')</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>When the previous transition was performed</description>
  <default>
   <expression>state_change/getDateTime</expression>
  </default>
  <guard>
  </guard>
 </variable>
</dc-workflow>