2 <dc-workflow workflow_id=
"portfolio_workflow"
3 title=
"Plinn folder workflow" description=
""
4 state_variable=
"review_state"
5 initial_state=
"private" manager_bypass=
"0">
7 <permission>Add portal content
</permission>
8 <permission>Change Images and Files
</permission>
9 <permission>Delete Owned Objects
</permission>
10 <permission>Delete objects
</permission>
11 <permission>Manage properties
</permission>
12 <permission>Modify portal content
</permission>
13 <permission>View
</permission>
14 <state state_id=
"pending" title=
"">
15 <exit-transition transition_id=
"publish"/>
16 <exit-transition transition_id=
"reject"/>
17 <exit-transition transition_id=
"retract"/>
18 <permission-map name=
"Add portal content" acquired=
"False">
19 <permission-role>Manager
</permission-role>
21 <permission-map name=
"Change Images and Files"
23 <permission-role>Manager
</permission-role>
24 <permission-role>Reviewer
</permission-role>
26 <permission-map name=
"Delete Owned Objects"
28 <permission-role>Manager
</permission-role>
30 <permission-map name=
"Delete objects" acquired=
"False">
31 <permission-role>Manager
</permission-role>
32 <permission-role>Reviewer
</permission-role>
34 <permission-map name=
"Manage properties" acquired=
"False">
35 <permission-role>Manager
</permission-role>
36 <permission-role>Reviewer
</permission-role>
38 <permission-map name=
"Modify portal content"
40 <permission-role>Manager
</permission-role>
41 <permission-role>Reviewer
</permission-role>
43 <permission-map name=
"View" acquired=
"False">
44 <permission-role>Contributor
</permission-role>
45 <permission-role>Downloader
</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" title=
"">
53 <exit-transition transition_id=
"direct_publish"/>
54 <exit-transition transition_id=
"submit"/>
55 <permission-map name=
"Add portal content" acquired=
"False">
56 <permission-role>Contributor
</permission-role>
57 <permission-role>Manager
</permission-role>
58 <permission-role>Owner
</permission-role>
60 <permission-map name=
"Change Images and Files"
62 <permission-role>Contributor
</permission-role>
63 <permission-role>Manager
</permission-role>
64 <permission-role>Owner
</permission-role>
66 <permission-map name=
"Delete Owned Objects"
68 <permission-role>Contributor
</permission-role>
69 <permission-role>Manager
</permission-role>
70 <permission-role>Owner
</permission-role>
72 <permission-map name=
"Delete objects" acquired=
"False">
73 <permission-role>Manager
</permission-role>
74 <permission-role>Owner
</permission-role>
76 <permission-map name=
"Manage properties" acquired=
"False">
77 <permission-role>Contributor
</permission-role>
78 <permission-role>Manager
</permission-role>
79 <permission-role>Owner
</permission-role>
81 <permission-map name=
"Modify portal content"
83 <permission-role>Contributor
</permission-role>
84 <permission-role>Manager
</permission-role>
85 <permission-role>Owner
</permission-role>
87 <permission-map name=
"View" acquired=
"False">
88 <permission-role>Contributor
</permission-role>
89 <permission-role>Downloader
</permission-role>
90 <permission-role>Manager
</permission-role>
91 <permission-role>Owner
</permission-role>
92 <permission-role>Reader
</permission-role>
95 <state state_id=
"published" title=
"">
96 <exit-transition transition_id=
"reject"/>
97 <exit-transition transition_id=
"retract"/>
98 <permission-map name=
"Add portal content" acquired=
"False">
99 <permission-role>Manager
</permission-role>
101 <permission-map name=
"Change Images and Files"
103 <permission-role>Manager
</permission-role>
105 <permission-map name=
"Delete Owned Objects"
107 <permission-role>Manager
</permission-role>
109 <permission-map name=
"Delete objects" acquired=
"False">
110 <permission-role>Manager
</permission-role>
112 <permission-map name=
"Manage properties" acquired=
"False">
113 <permission-role>Manager
</permission-role>
115 <permission-map name=
"Modify portal content"
117 <permission-role>Manager
</permission-role>
119 <permission-map name=
"View" acquired=
"True">
120 <permission-role>Anonymous
</permission-role>
123 <transition transition_id=
"direct_publish"
124 title=
"Reviewer publishes content"
125 new_state=
"published" trigger=
"USER"
126 before_script=
"" after_script=
"">
127 <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)
</description>
128 <action url=
"%(content_url)s/content_publish_form?direct:boolean=True"
129 category=
"workflow">Publish
</action>
131 <guard-permission>Review portal content
</guard-permission>
132 <guard-expression>python:user.allowed(here, ['Owner'])
</guard-expression>
135 <transition transition_id=
"publish"
136 title=
"Reviewer publishes content"
137 new_state=
"published" trigger=
"USER"
138 before_script=
"" after_script=
"">
139 <action url=
"%(content_url)s/content_publish_form"
140 category=
"workflow">Publish
</action>
142 <guard-permission>Review portal content
</guard-permission>
145 <transition transition_id=
"reject"
146 title=
"Reviewer rejects submission"
147 new_state=
"private" trigger=
"USER"
148 before_script=
"" after_script=
"">
149 <action url=
"%(content_url)s/content_reject_form"
150 category=
"workflow">Reject
</action>
152 <guard-permission>Review portal content
</guard-permission>
155 <transition transition_id=
"retract"
156 title=
"Member retracts submission"
157 new_state=
"private" trigger=
"USER"
158 before_script=
"" after_script=
"">
159 <action url=
"%(content_url)s/content_retract_form"
160 category=
"workflow">Retract
</action>
162 <guard-permission>Request review
</guard-permission>
163 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))
</guard-expression>
166 <transition transition_id=
"submit"
167 title=
"Member requests publishing"
168 new_state=
"pending" trigger=
"USER"
169 before_script=
"" after_script=
"">
170 <action url=
"%(content_url)s/content_submit_form"
171 category=
"workflow">Submit
</action>
173 <guard-permission>Request review
</guard-permission>
176 <variable variable_id=
"action" for_catalog=
"False"
177 for_status=
"True" update_always=
"True">
178 <description>The last transition
</description>
181 <expression>transition/getId|nothing
</expression>
186 <variable variable_id=
"actor" for_catalog=
"False"
187 for_status=
"True" update_always=
"True">
188 <description>The ID of the user who performed the last transition
</description>
191 <expression>user/getId
</expression>
196 <variable variable_id=
"comments" for_catalog=
"False"
197 for_status=
"True" update_always=
"True">
198 <description>Comments about the last transition
</description>
201 <expression>python:state_change.kwargs.get('comment', '')
</expression>
206 <variable variable_id=
"email_sent" for_catalog=
"False"
207 for_status=
"True" update_always=
"True">
210 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])
</expression>
215 <variable variable_id=
"review_history" for_catalog=
"False"
216 for_status=
"False" update_always=
"False">
217 <description>Provides access to workflow history
</description>
220 <expression>state_change/getHistory
</expression>
223 <guard-permission>Request review
</guard-permission>
224 <guard-permission>Review portal content
</guard-permission>
227 <variable variable_id=
"time" for_catalog=
"False"
228 for_status=
"True" update_always=
"True">
229 <description>Time of the last transition
</description>
232 <expression>state_change/getDateTime
</expression>
237 <script script_id=
"sendNotificationEmail"
238 type=
"Script (Python)"
239 filename=
"workflows/portfolio_workflow/scripts/sendNotificationEmail.py"
240 module=
"" function=
""/>