Search in sources :

Example 11 with ProcessEngineXml

use of org.camunda.bpm.container.impl.metadata.spi.ProcessEngineXml in project camunda-bpm-platform by camunda.

the class BpmPlatformXmlParserTest method testParseProcessesXmlAntStyleProperties.

public void testParseProcessesXmlAntStyleProperties() {
    BpmPlatformXml platformXml = parser.createParse().sourceUrl(getStreamUrl("bpmplatform_xml_ant_style_properties.xml")).execute().getBpmPlatformXml();
    assertNotNull(platformXml);
    ProcessEngineXml engineXml = platformXml.getProcessEngines().get(0);
    assertEquals(1, engineXml.getPlugins().size());
    ProcessEnginePluginXml pluginXml = engineXml.getPlugins().get(0);
    Map<String, String> properties = pluginXml.getProperties();
    assertEquals(2, properties.size());
    // these two system properties are guaranteed to be set
    assertEquals(System.getProperty("java.version"), properties.get("prop1"));
    assertEquals("prefix-" + System.getProperty("os.name"), properties.get("prop2"));
}
Also used : ProcessEnginePluginXml(org.camunda.bpm.container.impl.metadata.spi.ProcessEnginePluginXml) ProcessEngineXml(org.camunda.bpm.container.impl.metadata.spi.ProcessEngineXml) BpmPlatformXml(org.camunda.bpm.container.impl.metadata.spi.BpmPlatformXml)

Example 12 with ProcessEngineXml

use of org.camunda.bpm.container.impl.metadata.spi.ProcessEngineXml in project camunda-bpm-platform by camunda.

the class BpmPlatformXmlParserTest method testParseBpmPlatformXmlEnginePlugin.

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);
}
Also used : ProcessEnginePluginXml(org.camunda.bpm.container.impl.metadata.spi.ProcessEnginePluginXml) ProcessEngineXml(org.camunda.bpm.container.impl.metadata.spi.ProcessEngineXml) BpmPlatformXml(org.camunda.bpm.container.impl.metadata.spi.BpmPlatformXml)

Aggregations

ProcessEngineXml (org.camunda.bpm.container.impl.metadata.spi.ProcessEngineXml)12 ProcessesXml (org.camunda.bpm.application.impl.metadata.spi.ProcessesXml)4 BpmPlatformXml (org.camunda.bpm.container.impl.metadata.spi.BpmPlatformXml)4 ProcessEnginePluginXml (org.camunda.bpm.container.impl.metadata.spi.ProcessEnginePluginXml)4 ArrayList (java.util.ArrayList)3 ProcessArchiveXml (org.camunda.bpm.application.impl.metadata.spi.ProcessArchiveXml)2 Element (org.camunda.bpm.engine.impl.util.xml.Element)2 URL (java.net.URL)1 ProcessesXmlWrapper (org.camunda.bpm.container.impl.jboss.util.ProcessesXmlWrapper)1 BpmPlatformXmlImpl (org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl)1 JobExecutorXmlImpl (org.camunda.bpm.container.impl.metadata.JobExecutorXmlImpl)1 JobAcquisitionXml (org.camunda.bpm.container.impl.metadata.spi.JobAcquisitionXml)1 JobExecutorXml (org.camunda.bpm.container.impl.metadata.spi.JobExecutorXml)1 DeploymentOperation (org.camunda.bpm.container.impl.spi.DeploymentOperation)1 DeploymentOperationStep (org.camunda.bpm.container.impl.spi.DeploymentOperationStep)1 DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)1 Before (org.junit.Before)1