02-20-2008 08:06 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 class="org.alfresco.repo.workflow.jpbm.AlfrescoAssignment">
<pooledactors>#{people.getGroup('GROUP_infochef')}</pooledactors>
</assignment>
–>
<assignment actor-id="xxxxxx"/>
</swimlane>
<swimlane name="assignee2">
<!–
<assignment class="org.alfresco.repo.workflow.jpbm.AlfrescoAssignment">
<pooledactors>#{people.getGroup('GROUP_secretaire')}</pooledactors>
</assignment>
–>
<assignment actor-id="yyyyyy"/>
</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">
<script>
var doc = userhome.createFile("test.txt");
doc.content = "Texte seulement pour le test.";
</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">
</transition>
</node>
<fork name="fork1">
<transition name="Assignee1 review" to="Assignee1 review"/>
<transition name="Assignee2 review" to="Assignee2 review"/>
</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"/>
<transition name="end1" to="end1">
<condition>#{approveCount == 2}</condition>
</transition>
</decision>
<task-node name="Revise">
<task name="scwf:revise" swimlane="initiator"></task>
<transition name="submit" to="Submit"></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="alfresco.extension.workflows.simple-process" 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_package_item_actions</default>
</property>
</overrides>
</type>
</types>
</model>
02-22-2008 10:57 AM
02-22-2008 11:15 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.