12-21-2011 08:41 AM
12-21-2011 09:15 AM
12-21-2011 10:13 AM
<?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://www.activiti.org/test">
<process id="MyTestProcess" name="MyTestProcess">
<documentation>Place documentation for the 'MyTestProcess' process here.</documentation>
<exclusiveGateway id="exclusivegateway1" name="Report for marketing"></exclusiveGateway>
<userTask id="usertask1" name="Review report" activiti:assignee="wmoons" activiti:formKey="loc:activitireportreview">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>/* next two lines are workarounds ACT-765, ACT-766 */
if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);</activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>logger.log("setting Marketing value to:" + task.getVariableLocal('loc_isMarketing'));
if(task.getVariableLocal('loc_isMarketing') == 'Yes') {
execution.setVariable('Marketing', 'Yes');
}
else{
execution.setVariable('Marketing', 'No');
}</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="flow2" name="" sourceRef="exclusivegateway1" targetRef="usertask2">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${Marketing == 'Yes'}]]></conditionExpression>
</sequenceFlow>
<userTask id="usertask2" name="Read marketing report" activiti:candidateGroups="GROUP_Marketing"></userTask>
<userTask id="usertask3" name="Read report" activiti:candidateGroups="GROUP_Sales"></userTask>
<sequenceFlow id="flow4" name="" sourceRef="exclusivegateway1" targetRef="usertask3">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${Marketing == 'No'}]]></conditionExpression>
</sequenceFlow>
<endEvent id="endevent2" name="End"></endEvent>
<sequenceFlow id="flow6" name="" sourceRef="usertask3" targetRef="mailtask1"></sequenceFlow>
<sequenceFlow id="flow7" name="" sourceRef="usertask1" targetRef="exclusivegateway1"></sequenceFlow>
<sequenceFlow id="flow9" name="" sourceRef="usertask2" targetRef="endevent2"></sequenceFlow>
<startEvent id="startevent1" name="Start"></startEvent>
<sequenceFlow id="flow10" name="" sourceRef="startevent1" targetRef="scripttask1"></sequenceFlow>
<scriptTask id="scripttask1" name="Script Task" scriptFormat="javascript">
<script><![CDATA[var Marketing = 'No';]]></script>
</scriptTask>
<sequenceFlow id="flow11" name="" sourceRef="scripttask1" targetRef="usertask1"></sequenceFlow>
<serviceTask id="mailtask1" name="Mail Task" activiti:type="mail">
<extensionElements>
<activiti:field name="to" expression="wimmoons@gmail.com"></activiti:field>
<activiti:field name="from" expression="helpdesk@loqutus.be"></activiti:field>
<activiti:field name="subject" expression="Report read"></activiti:field>
<activiti:field name="text">
<activiti:expression><![CDATA[The report has been reviewed]]></activiti:expression>
</activiti:field>
</extensionElements>
</serviceTask>
<sequenceFlow id="flow12" name="" sourceRef="mailtask1" targetRef="endevent2"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_MyTestProcess">
<bpmndi:BPMNPlane bpmnElement="MyTestProcess" id="BPMNPlane_MyTestProcess">
<bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
<omgdc:Bounds height="40" width="40" x="600" y="87"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="55" width="105" x="420" y="80"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
<omgdc:Bounds height="55" width="105" x="770" y="80"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
<omgdc:Bounds height="55" width="105" x="568" y="173"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
<omgdc:Bounds height="35" width="35" x="790" y="260"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35" width="35" x="200" y="90"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="scripttask1" id="BPMNShape_scripttask1">
<omgdc:Bounds height="55" width="105" x="290" y="80"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="mailtask1" id="BPMNShape_mailtask1">
<omgdc:Bounds height="55" width="105" x="600" y="294"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="640" y="107"></omgdi:waypoint>
<omgdi:waypoint x="770" y="107"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="620" y="127"></omgdi:waypoint>
<omgdi:waypoint x="620" y="173"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="620" y="228"></omgdi:waypoint>
<omgdi:waypoint x="652" y="294"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
<omgdi:waypoint x="525" y="107"></omgdi:waypoint>
<omgdi:waypoint x="600" y="107"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
<omgdi:waypoint x="822" y="135"></omgdi:waypoint>
<omgdi:waypoint x="807" y="260"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
<omgdi:waypoint x="235" y="107"></omgdi:waypoint>
<omgdi:waypoint x="290" y="107"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
<omgdi:waypoint x="395" y="107"></omgdi:waypoint>
<omgdi:waypoint x="420" y="107"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
<omgdi:waypoint x="705" y="321"></omgdi:waypoint>
<omgdi:waypoint x="807" y="321"></omgdi:waypoint>
<omgdi:waypoint x="807" y="295"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
02-17-2012 07:04 AM
02-17-2012 10:19 AM
// create mail action
var mail = actions.create("mail");
mail.parameters.to = "wimmoons@gmail.com";
mail.parameters.subject = "Report read";
mail.parameters.from = "helpdesk@loqutus.be";
mail.parameters.text = "The report has been reviewed";
// execute action against a document
mail.execute(bpm_package.children[0]);
02-17-2012 11:05 AM
06-13-2013 06:27 PM
02-20-2012 04:36 AM
05-18-2012 12:55 PM
05-20-2012 05:45 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.