As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<field-visibility> <show id="bpm:workflowDescription" /> <show id="bpm:workflowDueDate" /> <show id="bpm:workflowPriority" /> <show id="bpm:assignees" /> <show id="wf:requiredApprovePercent" /> <show id="packageItems" /> <show id="bpm:sendEMailNotifications" /> </field-visibility> <appearance> <set id="" appearance="title" label-id="workflow.set.general" /> <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" /> <set id="assignee" appearance="title" label-id="workflow.set.assignees" /> <set id="items" appearance="title" label-id="workflow.set.items" /> <set id="other" appearance="title" label-id="workflow.set.other" /> <field id="bpm:workflowDescription" label-id="workflow.field.message"> <control template="/org/alfresco/components/form/controls/textarea.ftl"> <control-param name="style">width: 95%</control-param> </control> </field> <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info" /> <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info"> <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" /> </field> <field id="wf:requiredApprovePercent" set="assignee" /> <field id="bpm:assignees" label-id="workflow.field.reviewers" set="assignee" /> <field id="packageItems" set="items" /> <field id="bpm:sendEMailNotifications" set="other"> <control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl" /> </field> </appearance> </form>
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://activiti.org/bpmn20"> <process id="capitalExpenApproval" name="Purchase team expense Parallel Review And Approve Activiti Process" isExecutable="true"> <extensionElements> <activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"> <activiti:field name="script"> <activiti:string><![CDATA[execution.setVariable('wf_approveCount', 0); execution.setVariable('wf_actualPercent', 0); execution.setVariable('wf_reviewerCount', bpm_assignees.size()); execution.setVariable('wf_requiredPercent', wf_requiredApprovePercent);]]></activiti:string> </activiti:field> </activiti:executionListener> </extensionElements> <userTask id="reviewTask" name="Review Task" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="lnpwf:assigneeReviewTask"> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate); if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;]]></activiti:string> </activiti:field> </activiti:taskListener> <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string><![CDATA[if(task.getVariableLocal('wf_reviewOutcome') == 'Approve') { var newApprovedCount = wf_approveCount + 1; var newApprovedPercentage = (newApprovedCount / wf_reviewerCount) * 100; execution.setVariable('wf_approveCount', newApprovedCount); execution.setVariable('wf_actualPercent', newApprovedPercentage); }]]></activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> <humanPerformer> <resourceAssignmentExpression> <formalExpression>${reviewAssignee.properties.userName}</formalExpression> </resourceAssignmentExpression> </humanPerformer> <multiInstanceLoopCharacteristics isSequential="true" activiti:collection="bpm_assignees" activiti:elementVariable="reviewAssignee"> <loopDataInputRef>bpm_assignees</loopDataInputRef> <inputDataItem name="reviewAssignee" /> <completionCondition>${wf_actualPercent >= wf_requiredApprovePercent}</completionCondition> </multiInstanceLoopCharacteristics> </userTask> <sequenceFlow id="flow2" sourceRef="reviewTask" targetRef="reviewDecision"></sequenceFlow> <exclusiveGateway id="reviewDecision" name="Review Decision"></exclusiveGateway> <sequenceFlow id="flow3" sourceRef="reviewDecision" targetRef="approved"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_actualPercent >= wf_requiredApprovePercent}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="flow4" sourceRef="reviewDecision" targetRef="rejected"></sequenceFlow> <userTask id="approved" name="Document Approved" activiti:assignee="${initiator.properties.userName}" activiti:formKey="wf:approvedParallelTask"> <documentation>The document was reviewed and approved.</documentation> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate); if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; // Set parallel review params on task, to be kept in history task.setVariableLocal('wf_reviewerCount', wf_reviewerCount); task.setVariableLocal('wf_requiredPercent', wf_requiredPercent); task.setVariableLocal('wf_actualPercent', wf_actualPercent); task.setVariableLocal('wf_approveCount', wf_approveCount);]]></activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> </userTask> <userTask id="rejected" name="Document Rejected" activiti:assignee="${initiator.properties.userName}" activiti:formKey="wf:rejectedParallelTask"> <documentation>The document was reviewed and rejected.</documentation> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate); if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; // Set parallel review params on task, to be kept in history task.setVariableLocal('wf_reviewerCount', wf_reviewerCount); task.setVariableLocal('wf_requiredPercent', wf_requiredPercent); task.setVariableLocal('wf_actualPercent', wf_actualPercent); task.setVariableLocal('wf_approveCount', wf_approveCount);]]></activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> </userTask> <sequenceFlow id="flow5" sourceRef="approved" targetRef="end"></sequenceFlow> <sequenceFlow id="flow6" sourceRef="rejected" targetRef="end"></sequenceFlow> <endEvent id="end"></endEvent> <startEvent id="capitalExpenApproval" name="Purchase team expense Parallel Review And Approve Activiti Process" activiti:formKey="lnpwf:submitParalReviewTask"></startEvent> <sequenceFlow id="flow7" sourceRef="capitalExpenApproval" targetRef="reviewTask"></sequenceFlow> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_capitalExpenApproval"> <bpmndi:BPMNPlane bpmnElement="capitalExpenApproval" id="BPMNPlane_capitalExpenApproval"> <bpmndi:BPMNShape bpmnElement="reviewTask" id="BPMNShape_reviewTask"> <omgdc:Bounds height="55.0" width="105.0" x="105.0" y="190.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="reviewDecision" id="BPMNShape_reviewDecision"> <omgdc:Bounds height="40.0" width="40.0" x="250.0" y="197.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="approved" id="BPMNShape_approved"> <omgdc:Bounds height="55.0" width="105.0" x="330.0" y="137.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="rejected" id="BPMNShape_rejected"> <omgdc:Bounds height="55.0" width="105.0" x="330.0" y="257.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end"> <omgdc:Bounds height="35.0" width="35.0" x="620.0" y="147.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="capitalExpenApproval" id="BPMNShape_capitalExpenApproval"> <omgdc:Bounds height="45.0" width="51.0" x="20.0" y="195.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> <omgdi:waypoint x="210.0" y="217.0"></omgdi:waypoint> <omgdi:waypoint x="250.0" y="217.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"> <omgdi:waypoint x="270.0" y="197.0"></omgdi:waypoint> <omgdi:waypoint x="270.0" y="164.0"></omgdi:waypoint> <omgdi:waypoint x="330.0" y="164.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4"> <omgdi:waypoint x="270.0" y="237.0"></omgdi:waypoint> <omgdi:waypoint x="270.0" y="284.0"></omgdi:waypoint> <omgdi:waypoint x="330.0" y="284.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5"> <omgdi:waypoint x="435.0" y="164.0"></omgdi:waypoint> <omgdi:waypoint x="620.0" y="164.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6"> <omgdi:waypoint x="435.0" y="284.0"></omgdi:waypoint> <omgdi:waypoint x="637.0" y="284.0"></omgdi:waypoint> <omgdi:waypoint x="637.0" y="182.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7"> <omgdi:waypoint x="71.0" y="217.0"></omgdi:waypoint> <omgdi:waypoint x="105.0" y="217.0"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>
<?xml version="1.0" encoding="UTF-8"?> <model name="lnpwf:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"/> <import uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> </imports> <namespaces> <namespace uri="http://www.lexisnexis.com/purchase/workflow/1.0" prefix="lnpwf"/> </namespaces> <types> <type name="lnpwf:submitParalReviewTask"> <!– <parent>wf:submitParallelReviewTask</parent> –> <parent>bpm:startTask</parent> <mandatory-aspects> <aspect>bpm:assignees</aspect> </mandatory-aspects> </type> <type name="lnpwf:assigneeReviewTask"> <parent>wf:activitiReviewTask</parent> </type> </types> </model>