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-09-2010 01:05 PM
<task-node name="review">
<task name="wf:reviewTask" swimlane="reviewer">
<event type="task-create">
<script>
bpm_package.children[0].properties['custom:statutdocument'] = 'En relecture';
bpm_package.children[0].save;
</script>
</event>
</task>
<transition name="approve" to="approved" />
<transition name="reject" to="rejected" />
</task-node>
04-12-2010 05:48 AM
04-12-2010 09:34 AM
04-12-2010 10:41 AM
<start-state name="start">
<task name="wf:submitReviewTask" swimlane="initiator" >
<event type="task-end">
<script>
<variable name="bpm_package" access="read,write" />
<expression>
bpm_package.children[0].properties["custom:statutdocument"] = "En relecture";
bpm_package.children[0].save();
</expression>
</script>
</event>
</task>
<transition name="" to="review" />
</start-state>
04-13-2010 08:47 AM
<start-state name="start">
<task name="wf:submitReviewTask" swimlane="initiator"/>
<transition name="" to="review">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_package" access="read" />
<expression>
bpm_package.children[0].properties["custom:statutdocument"] = "En relecture";
bpm_package.children[0].save();
</expression>
</script>
</action>
</transition>
</start-state>
04-13-2010 09:24 AM
04-13-2010 02:27 PM
But what is the difference with my other code ?It appears as though the <script> code prefers to be inside an <action> tag where class is AlfrescoJavaScript due to the fact that we are setting properties. Otherwise you would use:
04-14-2010 08:50 AM
04-14-2010 09:00 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.