08-06-2015 03:42 PM
org.activiti.engine.impl.pvm.PvmException: already taking a transition
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:443)
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="Examples" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd">
<process id="testProcess" name="Test process">
<startEvent id="start"/>
<sequenceFlow sourceRef="start" targetRef="listTask"/>
<scriptTask id="listTask" name="Create List" scriptFormat="groovy">
<script>
out:println "Task 1: creating list"
def list = []
list.add("item1")
list.add("item2")
execution.setVariable("list", list)
</script>
</scriptTask>
<sequenceFlow sourceRef="listTask" targetRef="decisionSubprocess"/>
<subProcess id="decisionSubprocess" name="Subprocess">
<multiInstanceLoopCharacteristics
isSequential="false" activiti:collection="${list}"
activiti:elementVariable="item">
</multiInstanceLoopCharacteristics>
<startEvent id="decisionStart"/>
<sequenceFlow sourceRef="decisionStart" targetRef="decisionTask"/>
<scriptTask id="decisionTask" name="Decide" scriptFormat="groovy">
<script>
sleep(3000)
out:println "List " + execution.getVariable("item")
execution.setVariable("accepted", 0)
</script>
</scriptTask>
<sequenceFlow sourceRef="decisionTask" targetRef="notificationAccepted" />
<exclusiveGateway id="notificationAccepted"/>
<sequenceFlow sourceRef="notificationAccepted" targetRef="changesRejectedEvent">
<conditionExpression>
${accepted == 0}
</conditionExpression>
</sequenceFlow>
<endEvent id="changesRejectedEvent">
<errorEventDefinition errorRef="changesRejected"/>
</endEvent>
<sequenceFlow sourceRef="notificationAccepted" targetRef="decisionEnd">
<conditionExpression>
${accepted == 1}
</conditionExpression>
</sequenceFlow>
<endEvent id="decisionEnd"/>
</subProcess>
<boundaryEvent id="timeoutEvent" attachedToRef="decisionSubprocess" cancelActivity="true">
<timerEventDefinition>
<timeDuration>PT2S</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<boundaryEvent id="errorEvent" attachedToRef="decisionSubprocess" cancelActivity="true">
<errorEventDefinition errorRef="changesRejected"/>
</boundaryEvent>
<sequenceFlow sourceRef="timeoutEvent" targetRef="timeout"/>
<scriptTask id="timeout" name="Post Timeout" scriptFormat="groovy">
<script>
out:println "Timeout occurred."
</script>
</scriptTask>
<sequenceFlow sourceRef="errorEvent" targetRef="error"/>
<scriptTask id="error" name="Post Decline" scriptFormat="groovy">
<script>
out:println "Some declined."
</script>
</scriptTask>
<sequenceFlow sourceRef="error" targetRef="end"/>
<sequenceFlow sourceRef="timeout" targetRef="end"/>
<sequenceFlow sourceRef="decisionSubprocess"
targetRef="normalEnd"/>
<scriptTask id="normalEnd" name="Post Accepted" scriptFormat="groovy">
<script>
out:println "All accepted."
</script>
</scriptTask>
<sequenceFlow targetRef="end"
sourceRef="normalEnd"/>
<endEvent id="end"/>
</process>
</definitions>
08-06-2015 03:54 PM
08-06-2015 04:04 PM
08-06-2015 04:24 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.