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;
}
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());
}
Aggregations