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">
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>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>Manager
</permission-role>
89 <permission-role>Owner
</permission-role>
90 <permission-role>Reader
</permission-role>
93 <state state_id=
"published" title=
"">
94 <exit-transition transition_id=
"reject"/>
95 <exit-transition transition_id=
"retract"/>
96 <permission-map name=
"Add portal content" acquired=
"False">
97 <permission-role>Manager
</permission-role>
99 <permission-map name=
"Change Images and Files"
101 <permission-role>Manager
</permission-role>
103 <permission-map name=
"Delete Owned Objects"
105 <permission-role>Manager
</permission-role>
107 <permission-map name=
"Delete objects" acquired=
"False">
108 <permission-role>Manager
</permission-role>
110 <permission-map name=
"Manage properties" acquired=
"False">
111 <permission-role>Manager
</permission-role>
113 <permission-map name=
"Modify portal content"
115 <permission-role>Manager
</permission-role>
117 <permission-map name=
"View" acquired=
"True">
118 <permission-role>Anonymous
</permission-role>
121 <transition transition_id=
"direct_publish"
122 title=
"Reviewer publishes content"
123 new_state=
"published" trigger=
"USER"
124 before_script=
"" after_script=
"">
125 <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)
</description>
126 <action url=
"%(content_url)s/content_publish_form?direct:boolean=True"
127 category=
"workflow">Publish
</action>
129 <guard-permission>Review portal content
</guard-permission>
130 <guard-expression>python:user.allowed(here, ['Owner'])
</guard-expression>
133 <transition transition_id=
"publish"
134 title=
"Reviewer publishes content"
135 new_state=
"published" trigger=
"USER"
136 before_script=
"" after_script=
"">
137 <action url=
"%(content_url)s/content_publish_form"
138 category=
"workflow">Publish
</action>
140 <guard-permission>Review portal content
</guard-permission>
143 <transition transition_id=
"reject"
144 title=
"Reviewer rejects submission"
145 new_state=
"private" trigger=
"USER"
146 before_script=
"" after_script=
"">
147 <action url=
"%(content_url)s/content_reject_form"
148 category=
"workflow">Reject
</action>
150 <guard-permission>Review portal content
</guard-permission>
153 <transition transition_id=
"retract"
154 title=
"Member retracts submission"
155 new_state=
"private" trigger=
"USER"
156 before_script=
"" after_script=
"">
157 <action url=
"%(content_url)s/content_retract_form"
158 category=
"workflow">Retract
</action>
160 <guard-permission>Request review
</guard-permission>
161 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))
</guard-expression>
164 <transition transition_id=
"submit"
165 title=
"Member requests publishing"
166 new_state=
"pending" trigger=
"USER"
167 before_script=
"" after_script=
"">
168 <action url=
"%(content_url)s/content_submit_form"
169 category=
"workflow">Submit
</action>
171 <guard-permission>Request review
</guard-permission>
174 <variable variable_id=
"action" for_catalog=
"False"
175 for_status=
"True" update_always=
"True">
176 <description>The last transition
</description>
179 <expression>transition/getId|nothing
</expression>
184 <variable variable_id=
"actor" for_catalog=
"False"
185 for_status=
"True" update_always=
"True">
186 <description>The ID of the user who performed the last transition
</description>
189 <expression>user/getId
</expression>
194 <variable variable_id=
"comments" for_catalog=
"False"
195 for_status=
"True" update_always=
"True">
196 <description>Comments about the last transition
</description>
199 <expression>python:state_change.kwargs.get('comment', '')
</expression>
204 <variable variable_id=
"email_sent" for_catalog=
"False"
205 for_status=
"True" update_always=
"True">
208 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])
</expression>
213 <variable variable_id=
"review_history" for_catalog=
"False"
214 for_status=
"False" update_always=
"False">
215 <description>Provides access to workflow history
</description>
218 <expression>state_change/getHistory
</expression>
221 <guard-permission>Request review
</guard-permission>
222 <guard-permission>Review portal content
</guard-permission>
225 <variable variable_id=
"time" for_catalog=
"False"
226 for_status=
"True" update_always=
"True">
227 <description>Time of the last transition
</description>
230 <expression>state_change/getDateTime
</expression>
235 <script script_id=
"sendNotificationEmail"
236 type=
"Script (Python)"
237 filename=
"workflows/portfolio_workflow/scripts/sendNotificationEmail.py"
238 module=
"" function=
""/>