<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:reviewpooled">
<swimlane name="initiator" />
<start-state name="start">
<task name="wf:submitGroupReviewTask" swimlane="initiator" />
<transition name="" to="review" />
</start-state>
<swimlane name="reviewer">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<pooledactors>#{bpm_groupAssignee}</pooledactors>
</assignment>
</swimlane>
<task-node name="review">
<task name="wf:reviewTask" swimlane="reviewer">
<event type="task-create">
<script>
if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
</script>
</event>
<event type="task-end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_assignee" access="write"/>
<expression>
if (taskInstance.actorId != null)
people.getPerson(taskInstance.actorId);
else
person;
</expression>
</script>
</action>
</event>
</task>
<transition name="reject" to="end" />
<transition name="approve" to="end" />
<event type="node-enter">
<!– Update the status to Rejected when we enter this task –>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var i = 0; i < bpm_package.children.length; i++)
{
bpm_package.children.properties["myrioridad"] = bpm_workflowPriority;
bpm_package.children.properties["my:estado"] = "Pendent";
bpm_package.children.properties["my:tecnico"] = Person;
bpm_package.children.save();
}
</script>
</action>
</event>
</task-node>
<task-node name="rejected">
<event type="node-enter">
<!– Update the status to Rejected when we enter this task –>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var z = 0; z < bpm_package.children.length; z++)
{
bpm_package.children[z].properties["myrioridad"] = bpm_workflowPriority;
bpm_package.children[z].properties["my:estado"] = "Rebutjat";
bpm_package.children[z].properties["my:tecnico"] = Person;
bpm_package.children[z].save();
}
</script>
</action>
</event>
<transition name="" to="end" />
</task-node>
<task-node name="approved">
<event type="node-enter">
<!– Update the status to Aproved when we enter this task –>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var a = 0; a < bpm_package.children.length; a++)
{
bpm_package.children[a].properties["myrioridad"] = bpm_workflowPriority;
bpm_package.children[a].properties["my:estado"] = "Aprobat";
bpm_package.children[a].properties["my:tecnico"] = Person;
bpm_package.children[a].save();
}
</script>
</action>
</event>
<transition name="" to="end" />
</task-node>
<end-state name="end" />
<event type="task-end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_assignee" access="write"/>
<expression>
if (taskInstance.actorId != null)
people.getPerson(taskInstance.actorId);
else
person;
</expression>
</script>
</action>
bpm_package.children.properties["my:tecnico"] = bpm_assignee.properties["cm:userName"];
aunque tambien he probado esto
bpm_package.children.properties["my:tecnico"] = Person;
y esto
bpm_package.children.properties["my:tecnico"] = people.getPerson(taskInstance.actorId);
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.