05-05-2014 11:59 AM
05-06-2014 02:26 AM
Is it possible not to cancel first sub processyes
<boundaryEvent id="boundaryTimer" cancelActivity="true"….
and both sub process remain active in case timer reached specified time?In that case you do not cancel Activity (false)
Also if any user (using user task from first sub process) or any user (using user task from escalation sub process) approves or rejects, the process can be completed successfully.I would say to use messages (or signals), after the task complete to notify subprocess about the execution state.
Also not able to design the process flow using Activiti Explorer…I can not answer.
05-06-2014 03:36 AM
05-06-2014 09:48 PM
05-07-2014 02:58 AM
@Deployment
public void testParallelSubProcessWithTimer() {
String procId = runtimeService.startProcessInstanceByKey("miParallelSubprocessWithTimer").getId();
List<Task> tasks = taskService.createTaskQuery().list();
assertEquals(6, tasks.size());
// Complete two tasks
taskService.complete(tasks.get(0).getId());
taskService.complete(tasks.get(1).getId());
// Fire timer
Job timer = managementService.createJobQuery().singleResult();
managementService.executeJob(timer.getId());
Task taskAfterTimer = taskService.createTaskQuery().singleResult();
assertEquals("taskAfterTimer", taskAfterTimer.getTaskDefinitionKey());
taskService.complete(taskAfterTimer.getId());
assertProcessEnded(procId);
}
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definition"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="Examples">
<process id="miParallelSubprocessWithTimer">
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="miSubProcess" />
<subProcess id="miSubProcess">
<multiInstanceLoopCharacteristics isSequential="false">
<loopCardinality>3</loopCardinality>
</multiInstanceLoopCharacteristics>
<startEvent id="subProcessStart" />
<sequenceFlow id="subFlow1" sourceRef="subProcessStart" targetRef="subProcessFork" />
<parallelGateway id="subProcessFork" />
<sequenceFlow id="subFlow2" sourceRef="subProcessFork" targetRef="subProcessTask1" />
<sequenceFlow id="subFlow3" sourceRef="subProcessFork" targetRef="subProcessTask2" />
<userTask id="subProcessTask1" name="task one" />
<sequenceFlow id="subFlow4" sourceRef="subProcessTask1" targetRef="subProcessEnd1" />
<endEvent id="subProcessEnd1" />
<userTask id="subProcessTask2" name="task two" />
<sequenceFlow id="subFlow5" sourceRef="subProcessTask2" targetRef="subProcessEnd2" />
<endEvent id="subProcessEnd2" />
</subProcess>
<boundaryEvent id="timer" attachedToRef="miSubProcess">
<timerEventDefinition>
<timeDuration>PT1H</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow3" sourceRef="timer" targetRef="taskAfterTimer" />
<userTask id="taskAfterTimer" />
<sequenceFlow id="flow4" sourceRef="miSubProcess" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
</definitions>
05-08-2014 01:14 PM
05-09-2014 02:08 AM
<property name="jobExecutorActivate" value="true" />
05-09-2014 03:42 AM
05-12-2014 03:03 AM
05-12-2014 11:47 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.