IHM pour édition des indexes délégués à Solr.
[Plinn.git] / profiles / default / workflows / folder_workflow / definition.xml
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>
16 </permission-map>
17 <permission-map name="Modify portal content"
18 acquired="False">
19 <permission-role>Manager</permission-role>
20 <permission-role>Reviewer</permission-role>
21 </permission-map>
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>
28 </permission-map>
29 </state>
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>
37 </permission-map>
38 <permission-map name="Modify portal content"
39 acquired="False">
40 <permission-role>Contributor</permission-role>
41 <permission-role>Manager</permission-role>
42 <permission-role>Owner</permission-role>
43 </permission-map>
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>
49 </permission-map>
50 </state>
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>
56 </permission-map>
57 <permission-map name="Modify portal content"
58 acquired="False">
59 <permission-role>Manager</permission-role>
60 </permission-map>
61 <permission-map name="View" acquired="True">
62 <permission-role>Anonymous</permission-role>
63 </permission-map>
64 </state>
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>
72 <guard>
73 <guard-permission>Review portal content</guard-permission>
74 <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
75 </guard>
76 </transition>
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>
83 <guard>
84 <guard-permission>Review portal content</guard-permission>
85 </guard>
86 </transition>
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>
93 <guard>
94 <guard-permission>Review portal content</guard-permission>
95 </guard>
96 </transition>
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>
103 <guard>
104 <guard-permission>Request review</guard-permission>
105 <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
106 </guard>
107 </transition>
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>
114 <guard>
115 <guard-permission>Request review</guard-permission>
116 </guard>
117 </transition>
118 <variable variable_id="action" for_catalog="False"
119 for_status="True" update_always="True">
120 <description>The last transition</description>
121 <default>
122
123 <expression>transition/getId|nothing</expression>
124 </default>
125 <guard>
126 </guard>
127 </variable>
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>
131 <default>
132
133 <expression>user/getId</expression>
134 </default>
135 <guard>
136 </guard>
137 </variable>
138 <variable variable_id="comments" for_catalog="False"
139 for_status="True" update_always="True">
140 <description>Comments about the last transition</description>
141 <default>
142
143 <expression>python:state_change.kwargs.get('comment', '')</expression>
144 </default>
145 <guard>
146 </guard>
147 </variable>
148 <variable variable_id="email_sent" for_catalog="False"
149 for_status="True" update_always="True">
150 <default>
151
152 <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
153 </default>
154 <guard>
155 </guard>
156 </variable>
157 <variable variable_id="review_history" for_catalog="False"
158 for_status="False" update_always="False">
159 <description>Provides access to workflow history</description>
160 <default>
161
162 <expression>state_change/getHistory</expression>
163 </default>
164 <guard>
165 <guard-permission>Request review</guard-permission>
166 <guard-permission>Review portal content</guard-permission>
167 </guard>
168 </variable>
169 <variable variable_id="time" for_catalog="False"
170 for_status="True" update_always="True">
171 <description>Time of the last transition</description>
172 <default>
173
174 <expression>state_change/getDateTime</expression>
175 </default>
176 <guard>
177 </guard>
178 </variable>
179 <script script_id="sendNotificationEmail"
180 type="Script (Python)"
181 filename="workflows/folder_workflow/scripts/sendNotificationEmail.py"
182 module="" function=""/>
183 </dc-workflow>