Project

General

Profile

Feature #587 » TestGroupes.xml

Exemple de modèle abstrait avec utilisation de l'élément relatedGroup - Nicolas Eysseric, 06/11/2010 10:24 AM

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

    
4
    Copyright (C) 2000 - 2009 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://repository.silverpeas.com/legal/licensing"
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="TestGroupes"
30
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
31
				  xsi:noNamespaceSchemaLocation="processModel.xsd">
32

    
33
	<label>Test relatedGroup</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
		</item>
54
	</userInfos>-->
55

    
56
	<!-- DEFINITION DU DOSSIER -->
57
	<dataFolder>
58
		<item name="aText">
59
			<label>Un texte</label>
60
			<type>text</type>
61
		</item>
62
		<item name="interestedGroup">
63
			<label>Groupe intress</label>
64
			<type>group</type>
65
		</item>
66
		<item name="workingGroup">
67
			<label>Groupe valideur</label>
68
			<type>group</type>
69
		</item>
70
		<item name="motifRefus">
71
			<label>Motif du refus</label>
72
			<type>text</type>
73
		</item>
74
		<item name="commentaires">
75
			<label>Commentaires</label>
76
			<type>text</type>
77
		</item>
78
	</dataFolder>
79

    
80
	<!-- PRESENTATION DES PROCEDURES EN COURS -->
81
	<presentation>
82
		<title role="Employe">Demande du ${action.Creation.date}</title>
83
		<title role="Responsable">Demande de ${action.Creation.actor}</title>
84
		<title role="supervisor">Demande de ${action.Creation.actor}</title>
85
	</presentation>
86

    
87
	<!-- DESCRIPTION DES PARTICIPANTS -->
88
	<participants>
89
		<participant name="Demandeur" state="" role="Employe">
90
			<label>Demandeur</label>
91
		</participant>
92
	</participants>
93

    
94
	<!-- DESCRIPTION DES ÉTATS -->
95
	<states>
96
		<state name="AttenteValidation">
97
			<label>En attente d'acceptation</label>
98
			<workingUsers>
99
				<relatedGroup folderItem="workingGroup" role="Responsable"/>
100
			</workingUsers>
101
			<interestedUsers>
102
				<relatedGroup folderItem="interestedGroup" role="Responsable"/>
103
				<relatedUser participant="Demandeur" role="Employe"/>
104
			</interestedUsers>
105
			<allowedActions>
106
				<allow action="Accepter"/>
107
				<allow action="Refuser"/>
108
			</allowedActions>
109
		</state>
110

    
111
		<state name="Acceptee">
112
			<label>Accepte</label>
113
			<workingUsers role="Employe">
114
				<relatedUser participant="Demandeur"/>
115
			</workingUsers>
116
			<interestedUsers>
117
				<userInRole name="Responsable"/>
118
			</interestedUsers>
119
			<!--<allowedActions>
120
				<allow action="Valider"/>
121
				<allow action="Refuser"/>
122
			</allowedActions>-->
123
		</state>
124

    
125
		<state name="Refusee">
126
			<label>Refuse</label>
127
			<workingUsers role="Employe">
128
				<relatedUser participant="Demandeur"/>
129
			</workingUsers>
130
			<interestedUsers>
131
				<userInRole name="Responsable"/>
132
			</interestedUsers>
133
			<!--<allowedActions>
134
				<allow action="Supprimer"/>
135
			</allowedActions>-->
136
		</state>
137

    
138
	</states>
139

    
140
	<!-- DESCRIPTION DES ACTIONS -->
141
	<actions>
142
		<action name="Creation" form="creation" kind="create">
143
			<label>Cration</label>
144
			<description>Cration d'une nouvelle demande.</description>
145
			<allowedUsers>
146
				<userInRole name="Employe"/>
147
			</allowedUsers>
148
			<consequences>
149
				<consequence>
150
					<set state="AttenteValidation"/>
151
					<notify message="Merci de valider la demande de ${action.Creation.actor}">
152
						<relatedGroup folderItem="workingGroup"/>
153
					</notify>
154
				</consequence>
155
			</consequences>
156
		</action>
157

    
158
		<action name="Accepter" form="acceptation">
159
			<label>Accepter</label>
160
			<allowedUsers>
161
				<relatedGroup folderItem="workingGroup"/>
162
			</allowedUsers>
163
			<consequences>
164
				<consequence>
165
					<set state="Acceptee"/>
166
					<notify message="Votre demande a t accepte.">
167
						<relatedUser participant="Demandeur"/>
168
					</notify>
169
				</consequence>
170
			</consequences>
171
		</action>
172

    
173
		<action name="Refuser" form="refus">
174
			<label>Refuser</label>
175
			<allowedUsers>
176
				<relatedGroup folderItem="workingGroup"/>
177
			</allowedUsers>
178
			<consequences>
179
				<consequence>
180
					<set state="Refusee"/>
181
					<notify message="Votre demande a t refuse pour le motif suivant : ${folder.motifRefus}">
182
						<relatedUser participant="Demandeur"/>
183
					</notify>
184
				</consequence>
185
			</consequences>
186
		</action>
187
	</actions>
188

    
189
	<!-- DEFINITION DES FORMULAIRES -->
190
	<forms>
191
		<form name="presentationForm">
192
			<title>Demande</title>
193
		   <input value="${action.Creation.actor}" displayerName="simpletext">
194
			   <label>Demandeur</label>
195
			</input>
196
			<input value="${action.Creation.date}" displayerName="simpletext">
197
			   <label>Date de la demande</label>
198
			</input>
199
			<input item="aText" displayerName="simpletext"/>
200
			<input item="workingGroup" displayerName="simpletext"/>
201
			<input item="interestedGroup" displayerName="simpletext"/>
202
		   <input value="${action.Accepter.date}" displayerName="simpletext">
203
			   <label>Demande accepte le</label>
204
			</input>
205
			<input value="${action.Refuser.date}" displayerName="simpletext">
206
			   <label>Demande refuse le</label>
207
			</input>
208
		   <input item="motifRefus" displayerName="simpletext"/>
209
		</form>
210

    
211
		<!-- Formulaire de cration -->
212
		<form name="creation">
213
			<title>Demande</title>
214
			<input item="aText"/>
215
			<input item="workingGroup" displayerName="group" mandatory="true"/>
216
			<input item="interestedGroup" displayerName="group" mandatory="true" />
217
		</form>
218

    
219
		<!-- Formulaire de validation du responsable -->
220
		<form name="acceptation">
221
			<title>Acceptation de la demande</title>
222
			<input item="commentaires" displayerName="textarea"/>
223
		</form>
224

    
225
		<!-- Formulaire de refus du responsable -->
226
		<form name="refus">
227
			<title>Refus de la demande</title>
228
			<input item="motifRefus" displayerName="textarea"/>
229
		</form>
230
	</forms>
231
</processModel>
    (1-1/1)