public void testParseBpmPlatformXmlMultipleEnginePlugins() { BpmPlatformXml bpmPlatformXml = parser .createParse() .sourceUrl(getStreamUrl("bpmplatform_xml_multiple_engine_plugins.xml")) .execute() .getBpmPlatformXml(); assertNotNull(bpmPlatformXml); assertEquals(1, bpmPlatformXml.getProcessEngines().size()); ProcessEngineXml engineXml = bpmPlatformXml.getProcessEngines().get(0); assertEquals("engine1", engineXml.getName()); assertEquals("default", engineXml.getJobAcquisitionName()); List<ProcessEnginePluginXml> plugins = engineXml.getPlugins(); assertEquals(2, plugins.size()); }
public void testParseBpmPlatformXmlEnginePlugin() { BpmPlatformXml bpmPlatformXml = parser .createParse() .sourceUrl(getStreamUrl("bpmplatform_xml_engine_plugin.xml")) .execute() .getBpmPlatformXml(); assertNotNull(bpmPlatformXml); assertEquals(1, bpmPlatformXml.getProcessEngines().size()); ProcessEngineXml engineXml = bpmPlatformXml.getProcessEngines().get(0); assertEquals("engine1", engineXml.getName()); assertEquals("default", engineXml.getJobAcquisitionName()); List<ProcessEnginePluginXml> plugins = engineXml.getPlugins(); assertEquals(1, plugins.size()); ProcessEnginePluginXml plugin1 = plugins.get(0); assertNotNull(plugin1); assertEquals("org.camunda.bpm.MyAwesomePlugin", plugin1.getPluginClass()); Map<String, String> properties = plugin1.getProperties(); assertNotNull(properties); assertEquals(2, properties.size()); String val1 = properties.get("prop1"); assertNotNull(val1); assertEquals("val1", val1); String val2 = properties.get("prop2"); assertNotNull(val2); assertEquals("val2", val2); }
public void testParseBpmPlatformXmlOneEngine() { BpmPlatformXml bpmPlatformXml = parser .createParse() .sourceUrl(getStreamUrl("bpmplatform_xml_one_engine.xml")) .execute() .getBpmPlatformXml(); assertNotNull(bpmPlatformXml); assertNotNull(bpmPlatformXml.getJobExecutor()); assertEquals(1, bpmPlatformXml.getProcessEngines().size()); JobExecutorXml jobExecutorXml = bpmPlatformXml.getJobExecutor(); assertEquals(1, jobExecutorXml.getJobAcquisitions().size()); JobAcquisitionXml jobAcquisitionXml = jobExecutorXml.getJobAcquisitions().get(0); assertEquals("default", jobAcquisitionXml.getName()); assertEquals( "org.camunda.bpm.engine.impl.jobexecutor.DefaultJobExecutor", jobAcquisitionXml.getJobExecutorClassName()); assertEquals(2, jobAcquisitionXml.getProperties().size()); ProcessEngineXml engineXml = bpmPlatformXml.getProcessEngines().get(0); assertEquals("engine1", engineXml.getName()); assertEquals("default", engineXml.getJobAcquisitionName()); Map<String, String> properties = engineXml.getProperties(); assertNotNull(properties); assertEquals(0, properties.size()); List<ProcessEnginePluginXml> plugins = engineXml.getPlugins(); assertNotNull(plugins); assertEquals(0, plugins.size()); }