1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <dc-workflow workflow_id=
"default_workflow"
3 title=
"Plinn default workflow" description=
""
4 state_variable=
"review_state"
5 initial_state=
"private" manager_bypass=
"False">
6 <permission>Access contents information
</permission>
7 <permission>Change portal events
</permission>
8 <permission>Change portal topics
</permission>
9 <permission>Delete Owned Objects
</permission>
10 <permission>Manage properties
</permission>
11 <permission>Modify portal content
</permission>
12 <permission>View
</permission>
13 <state state_id=
"pending" title=
"Waiting for reviewer">
14 <exit-transition transition_id=
"publish"/>
15 <exit-transition transition_id=
"reject"/>
16 <exit-transition transition_id=
"retract"/>
17 <permission-map name=
"Access contents information"
19 <permission-role>Manager
</permission-role>
21 <permission-map name=
"Change portal events"
23 <permission-role>Manager
</permission-role>
24 <permission-role>Reviewer
</permission-role>
26 <permission-map name=
"Change portal topics"
28 <permission-role>Manager
</permission-role>
29 <permission-role>Reviewer
</permission-role>
31 <permission-map name=
"Delete Owned Objects"
33 <permission-role>Manager
</permission-role>
35 <permission-map name=
"Manage properties" acquired=
"False">
36 <permission-role>Manager
</permission-role>
37 <permission-role>Reviewer
</permission-role>
39 <permission-map name=
"Modify portal content"
41 <permission-role>Manager
</permission-role>
42 <permission-role>Reviewer
</permission-role>
44 <permission-map name=
"View" acquired=
"False">
45 <permission-role>Contributor
</permission-role>
46 <permission-role>Manager
</permission-role>
47 <permission-role>Owner
</permission-role>
48 <permission-role>Reader
</permission-role>
49 <permission-role>Reviewer
</permission-role>
52 <state state_id=
"private"
53 title=
"Non-visible and editable only by owner">
54 <exit-transition transition_id=
"direct_publish"/>
55 <exit-transition transition_id=
"submit"/>
56 <permission-map name=
"Access contents information"
58 <permission-role>Contributor
</permission-role>
59 <permission-role>Manager
</permission-role>
60 <permission-role>Owner
</permission-role>
62 <permission-map name=
"Change portal events"
64 <permission-role>Contributor
</permission-role>
65 <permission-role>Manager
</permission-role>
66 <permission-role>Owner
</permission-role>
68 <permission-map name=
"Change portal topics"
70 <permission-role>Contributor
</permission-role>
71 <permission-role>Manager
</permission-role>
72 <permission-role>Owner
</permission-role>
74 <permission-map name=
"Delete Owned Objects"
76 <permission-role>Manager
</permission-role>
77 <permission-role>Owner
</permission-role>
79 <permission-map name=
"Manage properties" acquired=
"False">
80 <permission-role>Contributor
</permission-role>
81 <permission-role>Manager
</permission-role>
82 <permission-role>Owner
</permission-role>
84 <permission-map name=
"Modify portal content"
86 <permission-role>Contributor
</permission-role>
87 <permission-role>Manager
</permission-role>
88 <permission-role>Owner
</permission-role>
90 <permission-map name=
"View" acquired=
"False">
91 <permission-role>Contributor
</permission-role>
92 <permission-role>Manager
</permission-role>
93 <permission-role>Owner
</permission-role>
94 <permission-role>Reader
</permission-role>
97 <state state_id=
"published" title=
"Public">
98 <exit-transition transition_id=
"reject"/>
99 <exit-transition transition_id=
"retract"/>
100 <permission-map name=
"Access contents information"
102 <permission-role>Manager
</permission-role>
104 <permission-map name=
"Change portal events"
106 <permission-role>Manager
</permission-role>
108 <permission-map name=
"Change portal topics"
110 <permission-role>Manager
</permission-role>
112 <permission-map name=
"Delete Owned Objects"
114 <permission-role>Manager
</permission-role>
116 <permission-map name=
"Manage properties" acquired=
"False">
117 <permission-role>Manager
</permission-role>
119 <permission-map name=
"Modify portal content"
121 <permission-role>Manager
</permission-role>
123 <permission-map name=
"View" acquired=
"True">
124 <permission-role>Anonymous
</permission-role>
125 <permission-role>Manager
</permission-role>
128 <transition transition_id=
"direct_publish"
129 title=
"Reviewer publishes content"
130 new_state=
"published" trigger=
"USER"
131 before_script=
"" after_script=
"">
132 <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)
</description>
133 <action url=
"%(content_url)s/content_publish_form?direct:boolean=True"
134 category=
"workflow" icon=
"">Publish
</action>
136 <guard-permission>Review portal content
</guard-permission>
137 <guard-expression>python:user.allowed(here, ['Owner'])
</guard-expression>
140 <transition transition_id=
"publish"
141 title=
"Reviewer publishes content"
142 new_state=
"published" trigger=
"USER"
143 before_script=
"" after_script=
"">
144 <action url=
"%(content_url)s/content_publish_form"
145 category=
"workflow" icon=
"">Publish
</action>
147 <guard-permission>Review portal content
</guard-permission>
150 <transition transition_id=
"reject"
151 title=
"Reviewer rejects submission"
152 new_state=
"private" trigger=
"USER"
153 before_script=
"" after_script=
"">
154 <action url=
"%(content_url)s/content_reject_form"
155 category=
"workflow" icon=
"">Reject
</action>
157 <guard-permission>Review portal content
</guard-permission>
160 <transition transition_id=
"retract"
161 title=
"Member retracts submission"
162 new_state=
"private" trigger=
"USER"
163 before_script=
"" after_script=
"">
164 <action url=
"%(content_url)s/content_retract_form"
165 category=
"workflow" icon=
"">Retract
</action>
167 <guard-permission>Request review
</guard-permission>
168 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))
</guard-expression>
171 <transition transition_id=
"submit"
172 title=
"Member requests publishing"
173 new_state=
"pending" trigger=
"USER"
174 before_script=
"" after_script=
"">
175 <action url=
"%(content_url)s/content_submit_form"
176 category=
"workflow" icon=
"">Submit
</action>
178 <guard-permission>Request review
</guard-permission>
181 <worklist worklist_id=
"reviewer_queue" title=
"">
182 <description>Reviewer tasks
</description>
183 <action url=
"%(portal_url)s/list_pending_contents"
184 category=
"global" icon=
"">Pending (%(count)d)
</action>
186 <guard-expression>here/havePendingContents
</guard-expression>
188 <match name=
"review_state" values=
"pending"/>
190 <variable variable_id=
"action" for_catalog=
"False"
191 for_status=
"True" update_always=
"True">
192 <description>The last transition
</description>
195 <expression>transition/getId|nothing
</expression>
200 <variable variable_id=
"actor" for_catalog=
"False"
201 for_status=
"True" update_always=
"True">
202 <description>The ID of the user who performed the last transition
</description>
205 <expression>user/getId
</expression>
210 <variable variable_id=
"comments" for_catalog=
"False"
211 for_status=
"True" update_always=
"True">
212 <description>Comments about the last transition
</description>
215 <expression>python:state_change.kwargs.get('comment', '')
</expression>
220 <variable variable_id=
"email_sent" for_catalog=
"False"
221 for_status=
"True" update_always=
"True">
224 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])
</expression>
229 <variable variable_id=
"review_history" for_catalog=
"False"
230 for_status=
"False" update_always=
"False">
231 <description>Provides access to workflow history
</description>
234 <expression>state_change/getHistory
</expression>
237 <guard-permission>Request review
</guard-permission>
238 <guard-permission>Review portal content
</guard-permission>
241 <variable variable_id=
"time" for_catalog=
"False"
242 for_status=
"True" update_always=
"True">
243 <description>Time of the last transition
</description>
246 <expression>state_change/getDateTime
</expression>
251 <script script_id=
"sendNotificationEmail"
252 type=
"Script (Python)"
253 filename=
"workflows/default_workflow/scripts/sendNotificationEmail.py"
254 module=
"" function=
""/>