1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <dc-workflow workflow_id=
"portfolio_workflow"
3 title=
"Plinn folder workflow" description=
""
4 state_variable=
"review_state"
5 initial_state=
"private" manager_bypass=
"False">
6 <permission>Add portal content
</permission>
7 <permission>Change Images and Files
</permission>
8 <permission>Delete Owned Objects
</permission>
9 <permission>Delete objects
</permission>
10 <permission>Manage properties
</permission>
11 <permission>Modify portal content
</permission>
12 <permission>View
</permission>
13 <state state_id=
"pending" title=
"">
14 <exit-transition transition_id=
"publish"/>
15 <exit-transition transition_id=
"reject"/>
16 <exit-transition transition_id=
"retract"/>
17 <permission-map name=
"Add portal content" acquired=
"False">
18 <permission-role>Manager
</permission-role>
20 <permission-map name=
"Change Images and Files"
22 <permission-role>Manager
</permission-role>
23 <permission-role>Reviewer
</permission-role>
25 <permission-map name=
"Delete Owned Objects"
27 <permission-role>Manager
</permission-role>
29 <permission-map name=
"Delete objects" acquired=
"False">
30 <permission-role>Manager
</permission-role>
31 <permission-role>Reviewer
</permission-role>
33 <permission-map name=
"Manage properties" acquired=
"False">
34 <permission-role>Manager
</permission-role>
35 <permission-role>Reviewer
</permission-role>
37 <permission-map name=
"Modify portal content"
39 <permission-role>Manager
</permission-role>
40 <permission-role>Reviewer
</permission-role>
42 <permission-map name=
"View" acquired=
"False">
43 <permission-role>Contributor
</permission-role>
44 <permission-role>Downloader
</permission-role>
45 <permission-role>Manager
</permission-role>
46 <permission-role>Owner
</permission-role>
47 <permission-role>Reader
</permission-role>
48 <permission-role>Reviewer
</permission-role>
51 <state state_id=
"private" title=
"">
52 <exit-transition transition_id=
"direct_publish"/>
53 <exit-transition transition_id=
"submit"/>
54 <permission-map name=
"Add portal content" acquired=
"False">
55 <permission-role>Contributor
</permission-role>
56 <permission-role>Manager
</permission-role>
57 <permission-role>Owner
</permission-role>
59 <permission-map name=
"Change Images and Files"
61 <permission-role>Contributor
</permission-role>
62 <permission-role>Manager
</permission-role>
63 <permission-role>Owner
</permission-role>
65 <permission-map name=
"Delete Owned Objects"
67 <permission-role>Contributor
</permission-role>
68 <permission-role>Manager
</permission-role>
69 <permission-role>Owner
</permission-role>
71 <permission-map name=
"Delete objects" acquired=
"False">
72 <permission-role>Manager
</permission-role>
73 <permission-role>Owner
</permission-role>
75 <permission-map name=
"Manage properties" acquired=
"False">
76 <permission-role>Contributor
</permission-role>
77 <permission-role>Manager
</permission-role>
78 <permission-role>Owner
</permission-role>
80 <permission-map name=
"Modify portal content"
82 <permission-role>Contributor
</permission-role>
83 <permission-role>Manager
</permission-role>
84 <permission-role>Owner
</permission-role>
86 <permission-map name=
"View" acquired=
"False">
87 <permission-role>Contributor
</permission-role>
88 <permission-role>Downloader
</permission-role>
89 <permission-role>Manager
</permission-role>
90 <permission-role>Owner
</permission-role>
91 <permission-role>Reader
</permission-role>
94 <state state_id=
"published" title=
"">
95 <exit-transition transition_id=
"reject"/>
96 <exit-transition transition_id=
"retract"/>
97 <permission-map name=
"Add portal content" acquired=
"False">
98 <permission-role>Manager
</permission-role>
100 <permission-map name=
"Change Images and Files"
102 <permission-role>Manager
</permission-role>
104 <permission-map name=
"Delete Owned Objects"
106 <permission-role>Manager
</permission-role>
108 <permission-map name=
"Delete objects" acquired=
"False">
109 <permission-role>Manager
</permission-role>
111 <permission-map name=
"Manage properties" acquired=
"False">
112 <permission-role>Manager
</permission-role>
114 <permission-map name=
"Modify portal content"
116 <permission-role>Manager
</permission-role>
118 <permission-map name=
"View" acquired=
"True">
119 <permission-role>Anonymous
</permission-role>
122 <transition transition_id=
"direct_publish"
123 title=
"Reviewer publishes content"
124 new_state=
"published" trigger=
"USER"
125 before_script=
"" after_script=
"">
126 <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)
</description>
127 <action url=
"%(content_url)s/content_publish_form?direct:boolean=True"
128 category=
"workflow" icon=
"">Publish
</action>
130 <guard-permission>Review portal content
</guard-permission>
131 <guard-expression>python:user.allowed(here, ['Owner'])
</guard-expression>
134 <transition transition_id=
"publish"
135 title=
"Reviewer publishes content"
136 new_state=
"published" trigger=
"USER"
137 before_script=
"" after_script=
"">
138 <action url=
"%(content_url)s/content_publish_form"
139 category=
"workflow" icon=
"">Publish
</action>
141 <guard-permission>Review portal content
</guard-permission>
144 <transition transition_id=
"reject"
145 title=
"Reviewer rejects submission"
146 new_state=
"private" trigger=
"USER"
147 before_script=
"" after_script=
"">
148 <action url=
"%(content_url)s/content_reject_form"
149 category=
"workflow" icon=
"">Reject
</action>
151 <guard-permission>Review portal content
</guard-permission>
154 <transition transition_id=
"retract"
155 title=
"Member retracts submission"
156 new_state=
"private" trigger=
"USER"
157 before_script=
"" after_script=
"">
158 <action url=
"%(content_url)s/content_retract_form"
159 category=
"workflow" icon=
"">Retract
</action>
161 <guard-permission>Request review
</guard-permission>
162 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))
</guard-expression>
165 <transition transition_id=
"submit"
166 title=
"Member requests publishing"
167 new_state=
"pending" trigger=
"USER"
168 before_script=
"" after_script=
"">
169 <action url=
"%(content_url)s/content_submit_form"
170 category=
"workflow" icon=
"">Submit
</action>
172 <guard-permission>Request review
</guard-permission>
175 <variable variable_id=
"action" for_catalog=
"False"
176 for_status=
"True" update_always=
"True">
177 <description>The last transition
</description>
180 <expression>transition/getId|nothing
</expression>
185 <variable variable_id=
"actor" for_catalog=
"False"
186 for_status=
"True" update_always=
"True">
187 <description>The ID of the user who performed the last transition
</description>
190 <expression>user/getId
</expression>
195 <variable variable_id=
"comments" for_catalog=
"False"
196 for_status=
"True" update_always=
"True">
197 <description>Comments about the last transition
</description>
200 <expression>python:state_change.kwargs.get('comment', '')
</expression>
205 <variable variable_id=
"email_sent" for_catalog=
"False"
206 for_status=
"True" update_always=
"True">
209 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])
</expression>
214 <variable variable_id=
"review_history" for_catalog=
"False"
215 for_status=
"False" update_always=
"False">
216 <description>Provides access to workflow history
</description>
219 <expression>state_change/getHistory
</expression>
222 <guard-permission>Request review
</guard-permission>
223 <guard-permission>Review portal content
</guard-permission>
226 <variable variable_id=
"time" for_catalog=
"False"
227 for_status=
"True" update_always=
"True">
228 <description>Time of the last transition
</description>
231 <expression>state_change/getDateTime
</expression>
236 <script script_id=
"sendNotificationEmail"
237 type=
"Script (Python)"
238 filename=
"workflows/portfolio_workflow/scripts/sendNotificationEmail.py"
239 module=
"" function=
""/>