<?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="" to="completed" />
<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"] = "Pendiente";
//con esta linea obtengo el grupo, pero en que momento podria obtener el usuario?
bpm_package.children.properties["my:tecnico"] = bpm_groupAssignee.properties["usr:authorityName"];
bpm_package.children.save();
}
</script>
</action>
</event>
</task-node>
<task-node name="completed">
<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"] = "Acabado";
bpm_package.children[a].properties["my:tecnico"] = bpm_groupAssignee.properties["usr:authorityName"];
bpm_package.children[a].save();
}
</script>
</action>
</event>
<transition name="" to="end" />
</task-node>
<end-state name="end" />
</process-definition>
var previousActor = search.luceneSearch("@cm\\:userName:\"" + taskInstance.previousActorId + "\"");
var actor = search.luceneSearch("@cm\\:userName:\"" + taskInstance.actorId + "\"");
ReferenceError: "taskInstance" is not defined
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.