Projet

Général

Profil

Feature #587 » TestGroupes.xml

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

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

Copyright (C) 2000 - 2009 Silverpeas

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

As a special exception to the terms and conditions of version 3.0 of
the GPL, you may redistribute this Program in connection with Free/Libre
Open Source Software ("FLOSS") applications as described in Silverpeas's
FLOSS exception. You should have received a copy of the text describing
the FLOSS exception, and it is also available here:
"http://repository.silverpeas.com/legal/licensing"

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

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

-->

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

<label>Test relatedGroup</label>

<!-- DESCRIPTION DES ROLES -->
<roles>
<role name="Employe">
<label>Demandeur</label>
</role>
<role name="Responsable">
<label>Responsable</label>
</role>
<role name="supervisor">
<label>Superviseur</label>
</role>
</roles>

<!-- DEFINITION DES DONNEES UTILISATEUR -->
<!--<userInfos>
<item name="responsable">
<label>Responsable</label>
<type>user</type>
</item>
</userInfos>-->

<!-- DEFINITION DU DOSSIER -->
<dataFolder>
<item name="aText">
<label>Un texte</label>
<type>text</type>
</item>
<item name="interestedGroup">
<label>Groupe intress</label>
<type>group</type>
</item>
<item name="workingGroup">
<label>Groupe valideur</label>
<type>group</type>
</item>
<item name="motifRefus">
<label>Motif du refus</label>
<type>text</type>
</item>
<item name="commentaires">
<label>Commentaires</label>
<type>text</type>
</item>
</dataFolder>

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

<!-- DESCRIPTION DES PARTICIPANTS -->
<participants>
<participant name="Demandeur" state="" role="Employe">
<label>Demandeur</label>
</participant>
</participants>

<!-- DESCRIPTION DES ÉTATS -->
<states>
<state name="AttenteValidation">
<label>En attente d'acceptation</label>
<workingUsers>
<relatedGroup folderItem="workingGroup" role="Responsable"/>
</workingUsers>
<interestedUsers>
<relatedGroup folderItem="interestedGroup" role="Responsable"/>
<relatedUser participant="Demandeur" role="Employe"/>
</interestedUsers>
<allowedActions>
<allow action="Accepter"/>
<allow action="Refuser"/>
</allowedActions>
</state>

<state name="Acceptee">
<label>Accepte</label>
<workingUsers role="Employe">
<relatedUser participant="Demandeur"/>
</workingUsers>
<interestedUsers>
<userInRole name="Responsable"/>
</interestedUsers>
<!--<allowedActions>
<allow action="Valider"/>
<allow action="Refuser"/>
</allowedActions>-->
</state>

<state name="Refusee">
<label>Refuse</label>
<workingUsers role="Employe">
<relatedUser participant="Demandeur"/>
</workingUsers>
<interestedUsers>
<userInRole name="Responsable"/>
</interestedUsers>
<!--<allowedActions>
<allow action="Supprimer"/>
</allowedActions>-->
</state>

</states>

<!-- DESCRIPTION DES ACTIONS -->
<actions>
<action name="Creation" form="creation" kind="create">
<label>Cration</label>
<description>Cration d'une nouvelle demande.</description>
<allowedUsers>
<userInRole name="Employe"/>
</allowedUsers>
<consequences>
<consequence>
<set state="AttenteValidation"/>
<notify message="Merci de valider la demande de ${action.Creation.actor}">
<relatedGroup folderItem="workingGroup"/>
</notify>
</consequence>
</consequences>
</action>

<action name="Accepter" form="acceptation">
<label>Accepter</label>
<allowedUsers>
<relatedGroup folderItem="workingGroup"/>
</allowedUsers>
<consequences>
<consequence>
<set state="Acceptee"/>
<notify message="Votre demande a t accepte.">
<relatedUser participant="Demandeur"/>
</notify>
</consequence>
</consequences>
</action>

<action name="Refuser" form="refus">
<label>Refuser</label>
<allowedUsers>
<relatedGroup folderItem="workingGroup"/>
</allowedUsers>
<consequences>
<consequence>
<set state="Refusee"/>
<notify message="Votre demande a t refuse pour le motif suivant : ${folder.motifRefus}">
<relatedUser participant="Demandeur"/>
</notify>
</consequence>
</consequences>
</action>
</actions>

<!-- DEFINITION DES FORMULAIRES -->
<forms>
<form name="presentationForm">
<title>Demande</title>
<input value="${action.Creation.actor}" displayerName="simpletext">
<label>Demandeur</label>
</input>
<input value="${action.Creation.date}" displayerName="simpletext">
<label>Date de la demande</label>
</input>
<input item="aText" displayerName="simpletext"/>
<input item="workingGroup" displayerName="simpletext"/>
<input item="interestedGroup" displayerName="simpletext"/>
<input value="${action.Accepter.date}" displayerName="simpletext">
<label>Demande accepte le</label>
</input>
<input value="${action.Refuser.date}" displayerName="simpletext">
<label>Demande refuse le</label>
</input>
<input item="motifRefus" displayerName="simpletext"/>
</form>

<!-- Formulaire de cration -->
<form name="creation">
<title>Demande</title>
<input item="aText"/>
<input item="workingGroup" displayerName="group" mandatory="true"/>
<input item="interestedGroup" displayerName="group" mandatory="true" />
</form>

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

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