07-09-2009 05:48 AM
<?xml version="1.0" encoding="utf-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="scwf:test">
<!–Definition des swimlanes–>
<swimlane name="initiator"></swimlane>
<swimlane name="assignee1">
<assignment actor-id="admin" />
</swimlane>
<swimlane name="assignee2">
<assignment actor-id="admin" />
</swimlane>
<!–Definition du processus–>
<start-state name="start">
<task name="scwf:submitReviewTask" swimlane="initiator" />
<transition name="submit" to="Submit">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<!– Ajout de l'aspect versionable au document concerne –>
<script>var test = bpm_package; var doc = test.children[0];
doc.addAspect("cm:versionable"); doc.save();</script>
</action>
</transition>
</start-state>
<node name="Submit">
<event type="node-enter">
<script>
<variable name="approveCount" access="read,write" />
<expression>approveCount=0;</expression>
</script>
</event>
<transition name="fork1" to="fork1" />
</node>
<fork name="fork1">
<transition name="Assignee1 review" to="Assignee1 review">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<!– Envoie du mail a assignee1 –>
</action>
</transition>
<transition name="Assignee2 review" to="Assignee2 review">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
</action>
</transition>
</fork>
<task-node name="Assignee1 review">
<task name="scwf:assignee1Review" swimlane="assignee1" />
<transition name="approve" to="join1">
<script>
<variable name="approveCount" access="read,write" />
<expression>approveCount = approveCount + 1;</expression>
</script>
</transition>
<transition name="reject" to="join1" />
</task-node>
<task-node name="Assignee2 review">
<task name="scwf:assignee2Review" swimlane="assignee2" />
<transition name="approve" to="join1">
<script>
<variable name="approveCount" access="read,write" />
<expression>approveCount = approveCount + 1;</expression>
</script>
</transition>
<transition name="reject" to="join1" />
</task-node>
<join name="join1">
<transition name="all approve" to="All approve" />
</join>
<decision name="All approve">
<transition name="reject" to="Revise">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<!– Envoie du mail a initiator si son rapport est rejete –>
</action>
</transition>
<transition name="end1" to="end1">
<condition>#{approveCount == 2}</condition>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<!– Envoie du mail a initiator si son rapport est approuve–>
</action>
</transition>
</decision>
<task-node name="Revise">
<task name="scwf:revise" swimlane="initiator"></task>
<transition name="submit" to="Submit">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<!– deplacement du fichier–>
<script>var dest = bpm_context.parent.childByNamePath("en
cours de relecture"); if(dest!=null) { for (var i = 0; i
< bpm_package.children.length; i++) {
bpm_package.children[i].move(dest); } }</script>
</action>
</transition>
<transition name="done" to="end1"></transition>
</task-node>
<end-state name="end1" />
</process-definition>
<?xml version="1.0" encoding="utf-8"?>
<model name="scwf:workflowmodel"
xmlns="http://www.alfresco.org/model/dictionary/1.0">
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0"
prefix="d" />
<import uri="http://www.alfresco.org/model/bpm/1.0"
prefix="bpm" />
</imports>
<namespaces>
<namespace uri="scwf.testModel" prefix="scwf" />
</namespaces>
<types>
<type name="scwf:submitReviewTask">
<parent>bpm:startTask</parent>
</type>
<type name="scwf:assignee1Review">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>read_package_item_actions</default>
</property>
</overrides>
</type>
<type name="scwf:assignee2Review">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>read_package_item_actions</default>
</property>
</overrides>
</type>
<type name="scwf:revise">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>edit_and_delete_wcm_package_item_actions</default>
</property>
</overrides>
</type>
</types>
</model>
<namespaces>
<namespace uri="scwf.testModel" prefix="scwf" />
</namespaces>
Vous avez ici mon dernier test.
# Test Definitions
scwf_test.workflow.title=Rapport au collège
scwf_test.workflow.description=Procédure d'envoie d'un rapport au collège
scwf_workflowmodel.type.scwf_submitReviewTask.title=Validation du rapport
scwf_workflowmodel.type.scwf_submitReviewTask.description=Validation d'un
rapport au collège
scwf_workflowmodel.type.scwf_assignee1Review.title=Validation Mr Boucqueau
scwf_workflowmodel.type.scwf_assignee1Review.description=Validation par Mr
Boucqueau
scwf_workflowmodel.type.scwf_assignee2Review.title=Validation Mr Gevenois
scwf_workflowmodel.type.scwf_assignee1Review.description=Validation par Mr
Gevenois
scwf_workflowmodel.type.scwf_revise.title=Révision
scwf_workflowmodel.type.scwf_revise.description=Révision du document
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Deploiement du modele –>
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/workflowMathieu/testModel.xml</value>
</list>
</property>
</bean>
<!– Deploiement du workflow test –>
<!– Deploiement de la definition –>
<bean id="extension.workflows.workflowBootstrap" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<props>
<prop key="engineId">jbpm</prop>
<prop key="location">alfresco/workflowMathieu/test_processdefinition.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">true</prop>
</props>
</list>
</property>
</bean>
<!– deploiement du .prop –>
<bean id="extension.workflowBootstrap" parent="workflowDeployer">
<property name="labels">
<list>
<value>.alfresco.workflowMathieu.workflow-messages</value>
</list>
</property>
</bean>
</beans>
<config evaluator="node-type" condition="scwf:assignee1Review"
replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general"
componentgenerator="HeaderSeparatorGenerator" />
<show-property name="bpm:description"
componentgenerator="TextAreaGenerator" read-only="true" />
<show-property name="bpm:comment"
componentgenerator="TextAreaGenerator" />
</property-sheet>
</config>
<!– Interface pour la tAche scwf:assignee2Review –>
<config evaluator="node-type" condition="scwf:assignee2Review"
replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general"
componentgenerator="HeaderSeparatorGenerator" />
<show-property name="bpm:description"
componentgenerator="TextAreaGenerator" read-only="true" />
<show-property name="bpm:comment"
componentgenerator="TextAreaGenerator" />
</property-sheet>
</config>
<!– Interface pour la tache scwf:revise –>
<config evaluator="node-type" condition="scwf:revise"
replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general"
componentgenerator="HeaderSeparatorGenerator" />
<show-property name="bpm:description"
componentgenerator="TextAreaGenerator" read-only="false" />
<show-property name="bpm:comment"
componentgenerator="TextAreaGenerator" />
</property-sheet>
</config>
07-30-2009 03:49 AM
Caused by: java.io.FileNotFoundException: class path resource [alfresco/workfl
s/test_processdefinition.xml] cannot be opened because it does not exist
07-30-2009 04:05 AM
07-30-2009 05:44 AM
07-30-2009 06:20 AM
08-03-2009 07:54 AM
08-03-2009 08:37 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.