<config evaluator="node-type" condition="wf:submitReviewTask" replace="true">
<property-sheet>
CODE ici
</property-sheet>
</config>
afin de surcharger ladite définition de l'affichage?
<props>
<!– WCM workflow definition –>
<prop key="engineId">jbpm</prop>
<prop key="location">alfresco/workflow/parallelreview_processdefinition.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">true</prop>
</props>
En redémarrant Alfresco, le nouveau workflow apparaît dans la liste des workflows avancés.
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:parallelreview">
<swimlane name="initiator" />
<start-state name="start">
<task name="wf:submitParallelReviewTask" swimlane="initiator" />
<transition name="" to="startreview"/>
</start-state>
<node name="startreview">
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
<foreach>#{bpm_assignees}</foreach>
<var>reviewer</var>
</action>
<event type="node-enter">
<script>
<variable name="wf_approveCount" access="write" />
<expression>
wf_approveCount = 0;
</expression>
</script>
</event>
<transition name="review" to="review">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
{
var mail = actions.create("mail");
mail.parameters.to = reviewer.properties.email;
mail.parameters.subject = "A workflow has been created for you";
mail.parameters.from = "alfresco@alfresco.com";
mail.parameters.text = "You have a TASK from";
mail.execute(bpm_package);
}
</script>
</action>
</transition>
</node>
<task-node name="review">
<task name="wf:reviewTask">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{reviewer}</actor>
</assignment>
<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="endreview" />
<transition name="approve" to="endreview">
<script>
<variable name="wf_approveCount" access="read,write" />
<expression>
wf_approveCount = wf_approveCount +1;
</expression>
</script>
</transition>
</task-node>
<join name="endreview">
<transition to="isapproved" />
</join>
<decision name="isapproved">
<event type="node-enter">
<script>
<variable name="wf_reviewerCount" access="write"/>
<variable name="wf_requiredPercent" access="write"/>
<variable name="wf_actualPercent" access="write"/>
<expression>
wf_requiredPercent = wf_requiredApprovePercent;
wf_reviewerCount = bpm_assignees.size();
wf_actualPercent = ((wf_approveCount * 100) / wf_reviewerCount);
</expression>
</script>
</event>
<transition name="reject" to="rejected" />
<transition name="approve" to="approved">
<condition>#{wf_actualPercent >= wf_requiredApprovePercent}</condition>
</transition>
</decision>
<task-node name="rejected">
<task name="wf:rejectedParallelTask" swimlane="initiator" />
<transition to="end" />
</task-node>
<task-node name="approved">
<task name="wf:approvedParallelTask" swimlane="initiator" />
<transition to="end" />
</task-node>
<end-state name="end"/>
</process-definition>
Une autre question me passe par la tête au passage….
Dans l'e-mail que j'écris aux personnes, serait-il possible de préciser dans le corps du texte le nom de la tâche que je leur ai donnée (par exemple "Tâche à faire"), le nom et prénom de la personne ayant initiée le workflow, le nom de l'espace dans lequel est situé le document ainsi que le lien direct vers le document?
Si oui, comment faire??
<transition name="reject" to="endreview">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
{
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "Workflow " + bpm_workflowDescription;
mail.parameters.from = "alfresco@alfresco.com";
mail.parameters.text = "Workflow rejetté.";
mail.execute(bpm_package);
}
</script>
</action>
</transition>
<transition name="reject" to="endreview" />
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.