private static final Log log = LogFactory.getLog(AntHelper.class);
public static ProcessEngine getProcessEngine(String jbpmCfgXml) {
ProcessEngine processEngine = (ProcessEngineImpl) processEngines.get(jbpmCfgXml);
if (processEngine == null) {
Configuration configuration = new Configuration();
if (jbpmCfgXml!=null) {
log.debug("using jbpm configuration "+jbpmCfgXml);
configuration.setResource(jbpmCfgXml);
} else {
log.debug("using default jbpm.cfg.xml configuration");
}
processEngine = configuration.buildProcessEngine();
processEngines.put(jbpmCfgXml, processEngine);
}
return processEngine;
}