1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <dc-workflow workflow_id=
"folder_workflow"
3 title=
"Plinn folder workflow" description=
""
4 state_variable=
"review_state"
5 initial_state=
"private" manager_bypass=
"False">
6 <permission>Manage properties
</permission>
7 <permission>Modify portal content
</permission>
8 <permission>View
</permission>
9 <state state_id=
"pending" title=
"">
10 <exit-transition transition_id=
"publish"/>
11 <exit-transition transition_id=
"reject"/>
12 <exit-transition transition_id=
"retract"/>
13 <permission-map name=
"Manage properties" acquired=
"False">
14 <permission-role>Manager
</permission-role>
15 <permission-role>Reviewer
</permission-role>
17 <permission-map name=
"Modify portal content"
19 <permission-role>Manager
</permission-role>
20 <permission-role>Reviewer
</permission-role>
22 <permission-map name=
"View" acquired=
"False">
23 <permission-role>Contributor
</permission-role>
24 <permission-role>Manager
</permission-role>
25 <permission-role>Owner
</permission-role>
26 <permission-role>Reader
</permission-role>
27 <permission-role>Reviewer
</permission-role>
30 <state state_id=
"private" title=
"">
31 <exit-transition transition_id=
"direct_publish"/>
32 <exit-transition transition_id=
"submit"/>
33 <permission-map name=
"Manage properties" acquired=
"False">
34 <permission-role>Contributor
</permission-role>
35 <permission-role>Manager
</permission-role>
36 <permission-role>Owner
</permission-role>
38 <permission-map name=
"Modify portal content"
40 <permission-role>Contributor
</permission-role>
41 <permission-role>Manager
</permission-role>
42 <permission-role>Owner
</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>
51 <state state_id=
"published" title=
"">
52 <exit-transition transition_id=
"reject"/>
53 <exit-transition transition_id=
"retract"/>
54 <permission-map name=
"Manage properties" acquired=
"False">
55 <permission-role>Manager
</permission-role>
57 <permission-map name=
"Modify portal content"
59 <permission-role>Manager
</permission-role>
61 <permission-map name=
"View" acquired=
"True">
62 <permission-role>Anonymous
</permission-role>
65 <transition transition_id=
"direct_publish"
66 title=
"Reviewer publishes content"
67 new_state=
"published" trigger=
"USER"
68 before_script=
"" after_script=
"">
69 <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)
</description>
70 <action url=
"%(content_url)s/content_publish_form?direct:boolean=True"
71 category=
"workflow" icon=
"">Publish
</action>
73 <guard-permission>Review portal content
</guard-permission>
74 <guard-expression>python:user.allowed(here, ['Owner'])
</guard-expression>
77 <transition transition_id=
"publish"
78 title=
"Reviewer publishes content"
79 new_state=
"published" trigger=
"USER"
80 before_script=
"" after_script=
"">
81 <action url=
"%(content_url)s/content_publish_form"
82 category=
"workflow" icon=
"">Publish
</action>
84 <guard-permission>Review portal content
</guard-permission>
87 <transition transition_id=
"reject"
88 title=
"Reviewer rejects submission"
89 new_state=
"private" trigger=
"USER"
90 before_script=
"" after_script=
"">
91 <action url=
"%(content_url)s/content_reject_form"
92 category=
"workflow" icon=
"">Reject
</action>
94 <guard-permission>Review portal content
</guard-permission>
97 <transition transition_id=
"retract"
98 title=
"Member retracts submission"
99 new_state=
"private" trigger=
"USER"
100 before_script=
"" after_script=
"">
101 <action url=
"%(content_url)s/content_retract_form"
102 category=
"workflow" icon=
"">Retract
</action>
104 <guard-permission>Request review
</guard-permission>
105 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))
</guard-expression>
108 <transition transition_id=
"submit"
109 title=
"Member requests publishing"
110 new_state=
"pending" trigger=
"USER"
111 before_script=
"" after_script=
"">
112 <action url=
"%(content_url)s/content_submit_form"
113 category=
"workflow" icon=
"">Submit
</action>
115 <guard-permission>Request review
</guard-permission>
118 <variable variable_id=
"action" for_catalog=
"False"
119 for_status=
"True" update_always=
"True">
120 <description>The last transition
</description>
123 <expression>transition/getId|nothing
</expression>
128 <variable variable_id=
"actor" for_catalog=
"False"
129 for_status=
"True" update_always=
"True">
130 <description>The ID of the user who performed the last transition
</description>
133 <expression>user/getId
</expression>
138 <variable variable_id=
"comments" for_catalog=
"False"
139 for_status=
"True" update_always=
"True">
140 <description>Comments about the last transition
</description>
143 <expression>python:state_change.kwargs.get('comment', '')
</expression>
148 <variable variable_id=
"email_sent" for_catalog=
"False"
149 for_status=
"True" update_always=
"True">
152 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])
</expression>
157 <variable variable_id=
"review_history" for_catalog=
"False"
158 for_status=
"False" update_always=
"False">
159 <description>Provides access to workflow history
</description>
162 <expression>state_change/getHistory
</expression>
165 <guard-permission>Request review
</guard-permission>
166 <guard-permission>Review portal content
</guard-permission>
169 <variable variable_id=
"time" for_catalog=
"False"
170 for_status=
"True" update_always=
"True">
171 <description>Time of the last transition
</description>
174 <expression>state_change/getDateTime
</expression>
179 <script script_id=
"sendNotificationEmail"
180 type=
"Script (Python)"
181 filename=
"workflows/folder_workflow/scripts/sendNotificationEmail.py"
182 module=
"" function=
""/>