Project

General

Profile

Bug #5046 » DemandeCongesSimple.xml

Exemple de workflow permettant de tester le problème et sa correction - Nicolas Eysseric, 10/22/2013 03:42 PM

 
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3

    
4
    Copyright (C) 2000 - 2012 Silverpeas
5

    
6
    This program is free software: you can redistribute it and/or modify
7
    it under the terms of the GNU Affero General Public License as
8
    published by the Free Software Foundation, either version 3 of the
9
    License, or (at your option) any later version.
10

    
11
    As a special exception to the terms and conditions of version 3.0 of
12
    the GPL, you may redistribute this Program in connection with Free/Libre
13
    Open Source Software ("FLOSS") applications as described in Silverpeas's
14
    FLOSS exception.  You should have received a copy of the text describing
15
    the FLOSS exception, and it is also available here:
16
    "http://www.silverpeas.org/docs/core/legal/floss_exception.html"
17

    
18
    This program is distributed in the hope that it will be useful,
19
    but WITHOUT ANY WARRANTY; without even the implied warranty of
20
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
    GNU Affero General Public License for more details.
22

    
23
    You should have received a copy of the GNU Affero General Public License
24
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
25

    
26
-->
27

    
28
<!-- PROCÉDURE : DEMANDE DE CONGES SIMPLIFIEE -->
29
<processModel name="DemandeCongesSimple"
30
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
31
				  xsi:noNamespaceSchemaLocation="processModel.xsd">
32

    
33
	<label>Demande de congés simplifiée</label>
34

    
35
	<!-- DESCRIPTION DES ROLES -->
36
	<roles>
37
		<role name="Employe">
38
			<label>Demandeur</label>
39
		</role>
40
		<role name="Responsable">
41
			<label>Responsable</label>
42
		</role>
43
		<role name="supervisor">
44
			<label>Superviseur</label>
45
		</role>
46
	</roles>
47

    
48
	<!-- DEFINITION DES DONNEES UTILISATEUR -->
49
	<userInfos>
50
		<item name="responsable">
51
			<label>Responsable</label>
52
			<type>user</type>
53
			<param name="usersOfInstanceOnly" value="true"/>
54
			<param name="roles" value="Responsable"/>
55
		</item>
56
	</userInfos>
57

    
58
	<!-- DEFINITION DU DOSSIER -->
59
	<dataFolder>
60
		<item name="nature">
61
			<label>Type de congés</label>
62
			<type>text</type>
63
			<param name="keys" value="Congés payés##RTT##Congés sans solde##Récupération##Autre"/>
64
		</item>
65
		<item name="natureAutre">
66
			<label>Autre type de congés</label>
67
			<type>text</type>
68
		</item>
69
		<item name="duree">
70
			<label>Nombre de jours</label>
71
			<type>text</type>
72
		</item>
73
		<item name="dateDebut">
74
			<label>Date de début</label>
75
			<type>date</type>
76
		</item>
77
		<item name="dateFin">
78
			<label>Date de fin (inclus)</label>
79
			<type>date</type>
80
		</item>
81
		<item name="debutJourneeOuDemi">
82
			<label>Début (Journée/Matinée/Après-midi)</label>
83
			<type>text</type>
84
			<param name="keys" value="Journée##Matinée##Après-midi"/>
85
			<param name="cols" value="3"/>
86
		</item>
87
		<item name="finJourneeOuDemi">
88
			<label>Fin (Journée/Matinée/Après-midi)</label>
89
			<type>text</type>
90
			<param name="keys" value="Journée##Matinée##Après-midi"/>
91
			<param name="cols" value="3"/>
92
		</item>
93
		<item name="motifRefus">
94
			<label>Motif du refus</label>
95
			<type>text</type>
96
		</item>
97
		<item name="commentaires">
98
			<label>Commentaires</label>
99
			<type>text</type>
100
		</item>
101
		<item name="aFile">
102
			<label>Un fichier</label>
103
			<type>file</type>
104
		</item>
105
	</dataFolder>
106

    
107
	<!-- PRESENTATION DES PROCEDURES EN COURS -->
108
	<presentation>
109
		<title role="Employe">Congés du ${folder.dateDebut} (${folder.debutJourneeOuDemi}) au ${folder.dateFin} (${folder.finJourneeOuDemi})</title>
110
		<title role="Responsable">Demande de ${action.Creation.actor}</title>
111
		<title role="supervisor">Demande de ${action.Creation.actor}</title>
112
		<columns>
113
			<column item="nature"/>
114
			<column item="duree"/>
115
		</columns>
116
	</presentation>
117

    
118
	<!-- DESCRIPTION DES PARTICIPANTS -->
119
	<participants>
120
		<participant name="Demandeur" state="" role="Employe">
121
			<label>Demandeur</label>
122
		</participant>
123
	</participants>
124

    
125
	<!-- DESCRIPTION DES ÉTATS -->
126
	<states>
127
		<state name="AttenteValidation">
128
			<label>En attente d'acceptation par responsable</label>
129
			<workingUsers>
130
				<relatedUser participant="Demandeur" relation="responsable" role="Responsable"/>
131
			</workingUsers>
132
			<interestedUsers>
133
				<relatedUser participant="Demandeur" role="Employe"/>
134
			</interestedUsers>
135
			<allowedActions>
136
				<allow action="Accepter"/>
137
				<allow action="Refuser"/>
138
			</allowedActions>
139
		</state>
140

    
141
		<state name="Acceptee">
142
			<label>Acceptée</label>
143
			<workingUsers>
144
				<relatedUser participant="Demandeur" role="Employe"/>
