04-19-2012 03:19 AM
04-20-2012 08:07 AM
04-23-2012 04:15 AM
04-23-2012 04:46 AM
08-16-2012 04:34 PM
<?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" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsmgdi="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="Process-test" name="process-test">
<documentation>Place documentation for the 'process-test' process here.</documentation>
<startEvent id="startevent1" name="Start"></startEvent>
<userTask id="sayHelloTask" name="Hello Activiti">
<extensionElements>
<activiti:taskListener event="create" class="com.odebrecht.activiti.assigment.MultiInstanceAssigment"></activiti:taskListener>
</extensionElements>
<multiInstanceLoopCharacteristics isSequential="false">
<loopDataInputRef>usuarios</loopDataInputRef>
<inputDataItem name="${assignee}"></inputDataItem>
</multiInstanceLoopCharacteristics>
</userTask>
<sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="sayHelloTask"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow2" name="" sourceRef="sayHelloTask" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_Process-test">
<bpmndi:BPMNPlane bpmnElement="Process-test" id="BPMNPlane_Process-test">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35" width="35" x="150" y="120"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sayHelloTask" id="BPMNShape_sayHelloTask">
<omgdc:Bounds height="55" width="105" x="290" y="110"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35" width="35" x="500" y="120"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="185" y="137"></omgdi:waypoint>
<omgdi:waypoint x="290" y="137"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="395" y="137"></omgdi:waypoint>
<omgdi:waypoint x="500" y="137"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
package com.odebrecht.activiti.assigment;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
public class MultiInstanceAssigment implements TaskListener{
@Override
public void notify(DelegateTask dt) {
ArrayList<String> usuarios = new ArrayList<String>();
usuarios.add("rcadenas");
usuarios.add("carlos");
usuarios.add("yonatha");
Collections.sort(usuarios);
dt.setVariableLocal("usuarios", usuarios);
}
}
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.