コード例 #1
0
 /**
  * Checks the validation to see if properties are present, which will be ignored in this
  * environment so we can log a warning.
  */
 private void checkConfiguration(JobExecutorXml jobExecutorXml) {
   Map<String, String> properties = jobExecutorXml.getProperties();
   for (Entry<String, String> entry : properties.entrySet()) {
     LOGGER.warning(
         "Property "
             + entry.getKey()
             + " with value "
             + entry.getValue()
             + " from bpm-platform.xml will be ignored for JobExecutor.");
   }
 }
コード例 #2
0
  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());
  }
コード例 #3
0
  public void testParseBpmPlatformXmlNoEngine() {

    BpmPlatformXml bpmPlatformXml =
        parser
            .createParse()
            .sourceUrl(getStreamUrl("bpmplatform_xml_no_engine.xml"))
            .execute()
            .getBpmPlatformXml();

    assertNotNull(bpmPlatformXml);
    assertNotNull(bpmPlatformXml.getJobExecutor());
    assertEquals(0, 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());
  }