145
			</workingUsers>
146
			<interestedUsers>
147
				<relatedUser participant="Demandeur" role="Employe"/>
148
				<relatedUser participant="Demandeur" relation="responsable" role="Responsable"/>
149
			</interestedUsers>
150
			<!--<allowedActions>
151
				<allow action="Valider"/>
152
				<allow action="Refuser"/>
153
			</allowedActions>-->
154
		</state>
155

    
156
		<state name="Refusee">
157
			<label>Refusée</label>
158
			<workingUsers>
159
				<relatedUser participant="Demandeur" role="Employe"/>
160
			</workingUsers>
161
			<interestedUsers>
162
				<relatedUser participant="Demandeur" role="Employe"/>
163
				<relatedUser participant="Demandeur" relation="responsable" role="Responsable"/>
164
			</interestedUsers>
165
			<!--<allowedActions>
166
				<allow action="Supprimer"/>
167
			</allowedActions>-->
168
		</state>
169

    
170
	</states>
171

    
172
	<!-- DESCRIPTION DES ACTIONS -->
173
	<actions>
174
		<action name="Creation" form="creation" kind="create">
175
			<label>Création</label>
176
			<description>Création d'une nouvelle demande.</description>
177
			<allowedUsers>
178
				<userInRole name="Employe"/>
179
			</allowedUsers>
180
			<consequences>
181
				<consequence>
182
					<set state="AttenteValidation"/>
183
					<notify message="Merci de valider les congés de ${action.Creation.actor} du ${folder.dateDebut} (${folder.debutJourneeOuDemi}) au ${folder.dateFin} (${folder.finJourneeOuDemi})">
184
						<relatedUser participant="Demandeur" relation="responsable" role="Responsable"/>
185
					</notify>
186
				</consequence>
187
			</consequences>
188
		</action>
189

    
190
		<action name="Accepter" form="acceptation">
191
			<label>Accepter</label>
192
			<allowedUsers>
193
				<userInRole name="Responsable"/>
194
			</allowedUsers>
195
			<consequences>
196
				<consequence>
197
					<set state="Acceptee"/>
198
					<notify message="Votre demande de congés du ${folder.dateDebut} au ${folder.dateFin} a été acceptée.">
199
						<relatedUser participant="Demandeur" role="Employe"/>
200
					</notify>
201
				</consequence>
202
			</consequences>
203
		</action>
204

    
205
		<action name="Refuser" form="refus">
206
			<label>Refuser</label>
207
			<allowedUsers>
208
				<userInRole name="Responsable"/>
209
			</allowedUsers>
210
			<consequences>
211
				<consequence>
212
					<set state="Refusee"/>
213
					<notify message="Votre demande de congés du ${folder.dateDebut} au ${folder.dateFin} a été refusée pour le motif suivant : ${folder.motifRefus}">
214
						<relatedUser participant="Demandeur" role="Employe"/>
215
					</notify>
216
				</consequence>
217
			</consequences>
218
		</action>
219
	</actions>
220

    
221
	<!-- DEFINITION DES FORMULAIRES -->
222
	<forms>
223
		<form name="presentationForm">
224
			<title>Demande de congés</title>
225
		   <input value="${action.Creation.actor}" displayerName="simpletext">
226
			   <label>Demandeur</label>
227
			</input>
228
			<input value="${action.Creation.date}" displayerName="simpletext">
229
			   <label>Date de la demande</label>
230
			</input>
231
			<input item="nature" displayerName="simpletext"/>
232
			<input item="natureAutre" displayerName="simpletext"/>
233
			<input item="dateDebut" displayerName="simpletext"/>
234
			<input item="debutJourneeOuDemi" displayerName="radio"/>
235
			<input item="dateFin" displayerName="simpletext"/>
236
			<input item="finJourneeOuDemi" displayerName="radio"/>
237
			<input item="duree" displayerName="simpletext"/>
238
            <input item="aFile" displayerName="file" readonly="true"/>	   
239
		   <input value="${action.Accepter.date}" displayerName="simpletext">
240
			   <label>Congés acceptés le</label>
241
			</input>
242
			<input value="${action.Refuser.date}" displayerName="simpletext">
243
			   <label>Congés refusés le</label>
244
			</input>
245
		   <input item="motifRefus" displayerName="simpletext"/>
246
		</form>
247

    
248
		<form name="printForm" HTMLFileName="/weblib/processManager/DemandeConges/DemandeConges.html">
249
		</form>
250

    
251
		<!-- Formulaire de création -->
252
		<form name="creation">
253
			<title>Demande de congés</title>
254
			<input item="nature" displayerName="listbox" mandatory="true"/>
255
			<input item="natureAutre"/>
256
			<input item="dateDebut" mandatory="true"/>
257
			<input item="debutJourneeOuDemi" displayerName="radio" mandatory="true" />
258
			<input item="dateFin" mandatory="true"/>
259
			<input item="finJourneeOuDemi" displayerName="radio" mandatory="true" />
260
			<input item="duree" mandatory="true"/>
261
			<input item="aFile" />
262
		</form>
263

    
264
		<!-- Formulaire de validation du responsable -->
265
		<form name="acceptation">
266
			<title>Acceptation de la demande</title>
267
			<input item="commentaires" displayerName="textarea"/>
268
		</form>
269

    
270
		<!-- Formulaire de refus du responsable -->
271
		<form name="refus">
272
			<title>Refus de la demande</title>
273
			<input item="motifRefus" displayerName="textarea"/>
274
		</form>
275
	</forms>
276
</processModel>
    (1-1/1)