<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
// some alfresco javascript
</script>
</action>
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:review">
<swimlane name="initiator" />
<start-state name="start">
<task name="wf:submitReviewTask" swimlane="initiator" />
<transition name="" to="review" />
</start-state>
<swimlane name="reviewer">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</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>
</task>
<transition name="reject" to="rejected" >
<!– Update the status to Rejected when we enter this task –>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
bpm_package.children[0].properties["my:prioridad"] = bpm_workflowPriority;
bpm_package.children[0].properties["my:estado"] = bpm_status;
bpm_package.children[0].properties["my:tecnico"] = bpm_assignee.properties["cm:userName"];
bpm_package.children[0].save();
var mail = actions.create("mail");
mail.parameters.to = initiator.properties["cm:email"];
mail.parameters.subject = "Notificacion de Tarea" + bpm_workflowDescription;
mail.parameters.from = "noreply@edu.gva.es"; //bpm_assignee.properties["cm:email"];
mail.parameters.text = "<p>No responda a este mensaje.</p><p>La tarea "+ bpm_workflowDescription +" ha sido RECHAZADA</p>";
mail.execute(bpm_package);
</script>
</action>
</transition>
<transition name="approve" to="approved" >
<!– Update the status to Rejected when we enter this task –>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
bpm_package.children[0].properties["my:prioridad"] = bpm_workflowPriority;
bpm_package.children[0].properties["my:estado"] = bpm_status;
bpm_package.children[0].properties["my:tecnico"] = bpm_assignee.properties["cm:userName"];
bpm_package.children[0].save();
var mail = actions.create("mail");
mail.parameters.to = initiator.properties["cm:email"];
mail.parameters.subject = "Notificacion de Tarea" + bpm_workflowDescription;
mail.parameters.from = "noreply@edu.gva.es"; //bpm_assignee.properties["cm:email"];
mail.parameters.text = "<p>No responda a este mensaje.</p><p>La tarea "+ bpm_workflowDescription +" ha sido RECHAZADA</p>";
mail.execute(bpm_package);
</script>
</action>
</transition>
</task-node>
<task-node name="rejected">
<task name="wf:rejectedTask" swimlane="initiator" />
<transition name="" to="end" />
</task-node>
<task-node name="approved">
<task name="wf:approvedTask" swimlane="initiator" />
<transition name="" to="end" />
</task-node>
<end-state name="end" />
<event type="process-end">
<!– Update the status to Approved when we enter this task –>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
bpm_package.children[0].properties["my:prioridad"] = bpm_workflowPriority;
bpm_package.children[0].properties["my:estado"] = bpm_status;
bpm_package.children[0].properties["my:tecnico"] = bpm_assignee.properties["cm:userName"];
bpm_package.children[0].save();
var mail = actions.create("mail");
mail.parameters.to = initiator.properties["cm:email"];
mail.parameters.subject = "Notificacion de Tarea" + bpm_workflowDescription;
mail.parameters.from = "noreply@edu.gva.es"; //bpm_assignee.properties["cm:email"];
mail.parameters.text = "<p>No responda a este mensaje.</p><p>La tarea "+ bpm_workflowDescription +" ha sido completada</p>";
mail.execute(bpm_package);
</script>
</action>
</event>
Failed to signal transition 'reject' from workflow task 'jbpm$59'
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.