Search in sources :

Example 21 with SignalEventDefinition

use of org.activiti.bpmn.model.SignalEventDefinition in project Activiti by Activiti.

the class CompleteConverterTest method validateModel.

private void validateModel(BpmnModel model) {
    FlowElement flowElement = model.getMainProcess().getFlowElement("userTask1");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof UserTask);
    assertEquals("userTask1", flowElement.getId());
    flowElement = model.getMainProcess().getFlowElement("catchsignal");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof IntermediateCatchEvent);
    assertEquals("catchsignal", flowElement.getId());
    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
    assertEquals(1, catchEvent.getEventDefinitions().size());
    assertTrue(catchEvent.getEventDefinitions().get(0) instanceof SignalEventDefinition);
    SignalEventDefinition signalEvent = (SignalEventDefinition) catchEvent.getEventDefinitions().get(0);
    assertEquals("testSignal", signalEvent.getSignalRef());
    flowElement = model.getMainProcess().getFlowElement("subprocess");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
    assertEquals("subprocess", flowElement.getId());
    SubProcess subProcess = (SubProcess) flowElement;
    flowElement = subProcess.getFlowElement("receiveTask");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof ReceiveTask);
    assertEquals("receiveTask", flowElement.getId());
}
Also used : SubProcess(org.activiti.bpmn.model.SubProcess) ReceiveTask(org.activiti.bpmn.model.ReceiveTask) FlowElement(org.activiti.bpmn.model.FlowElement) IntermediateCatchEvent(org.activiti.bpmn.model.IntermediateCatchEvent) UserTask(org.activiti.bpmn.model.UserTask) SignalEventDefinition(org.activiti.bpmn.model.SignalEventDefinition)

Aggregations

SignalEventDefinition (org.activiti.bpmn.model.SignalEventDefinition)21 EventDefinition (org.activiti.bpmn.model.EventDefinition)13 MessageEventDefinition (org.activiti.bpmn.model.MessageEventDefinition)11 TimerEventDefinition (org.activiti.bpmn.model.TimerEventDefinition)7 BoundaryEvent (org.activiti.bpmn.model.BoundaryEvent)6 FlowElement (org.activiti.bpmn.model.FlowElement)6 ErrorEventDefinition (org.activiti.bpmn.model.ErrorEventDefinition)4 CancelEventDefinition (org.activiti.bpmn.model.CancelEventDefinition)3 Event (org.activiti.bpmn.model.Event)3 IntermediateCatchEvent (org.activiti.bpmn.model.IntermediateCatchEvent)3 SubProcess (org.activiti.bpmn.model.SubProcess)3 ThrowEvent (org.activiti.bpmn.model.ThrowEvent)3 ActivityImpl (org.activiti.engine.impl.pvm.process.ActivityImpl)3 CompensateEventDefinition (org.activiti.bpmn.model.CompensateEventDefinition)2 Message (org.activiti.bpmn.model.Message)2 ReceiveTask (org.activiti.bpmn.model.ReceiveTask)2 Signal (org.activiti.bpmn.model.Signal)2 UserTask (org.activiti.bpmn.model.UserTask)2 ScopeImpl (org.activiti.engine.impl.pvm.process.ScopeImpl)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)1