2 <dc-workflow workflow_id=
"folder_workflow"
3 title=
"Plinn folder workflow" description=
""
4 state_variable=
"review_state"
5 initial_state=
"private" manager_bypass=
"0">
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 <permission-map name=
"Manage properties" acquired=
"False">
15 <permission-role>Manager
</permission-role>
16 <permission-role>Reviewer
</permission-role>
18 <permission-map name=
"Modify portal content"
20 <permission-role>Manager
</permission-role>
21 <permission-role>Reviewer
</permission-role>
23 <permission-map name=
"View" acquired=
"False">
24 <permission-role>Contributor
</permission-role>
25 <permission-role>Manager
</permission-role>
26 <permission-role>Owner
</permission-role>
27 <permission-role>Reader
</permission-role>
28 <permission-role>Reviewer
</permission-role>
31 <state state_id=
"private" title=
"">
32 <exit-transition transition_id=
"direct_publish"/>
33 <exit-transition transition_id=
"submit"/>
34 <permission-map name=
"Manage properties" acquired=
"False">
35 <permission-role>Contributor
</permission-role>
36 <permission-role>Manager
</permission-role>
37 <permission-role>Owner
</permission-role>
39 <permission-map name=
"Modify portal content"
41 <permission-role>Contributor
</permission-role>
42 <permission-role>Manager
</permission-role>
43 <permission-role>Owner
</permission-role>
45 <permission-map name=
"View" acquired=
"False">
46 <permission-role>Contributor
</permission-role>
47 <permission-role>Manager
</permission-role>
48 <permission-role>Owner
</permission-role>
49 <permission-role>Reader
</permission-role>
52 <state state_id=
"published" title=
"">
53 <exit-transition transition_id=
"reject"/>
54 <exit-transition transition_id=
"retract"/>
55 <permission-map name=
"Manage properties" acquired=
"False">
56 <permission-role>Manager
</permission-role>
58 <permission-map name=
"Modify portal content"
60 <permission-role>Manager
</permission-role>
62 <permission-map name=
"View" acquired=
"True">
63 <permission-role>Anonymous
</permission-role>
66 <transition transition_id=
"direct_publish"
67 title=
"Reviewer publishes content"
68 new_state=
"published" trigger=
"USER"
69 before_script=
"" after_script=
"">
70 <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)
</description>
71 <action url=
"%(content_url)s/content_publish_form?direct:boolean=True"
72 category=
"workflow">Publish
</action>
74 <guard-permission>Review portal content
</guard-permission>
75 <guard-expression>python:user.allowed(here, ['Owner'])
</guard-expression>
78 <transition transition_id=
"publish"
79 title=
"Reviewer publishes content"
80 new_state=
"published" trigger=
"USER"
81 before_script=
"" after_script=
"">
82 <action url=
"%(content_url)s/content_publish_form"
83 category=
"workflow">Publish
</action>
85 <guard-permission>Review portal content
</guard-permission>
88 <transition transition_id=
"reject"
89 title=
"Reviewer rejects submission"
90 new_state=
"private" trigger=
"USER"
91 before_script=
"" after_script=
"">
92 <action url=
"%(content_url)s/content_reject_form"
93 category=
"workflow">Reject
</action>
95 <guard-permission>Review portal content
</guard-permission>
98 <transition transition_id=
"retract"
99 title=
"Member retracts submission"
100 new_state=
"private" trigger=
"USER"
101 before_script=
"" after_script=
"">
102 <action url=
"%(content_url)s/content_retract_form"
103 category=
"workflow">Retract
</action>
105 <guard-permission>Request review
</guard-permission>
106 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))
</guard-expression>
109 <transition transition_id=
"submit"
110 title=
"Member requests publishing"
111 new_state=
"pending" trigger=
"USER"
112 before_script=
"" after_script=
"">
113 <action url=
"%(content_url)s/content_submit_form"
114 category=
"workflow">Submit
</action>
116 <guard-permission>Request review
</guard-permission>
119 <variable variable_id=
"action" for_catalog=
"False"
120 for_status=
"True" update_always=
"True">
121 <description>The last transition
</description>
124 <expression>transition/getId|nothing
</expression>
129 <variable variable_id=
"actor" for_catalog=
"False"
130 for_status=
"True" update_always=
"True">
131 <description>The ID of the user who performed the last transition
</description>
134 <expression>user/getId
</expression>
139 <variable variable_id=
"comments" for_catalog=
"False"
140 for_status=
"True" update_always=
"True">
141 <description>Comments about the last transition
</description>
144 <expression>python:state_change.kwargs.get('comment', '')
</expression>
149 <variable variable_id=
"email_sent" for_catalog=
"False"
150 for_status=
"True" update_always=
"True">
153 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])
</expression>
158 <variable variable_id=
"review_history" for_catalog=
"False"
159 for_status=
"False" update_always=
"False">
160 <description>Provides access to workflow history
</description>
163 <expression>state_change/getHistory
</expression>
166 <guard-permission>Request review
</guard-permission>
167 <guard-permission>Review portal content
</guard-permission>
170 <variable variable_id=
"time" for_catalog=
"False"
171 for_status=
"True" update_always=
"True">
172 <description>Time of the last transition
</description>
175 <expression>state_change/getDateTime
</expression>
180 <script script_id=
"sendNotificationEmail"
181 type=
"Script (Python)"
182 filename=
"workflows/folder_workflow/scripts/sendNotificationEmail.py"
183 module=
"" function=
""/>