The bpm-platform.xml file is part of the Camunda BPM platform distribution and can be used for configuration of process engines and the job executor.It is used to configure the Camunda BPM platform in the following distributions:

JBoss Application Server 7/Wildfly 8

The bpm-platform.xml file is not used in the Camunda BPM distribution for JBoss Application Server 7 / Wildfly 8 / 10. There, the configuration is added to the central application server configuration file (standalone.xml or domain.xml). The XML schema is the same (i.e., the same elements and properties can be used). See the The Camunda JBoss Subsystem section of the User Guide for more details.

Xml Schema Namespace

The namespace for the bpm-platform.xml file is http://www.camunda.org/schema/1.0/BpmPlatform. The XSD file can be found in the camunda-engine.jar file.

Example

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <bpm-platform xmlns="http://www.camunda.org/schema/1.0/BpmPlatform"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://www.camunda.org/schema/1.0/BpmPlatform http://www.camunda.org/schema/1.0/BpmPlatform ">
  5. <job-executor>
  6. <job-acquisition name="default" />
  7. </job-executor>
  8. <process-engine name="default">
  9. <job-acquisition>default</job-acquisition>
  10. <configuration>org.camunda.bpm.engine.impl.cfg.JtaProcessEngineConfiguration</configuration>
  11. <datasource>jdbc/ProcessEngine</datasource>
  12. <properties>
  13. <property name="history">full</property>
  14. <property name="databaseSchemaUpdate">true</property>
  15. <property name="transactionManagerJndiName">java:appserver/TransactionManager</property>
  16. <property name="authorizationEnabled">true</property>
  17. </properties>
  18. </process-engine>
  19. </bpm-platform>

Syntax Reference

Tag name Parent tag name Required? Description
<bpm-platform> None. true Root element of the bpm-platform.xml file.
<job-executor> <bpm-platform> true See job-executor Reference
<process-engine> <bpm-platform> false See process-engine Reference

Configure Location of the bpm-platform.xml File

You can configure the location of the bpm-platform.xml, so the file can be stored externally to allow an easy update path of camunda-bpm-platform.ear. This negates the work of unpacking / repackaging the ear when you need to change the configuration.

This feature is available for:

To specify the location, you have to provide an absolute path or an http/https url pointing to the bpm-platform.xml file, e.g., /home/camunda/.camunda/bpm-platform.xml or http://camunda.org/bpm-platform.xml.

During startup of the camunda-bpm-platform, it tries to discover the location of the bpm-platform.xml file from the following sources, in the listed order:

  • JNDI entry is available at java:/comp/env/bpm-platform-xml
  • Environment variable BPM_PLATFORM_XML is set
  • System property bpm.platform.xml is set, e.g., when starting the server JVM it is appended as -Dbpm.platform.xml on the command line
  • META-INF/bpm-platform.xml exists on the classpath
  • (For Tomcat only): checks if there is a bpm-platform.xml inside the folder specified by ${CATALINA_BASE} || ${CATALINA_HOME} + /conf/
    The discovery stops when one of the above mentioned sources is found or, in case none is found, it falls back to the bpm-platform.xml on the classpath, respectively ${CATALINA_BASE} || ${CATALINA_HOME} + /conf/ for Tomcat. We ship a default bpm-platform.xml file inside the camunda-bpm-platform.ear, except when you use the Tomcat or JBoss version of the platform.

Using System Properties

To externalize environment specific parts of the configuration, it is possible to reference system properties using Ant-style expressions (i.e., ${PROPERTY_KEY}). Expression resolution is supported within the property elements only. System properties may be set via command line (-Doption) or in an implementation specific manner (Apache Tomcat’s catalina.properties for example).Complex operations are not supported, but you may combine more than one expression in a single property element (e.g., ${ldap.host}:${ldap.port}).

Example

  1. <!-- ... -->
  2. <plugin>
  3. <class>org.camunda.bpm.engine.impl.plugin.AdministratorAuthorizationPlugin</class>
  4. <properties>
  5. <property name="administratorUserName">${camunda.administratorUserName}</property>
  6. </properties>
  7. </plugin>
  8. <!-- ... -->

原文: https://docs.camunda.org/manual/7.9/reference/deployment-descriptors/descriptors/bpm-platform-xml/