08-20-2012 08:30 AM
<?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">
<signal id="alertSignal" name="alert" />
<process id="aaa">
<startEvent id="start1" />
<sequenceFlow sourceRef="start1" targetRef="ut1" />
<userTask id="ut1" name="FIRST"/>
<boundaryEvent id="signal" attachedToRef="ut1" cancelActivity="false">
<signalEventDefinition signalRef="alertSignal" />
</boundaryEvent>
<sequenceFlow sourceRef="ut1" targetRef="endx" />
<sequenceFlow sourceRef="signal" targetRef="ut2" />
<userTask id="ut2" />
<sequenceFlow sourceRef="ut2" targetRef="end2" />
<endEvent id="endx" />
<endEvent id="end2" />
</process>
</definitions>
public void test() {
HashMap<String, Object> variables1 = new HashMap<String, Object>();
variables1.put("processName", "catchSignal");
ProcessInstance pi ;
pi = runtimeService.startProcessInstanceByKey("aaa");
assertEquals(1, taskService.createTaskQuery().processInstanceId(pi.getProcessInstanceId()).count());
runtimeService.signalEventReceived("alert");
assertEquals(2, taskService.createTaskQuery().processInstanceId(pi.getProcessInstanceId()).count());
taskService.complete(taskService.createTaskQuery().taskName("FIRST").singleResult().getId());
assertEquals(1, taskService.createTaskQuery().processInstanceId(pi.getProcessInstanceId()).count());
//assertProcessEnded(pi.getProcessInstanceId());
}
08-20-2012 08:31 AM
08-20-2012 08:40 AM
08-21-2012 01:11 AM
Does Activiti support cancelActivity="false" on boundary signal event?can someone help me with this issue?
08-21-2012 02:10 AM
08-21-2012 02:55 AM
public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception {
// concrete activity behaviours that do accept signals should override this method;
throw new ActivitiException("this activity doesn't accept signals");
}
08-21-2012 03:02 AM
08-27-2012 09:27 AM
09-11-2012 11:59 AM
09-18-2012 07:59 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.