09-27-2013 09:26 AM
<process id="myProcess" name="My process" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<serviceTask id="checkObjectValue" name="Check object value" activiti:async="true" activiti:expression="#{myWorkflow.checkObjectValue(objectId, execution)}" activiti:resultVariableName="objectValue"></serviceTask>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="checkObjectValue"></sequenceFlow>
<userTask id="takeDecisionTask" name="Take decision task"></userTask>
<exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
<serviceTask id="doA" name="Do A" activiti:async="true" activiti:expression="#{myWorkflow.doA(objectId)}"></serviceTask>
<exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow2" sourceRef="checkObjectValue" targetRef="exclusivegateway1"></sequenceFlow>
<sequenceFlow id="flow3" sourceRef="exclusivegateway1" targetRef="takeDecisionTask">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${objectValue == true}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow4" sourceRef="takeDecisionTask" targetRef="exclusivegateway2"></sequenceFlow>
<sequenceFlow id="flow5" sourceRef="exclusivegateway2" targetRef="doA">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${decision == true}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow6" sourceRef="exclusivegateway1" targetRef="doA">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${objectValue == false}]]></conditionExpression>
</sequenceFlow>
<serviceTask id="doB" name="Do B" activiti:async="true" activiti:expression="#{myWorkflow.doA(objectId)}"></serviceTask>
<sequenceFlow id="flow7" sourceRef="exclusivegateway2" targetRef="doB">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${decision == false}]]></conditionExpression>
</sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow8" sourceRef="doA" targetRef="endevent1"></sequenceFlow>
<sequenceFlow id="flow9" sourceRef="doB" targetRef="endevent1"></sequenceFlow>
</process>
// Start process
activitiService.startProcess("myWorkflow", variables);
// Check if a user task has been created
Task task = getActivitiTaskService().createTaskQuery().processVariableValueEquals(variableName, variableValue);
// Complete it
getActivitiTaskService().complete(taskId);
// Check the final result
assertTrue(something);
org.activiti.engine.ActivitiException: this activity doesn't accept signals
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.signal(FlowNodeActivityBehavior.java:53)
at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.signal(AbstractBpmnActivityBehavior.java:90)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:350)
at org.activiti.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:160)
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:39)
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:24)
at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:61)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:163)
09-30-2013 06:08 AM
10-01-2013 04:29 AM
10-02-2013 05:56 AM
10-07-2013 04:21 AM
10-09-2013 05:21 AM
10-14-2013 08:53 AM
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.