Introduction du callback « progressHandlerCB ».
[Plinn.git] / profiles / default / workflows / member_workflow / definition.xml
1 <?xml version="1.0"?>
2 <dc-workflow workflow_id="member_workflow"
3 title="Plinn member registration workflow"
4 description="" state_variable="review_state"
5 initial_state="m_initial"
6 manager_bypass="False">
7
8 <state state_id="m_initial" title="">
9 <exit-transition transition_id="create"/>
10 <exit-transition transition_id="silent_register"/>
11 </state>
12 <state state_id="m_pending" title="">
13 <exit-transition transition_id="register"/>
14 <exit-transition transition_id="reject"/>
15 </state>
16 <state state_id="m_registered" title="">
17 </state>
18 <state state_id="m_rejected" title="">
19 </state>
20 <transition transition_id="create" title=""
21 new_state="m_pending" trigger="AUTOMATIC"
22 before_script="" after_script="">
23
24 <guard>
25 <guard-expression>python:state_change.getPortal().portal_membership.isAnonymousUser()</guard-expression>
26 </guard>
27 </transition>
28 <transition transition_id="register"
29 title="Register member"
30 new_state="m_registered" trigger="USER"
31 before_script="before_register"
32 after_script="sendNotificationEmail">
33
34 <guard>
35 <guard-permission>Manage Groups</guard-permission>
36 <guard-permission>Set Member Properties</guard-permission>
37 </guard>
38 </transition>
39 <transition transition_id="reject"
40 title="Reviewer rejects registration"
41 new_state="" trigger="USER" before_script=""
42 after_script="after_reject">
43
44 <guard>
45 <guard-permission>Manage Groups</guard-permission>
46 <guard-permission>Set Member Properties</guard-permission>
47 <guard-permission>Remove member</guard-permission>
48 </guard>
49 </transition>
50 <transition transition_id="silent_register" title=""
51 new_state="m_registered" trigger="AUTOMATIC"
52 before_script="before_register" after_script="">
53
54 <guard>
55 <guard-permission>Manage Groups</guard-permission>
56 <guard-permission>Set Member Properties</guard-permission>
57 </guard>
58 </transition>
59 <worklist worklist_id="reviewer_queue" title="">
60 <description>Reviewer tasks</description>
61 <action url="%(portal_url)s/pending_members"
62 category="global">Membres en attente (%(count)d)</action>
63 <guard>
64 <guard-permission>Set Member Properties</guard-permission>
65 </guard>
66 <match name="review_state" values="m_pending"/>
67 </worklist>
68 <variable variable_id="action" for_catalog="False"
69 for_status="True" update_always="True">
70 <description>The last transition</description>
71 <default>
72
73 <expression>transition/getId|nothing</expression>
74 </default>
75 <guard>
76 </guard>
77 </variable>
78 <variable variable_id="actor" for_catalog="False"
79 for_status="True" update_always="True">
80 <description>The ID of the user who performed the last transition</description>
81 <default>
82
83 <expression>user/getId</expression>
84 </default>
85 <guard>
86 </guard>
87 </variable>
88 <variable variable_id="comments" for_catalog="False"
89 for_status="True" update_always="True">
90 <description>Comments about the last transition</description>
91 <default>
92
93 <expression>python:state_change.kwargs.get('comment', '')</expression>
94 </default>
95 <guard>
96 </guard>
97 </variable>
98 <variable variable_id="review_history" for_catalog="False"
99 for_status="False" update_always="False">
100 <description>Provides access to workflow history</description>
101 <default>
102
103 <expression>state_change/getHistory</expression>
104 </default>
105 <guard>
106 <guard-permission>Request review</guard-permission>
107 <guard-permission>Review portal content</guard-permission>
108 </guard>
109 </variable>
110 <variable variable_id="time" for_catalog="False"
111 for_status="True" update_always="True">
112 <description>Time of the last transition</description>
113 <default>
114
115 <expression>state_change/getDateTime</expression>
116 </default>
117 <guard>
118 </guard>
119 </variable>
120 <script script_id="after_reject" type="Script (Python)"
121 filename="workflows/member_workflow/scripts/after_reject.py"
122 module="" function=""/>
123 <script script_id="before_register" type="Script (Python)"
124 filename="workflows/member_workflow/scripts/before_register.py"
125 module="" function=""/>
126 <script script_id="sendNotificationEmail"
127 type="Script (Python)"
128 filename="workflows/member_workflow/scripts/sendNotificationEmail.py"
129 module="" function=""/>
130 </dc-workflow>