08-02-2011 06:45 PM
<task-node name="phaseTwo">
<task name="stanwf:poPhaseTwoTask" swimlane="purchasingOperations">
<event type="task-create">
<script>
if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
</script>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
<variable name="phaseOneOption" access="read"/>
<variable name="orderDescription" access="read"/>
<variable name="phaseThreeRejected" access="read"/>
<variable name="bpm_package" access="read"/>
<variable name="initiator" access="read"/>
<expression>
<![CDATA[
<import resource="/Company Home/Data Dictionary/Scripts/powf-phase-two-task.js">
]]>
</expression>
</script>
</action>
</event>
<event type="task-end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
<variable name="phaseTwoEmail" access="read,write"/>
<variable name="people" access="read"/>
<variable name="tiComments" access="read,write"/>
<variable name="tiRejectReason" access="read,write"/>
<expression>
<![CDATA[
<import resource="/Company Home/Data Dictionary/Scripts/powf-phase-two-taskEnd.js">
]]>
</expression>
</script>
</action>
</event>
<timer duedate="3 hours" >
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="orderDescription" access="read"/>
<variable name="bpm_package" access="read"/>
<variable name="initiator" access="read"/>
<expression>
<![CDATA[
<import resource="/Company Home/Data Dictionary/Scripts/powf-phase-two-timer.js">
]]>
</expression>
</script>
</action>
</timer>
</task>
<transition name="Vendor Quote" to="phaseThree">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
<variable name="phaseTwoOption" access="write"/>
<expression>
phaseTwoOption = 2;
</expression>
</script>
</action>
</transition>
<transition name="Complete" to="phaseThree">
<script>
<variable name="phaseTwoOption" access="write"/>
<expression>
phaseTwoOption = 1;
</expression>
</script>
</transition>
<transition name="Reject" to="phaseOne">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
<variable name="orderDescription" access="read"/>
<variable name="bpm_package" access="read"/>
<variable name="initiator" access="read"/>
<variable name="phaseTwoEmail" access="read"/>
<variable name="tiComments" access="read"/>
<variable name="tiRejectReason" access="read"/>
<expression>
<![CDATA[
<import resource="/Company Home/Data Dictionary/Scripts/powf-phase-two-reject-transition.js">
]]>
</expression>
</script>
</action>
</transition>
</task-node>
phaseTwoEmail = people.getPerson(taskInstance.actorId);
tiComments = taskInstance.comments.get(0).message;
tiRejectReason = taskInstance.getVariable("stanwf_rejectReason");
org.alfresco.service.cmr.workflow.WorkflowException: 07020003 Failed to signal transition Reject from workflow task jbpm$36515
08-03-2011 03:29 PM
04-20-2012 01:59 AM
04-23-2012 09:46 AM
<event type="task-end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
<variable name="phaseTwoEmail" access="read,write"/>
<variable name="people" access="read"/>
<variable name="tiComments" access="read,write"/>
<variable name="tiRejectReason" access="read,write"/>
<expression>
<![CDATA[
<import resource="/Company Home/Data Dictionary/Scripts/powf-phase-two-taskEnd.js">
]]>
</expression>
</script>
</action>
</event>
var phaseTwoEmail = people.getPerson(taskInstance.actorId).properties["cm:email"];
executionContext.setVariable("phaseTwoEmail", phaseTwoEmail);
var tiComments = taskInstance.comments.get(0).message;
executionContext.setVariable("tiComments", tiComments);
var tiRejectReason = taskInstance.getVariable("stanwf_rejectReason");
executionContext.setVariable("tiRejectReason", tiRejectReason);
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.