Search in sources :

Example 1 with EventGateway

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

the class EventGatewayXMLConverter method convertXMLToElement.

@Override
protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception {
    EventGateway gateway = new EventGateway();
    BpmnXMLUtil.addXMLLocation(gateway, xtr);
    parseChildElements(getXMLElementName(), gateway, model, xtr);
    return gateway;
}
Also used : EventGateway(org.activiti.bpmn.model.EventGateway)

Example 2 with EventGateway

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

the class EventBasedGatewayConverterTest method validateModel.

private void validateModel(BpmnModel model) {
    FlowElement flowElement = model.getMainProcess().getFlowElement("eventBasedGateway");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof EventGateway);
    EventGateway gateway = (EventGateway) flowElement;
    List<ActivitiListener> listeners = gateway.getExecutionListeners();
    assertEquals(1, listeners.size());
    ActivitiListener listener = listeners.get(0);
    assertTrue(ImplementationType.IMPLEMENTATION_TYPE_CLASS.equals(listener.getImplementationType()));
    assertEquals("org.test.TestClass", listener.getImplementation());
    assertEquals("start", listener.getEvent());
}
Also used : EventGateway(org.activiti.bpmn.model.EventGateway) FlowElement(org.activiti.bpmn.model.FlowElement) ActivitiListener(org.activiti.bpmn.model.ActivitiListener)

Aggregations

EventGateway (org.activiti.bpmn.model.EventGateway)2 ActivitiListener (org.activiti.bpmn.model.ActivitiListener)1 FlowElement (org.activiti.bpmn.model.FlowElement)1