04-09-2010 11:55 AM
<task-node name="review">
<task name="wf:reviewTask" swimlane="reviewer">
<event type="task-create">
<script>
document.properties['custom:statutdocument'] = 'En relecture';
document.save;
</script>
</event>
</task>
<transition name="approve" to="approved" />
<transition name="reject" to="rejected" />
</task-node>
04-15-2010 12:03 PM
<start-state name="start">
<task name="wf:submitReviewTask" swimlane="initiator"/>
<transition name="inReview" to="node1">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_package" access="read" />
<expression>
if(bpm_package.children[0].properties["custom:statutdocument"] != "Travail")
{
?END?
}
else
{
bpm_package.children[0].properties["custom:statutdocument"] = "En relecture";
bpm_package.children[0].save();
}
</expression>
</script>
</action>
</transition>
</start-state>
04-19-2010 05:29 AM
<exception-handler>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_package" access="read" />
<expression>
bpm_package.children[0].properties["custom:statutdocument"] != "Travail";
</expression>
</script>
</action>
</exception-handler>
04-19-2010 08:41 AM
<start-state name="start">
<task name="wf:submitReviewTask" swimlane="initiator"/>
<transition name="inReview" to="condition">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_package" access="read" />
<variable name="statutDoc" access="read,write" />
<expression>
statutDoc = bpm_package.children[0].properties["custom:statutdocument"];
</expression>
</script>
</action>
</transition>
</start-state>
<decision name="condition">
<transition name="conditionOK" to="sendMail">
<condition>
#{statutDoc == "Travail"}
</condition>
</transition>
<transition name="conditionKO" to="end">
<condition>
#{statutDoc != "Travail"}
</condition>
</transition>
</decision>
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.