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">
7 <permission>Manage properties
</permission>
8 <permission>Modify portal content
</permission>
9 <permission>View
</permission>
10 <state state_id=
"pending" title=
"">
11 <exit-transition transition_id=
"publish"/>
12 <exit-transition transition_id=
"reject"/>
13 <exit-transition transition_id=
"retract"/>
14 <exit-transition transition_id=
"send_email"/>
15 <permission-map name=
"Manage properties" acquired=
"False">
16 <permission-role>Manager
</permission-role>
17 <permission-role>Reviewer
</permission-role>
19 <permission-map name=
"Modify portal content"
21 <permission-role>Manager
</permission-role>
22 <permission-role>Reviewer
</permission-role>
24 <permission-map name=
"View" acquired=
"False">
25 <permission-role>Contributor
</permission-role>
26 <permission-role>Manager
</permission-role>
27 <permission-role>Owner
</permission-role>
28 <permission-role>Reader
</permission-role>
29 <permission-role>Reviewer
</permission-role>
32 <state state_id=
"private" title=
"">
33 <exit-transition transition_id=
"direct_publish"/>
34 <exit-transition transition_id=
"send_email"/>
35 <exit-transition transition_id=
"submit"/>
36 <permission-map name=
"Manage properties" acquired=
"False">
37 <permission-role>Contributor
</permission-role>
38 <permission-role>Manager
</permission-role>
39 <permission-role>Owner
</permission-role>
41 <permission-map name=
"Modify portal content"
43 <permission-role>Contributor
</permission-role>
44 <permission-role>Manager
</permission-role>
45 <permission-role>Owner
</permission-role>
47 <permission-map name=
"View" acquired=
"False">
48 <permission-role>Contributor
</permission-role>
49 <permission-role>Manager
</permission-role>
50 <permission-role>Owner
</permission-role>
51 <permission-role>Reader
</permission-role>
54 <state state_id=
"published" title=
"">
55 <exit-transition transition_id=
"reject"/>
56 <exit-transition transition_id=
"retract"/>
57 <exit-transition transition_id=
"send_email"/>
58 <permission-map name=
"Manage properties" acquired=
"False">
59 <permission-role>Manager
</permission-role>
61 <permission-map name=
"Modify portal content"
63 <permission-role>Manager
</permission-role>
65 <permission-map name=
"View" acquired=
"True">
66 <permission-role>Anonymous
</permission-role>
69 <transition transition_id=
"direct_publish"
70 title=
"Reviewer publishes content"
71 new_state=
"published" trigger=
"USER"
72 before_script=
"" after_script=
"">
73 <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)
</description>
74 <action url=
"%(content_url)s/content_publish_form?direct:boolean=True"
75 category=
"workflow">Publish
</action>
77 <guard-permission>Review portal content
</guard-permission>
78 <guard-expression>python:user.allowed(here, ['Owner'])
</guard-expression>
81 <transition transition_id=
"publish"
82 title=
"Reviewer publishes content"
83 new_state=
"published" trigger=
"USER"
84 before_script=
"" after_script=
"">
85 <action url=
"%(content_url)s/content_publish_form"
86 category=
"workflow">Publish
</action>
88 <guard-permission>Review portal content
</guard-permission>
91 <transition transition_id=
"reject"
92 title=
"Reviewer rejects submission"
93 new_state=
"private" trigger=
"USER"
94 before_script=
"" after_script=
"">
95 <action url=
"%(content_url)s/content_reject_form"
96 category=
"workflow">Reject
</action>
98 <guard-permission>Review portal content
</guard-permission>
101 <transition transition_id=
"retract"
102 title=
"Member retracts submission"
103 new_state=
"private" trigger=
"USER"
104 before_script=
"" after_script=
"">
105 <action url=
"%(content_url)s/content_retract_form"
106 category=
"workflow">Retract
</action>
108 <guard-permission>Request review
</guard-permission>
109 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))
</guard-expression>
112 <transition transition_id=
"send_email" title=
""
113 new_state=
"" trigger=
"USER" before_script=
""
115 <action url=
"%(content_url)s/send_email_form?wfid=folder_workflow"
116 category=
"workflow">Send an email
</action>
118 <guard-permission>View
</guard-permission>
119 <guard-role>Member
</guard-role>
122 <transition transition_id=
"submit"
123 title=
"Member requests publishing"
124 new_state=
"pending" trigger=
"USER"
125 before_script=
"" after_script=
"">
126 <action url=
"%(content_url)s/content_submit_form"
127 category=
"workflow">Submit
</action>
129 <guard-permission>Request review
</guard-permission>
132 <variable variable_id=
"action" for_catalog=
"False"
133 for_status=
"True" update_always=
"True">
134 <description>The last transition
</description>
137 <expression>transition/getId|nothing
</expression>
142 <variable variable_id=
"actor" for_catalog=
"False"
143 for_status=
"True" update_always=
"True">
144 <description>The ID of the user who performed the last transition
</description>
147 <expression>user/getId
</expression>
152 <variable variable_id=
"comments" for_catalog=
"False"
153 for_status=
"True" update_always=
"True">
154 <description>Comments about the last transition
</description>
157 <expression>python:state_change.kwargs.get('comment', '')
</expression>
162 <variable variable_id=
"email_sent" for_catalog=
"False"
163 for_status=
"True" update_always=
"True">
166 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])
</expression>
171 <variable variable_id=
"review_history" for_catalog=
"False"
172 for_status=
"False" update_always=
"False">
173 <description>Provides access to workflow history
</description>
176 <expression>state_change/getHistory
</expression>
179 <guard-permission>Request review
</guard-permission>
180 <guard-permission>Review portal content
</guard-permission>
183 <variable variable_id=
"time" for_catalog=
"False"
184 for_status=
"True" update_always=
"True">
185 <description>Time of the last transition
</description>
188 <expression>state_change/getDateTime
</expression>
193 <script script_id=
"sendNotificationEmail"
194 type=
"Script (Python)"
195 filename=
"workflows/folder_workflow/scripts/sendNotificationEmail.py"
196 module=
"" function=
""/>