Search in sources :

Example 1 with BpmnParser

use of org.activiti.engine.impl.bpmn.parser.BpmnParser in project Activiti by Activiti.

the class ProcessEngineConfigurationImpl method initBpmnParser.

public void initBpmnParser() {
    if (bpmnParser == null) {
        bpmnParser = new BpmnParser();
    }
    if (bpmnParseFactory == null) {
        bpmnParseFactory = new DefaultBpmnParseFactory();
    }
    bpmnParser.setBpmnParseFactory(bpmnParseFactory);
    bpmnParser.setActivityBehaviorFactory(activityBehaviorFactory);
    bpmnParser.setListenerFactory(listenerFactory);
    List<BpmnParseHandler> parseHandlers = new ArrayList<BpmnParseHandler>();
    if (getPreBpmnParseHandlers() != null) {
        parseHandlers.addAll(getPreBpmnParseHandlers());
    }
    parseHandlers.addAll(getDefaultBpmnParseHandlers());
    if (getPostBpmnParseHandlers() != null) {
        parseHandlers.addAll(getPostBpmnParseHandlers());
    }
    BpmnParseHandlers bpmnParseHandlers = new BpmnParseHandlers();
    bpmnParseHandlers.addHandlers(parseHandlers);
    bpmnParser.setBpmnParserHandlers(bpmnParseHandlers);
}
Also used : BpmnParser(org.activiti.engine.impl.bpmn.parser.BpmnParser) ArrayList(java.util.ArrayList) BpmnParseHandler(org.activiti.engine.parse.BpmnParseHandler) BpmnParseHandlers(org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers)

Aggregations

ArrayList (java.util.ArrayList)1 BpmnParseHandlers (org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers)1 BpmnParser (org.activiti.engine.impl.bpmn.parser.BpmnParser)1 BpmnParseHandler (org.activiti.engine.parse.BpmnParseHandler)1