Process Engine Configuration

The auto starter uses the org.eximeebpms.bpm.engine.impl.cfg.ProcessEnginePlugin mechanism to configure the engine.

The configuration is divided into sections. These sections are represented by the marker interfaces:

  • org.eximeebpms.bpm.spring.boot.starter.configuration.EximeeBPMSProcessEngineConfiguration
  • org.eximeebpms.bpm.spring.boot.starter.configuration.EximeeBPMSDatasourceConfiguration
  • org.eximeebpms.bpm.spring.boot.starter.configuration.EximeeBPMSHistoryConfiguration
  • org.eximeebpms.bpm.spring.boot.starter.configuration.EximeeBPMSHistoryLevelAutoHandlingConfiguration
  • org.eximeebpms.bpm.spring.boot.starter.configuration.EximeeBPMSJobConfiguration
  • org.eximeebpms.bpm.spring.boot.starter.configuration.EximeeBPMSDeploymentConfiguration
  • org.eximeebpms.bpm.spring.boot.starter.configuration.EximeeBPMSAuthorizationConfiguration
  • org.eximeebpms.bpm.spring.boot.starter.configuration.EximeeBPMSFailedJobConfiguration
  • org.eximeebpms.bpm.spring.boot.starter.configuration.EximeeBPMSMetricsConfiguration

Default Configurations

The following default and best practice configurations are provided by the starter and can be customized or overridden.

DefaultProcessEngineConfiguration

Sets the process engine name and automatically adds all ProcessEnginePlugin beans to the configuration.

DefaultDatasourceConfiguration

Configures the EximeeBPMS data source and enables transaction integration. By default, the primary DataSource and PlatformTransactionManager beans are wired with the process engine configuration.

If you want to configure more than one datasource and don’t want to use the @Primary one for the process engine, then you can create a separate data source with name eximeebpmsBpmDataSource that will be automatically wired with EximeeBPMS instead.

@Bean
@Primary
@ConfigurationProperties(prefix="datasource.primary")
public DataSource primaryDataSource() {
  return DataSourceBuilder.create().build();
}

@Bean(name="eximeebpmsBpmDataSource")
@ConfigurationProperties(prefix="datasource.secondary")
public DataSource secondaryDataSource() {
  return DataSourceBuilder.create().build();
}

If you don’t want to use the @Primary transaction manager, it is possible to create a separate transaction manager with the name eximeebpmsBpmTransactionManager that will be wired with the data source used for EximeeBPMS (either @Primary or eximeebpmsBpmDataSource):

@Bean
@Primary
public PlatformTransactionManager primaryTransactionManager() {
  return new JpaTransactionManager();
}

@Bean(name="eximeebpmsBpmTransactionManager")
public PlatformTransactionManager eximeebpmsTransactionManager(@Qualifier("eximeebpmsBpmDataSource") DataSource dataSource) {
  return new DataSourceTransactionManager(dataSource);
}

The wired data source and transaction manager beans must match, i.e. make sure that the transaction manager actually manages the EximeeBPMS data source. If that is not the case, the process engine will use auto-commit mode for the data source connection, potentially leading to inconsistencies in the database.

DefaultHistoryConfiguration

Applies the history configuration to the process engine. If not configured, the history level FULL is used. If you want to use a custom HistoryEventHandler, you just have to provide a bean implementing the interface.

@Bean
public HistoryEventHandler customHistoryEventHandler() {
  return new CustomHistoryEventHanlder();
}

DefaultHistoryLevelAutoHandlingConfiguration

As eximeebpms version >= 7.4 supports history-level auto, this configuration adds support for versions <= 7.3.

To have more control over the handling, you can provide your own

  • org.eximeebpms.bpm.spring.boot.starter.jdbc.HistoryLevelDeterminator with name historyLevelDeterminator

IMPORTANT: The default configuration is applied after all other default configurations using the ordering mechanism.

DefaultJobConfiguration

Applies the job execution properties to the process engine.

To have more control over the execution itself, you can provide your own

  • org.eximeebpms.bpm.engine.impl.jobexecutor.JobExecutor
  • org.springframework.core.task.TaskExecutor named eximeebpmsTaskExecutor

beans.

IMPORTANT: The job executor is not enabled in the configuration. This is done after the spring context successfully loaded (see org.eximeebpms.bpm.spring.boot.starter.runlistener).

DefaultDeploymentConfiguration

If auto deployment is enabled (this is the case by default), all processes found in the classpath are deployed. The resource pattern can be changed using properties (see properties).

DefaultAuthorizationConfiguration

Applies the authorization configuration to the process engine. If not configured, the eximeebpms default values are used (see properties).

Overriding the Default Configuration

Provide a bean implementing one of the marker interfaces. For example to customize the datasource configuration:

@Configuration
public class MyEximeeBPMSConfiguration {

	@Bean
	public static EximeeBPMSDatasourceConfiguration eximeebpmsDatasourceConfiguration() {
		return new MyEximeeBPMSDatasourceConfiguration();
	}

}

Adding Additional Configurations

You just have to provide one or more beans implementing the org.eximeebpms.bpm.engine.impl.cfg.ProcessEnginePlugin interface (or extend from org.eximeebpms.bpm.spring.boot.starter.configuration.impl.AbstractEximeeBPMSConfiguration). The configurations are applied ordered using the spring ordering mechanism (@Order annotation and Ordered interface). So if you want your configuration to be applied before the default configurations, add a @Order(Ordering.DEFAULT_ORDER - 1) annotation to your class. If you want your configuration to be applied after the default configurations, add a @Order(Ordering.DEFAULT_ORDER + 1) annotation to your class.

@Configuration
public class MyEximeeBPMSConfiguration {

	@Bean
	@Order(Ordering.DEFAULT_ORDER + 1)
	public static ProcessEnginePlugin myCustomConfiguration() {
		return new MyCustomConfiguration();
	}

}

Or, if you have component scan enabled:

@Component
@Order(Ordering.DEFAULT_ORDER + 1)
public class MyCustomConfiguration implements ProcessEnginePlugin {

	@Override
	public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
		//...
	}

	...

}

or


@Component
@Order(Ordering.DEFAULT_ORDER + 1)
public class MyCustomConfiguration extends AbstractEximeeBPMSConfiguration {

	@Override
	public void preInit(SpringProcessEngineConfiguration springProcessEngineConfiguration) {
		//...
	}

	...

}

EximeeBPMS Engine Properties

In addition to the bean-based way of overriding process engine configuration properties, it is also possible to set those properties via an application.yaml configuration file. Instructions on how to use it can be found in the Spring Boot Starter Guide.

The available properties are as follows:

PrefixProperty nameDescriptionDefault value
General
eximeebpms.bpm.enabledSwitch to disable the EximeeBPMS auto-configuration. Use to exclude EximeeBPMS in integration tests.true
.process-engine-nameName of the process engineEximeeBPMS default value
.generate-unique-process-engine-nameGenerate a unique name for the process engine (format: 'processEngine' + 10 random alphanumeric characters)false
.generate-unique-process-application-nameGenerate a unique Process Application name for every Process Application deployment (format: 'processApplication' + 10 random alphanumeric characters)false
.default-serialization-formatDefault serialization formatEximeeBPMS default value
.history-levelEximeeBPMS history levelFULL
.history-level-defaultEximeeBPMS history level to use when history-level is auto, but the level can not determined automaticallyFULL
.auto-deployment-enabledIf processes should be auto deployed. This is disabled when using the SpringBootProcessApplicationtrue
.default-number-of-retriesSpecifies how many times a job will be executed before an incident is raised3
.job-executor-acquire-by-priorityIf set to true, the job executor will acquire the jobs with the highest prioritiesfalse
.license-fileProvides a URL to your EximeeBPMS license file and is automatically inserted into the DB when the application starts (but only if no valid license key is found in the DB).

Note: This property is only available when using the eximeebpms-bpm-spring-boot-starter-webapp-ee
By default, the license key will be loaded:
  1. from the URL provided via the this property (if present)
  2. from the file with the name eximeebpms-license.txt from the classpath (if present)
  3. from path ${user.home}/.eximeebpms/license.txt (if present)
The license must be exactly in the format as we sent it to you including the header and footer line. Bear in mind that for some licenses there is a minimum version requirement.
.id-generatorConfigure idGenerator. Allowed values: simple, strong, prefixed. prefixed id generator is like strong, but uses a Spring application name (${spring.application.name}) as the prefix for each id.strong
.versionVersion of the process engineRead only value, e.g., 7.4.0
.formatted-versionFormatted version of the process engineRead only value, e.g., (v7.4.0)
.deployment-resource-patternLocation for auto deploymentclasspath*:**/*.bpmn, classpath*:**/*.bpmn20.xml, classpath*:**/*.dmn, classpath*:**/*.dmn11.xml, classpath*:**/*.cmmn, classpath*:**/*.cmmn10.xml, classpath*:**/*.cmmn11.xml
Job Execution
eximeebpms.bpm.job-execution.enabledIf set to false, no JobExecutor bean is created at all. Maybe used for testing.true
.deployment-awareIf job executor is deployment awarefalse
.core-pool-sizeSet to value > 1 to activate parallel job execution.3
.keep-alive-secondsSpecifies the time, in milliseconds, for which threads are kept alive when there are no more tasks present. When the time expires, threads are terminated so that the core pool size is reached.0
.lock-time-in-millisSpecifies the time in milliseconds an acquired job is locked for execution. During that time, no other job executor can acquire the job.300000
.max-jobs-per-acquisitionSets the maximal number of jobs to be acquired at once.3
.max-pool-sizeMaximum number of parallel threads executing jobs.10
.queue-capacitySets the size of the queue which is used for holding tasks to be executed.3
.wait-time-in-millisSpecifies the wait time of the job acquisition thread in milliseconds in case there are less jobs available for execution than requested during acquisition. If this is repeatedly the case, the wait time is increased exponentially by the factor waitIncreaseFactor. The wait time is capped by maxWait.5000
.max-waitSpecifies the maximum wait time of the job acquisition thread in milliseconds in case there are less jobs available for execution than requested during acquisition.60000
.backoff-time-in-millisSpecifies the wait time of the job acquisition thread in milliseconds in case jobs were acquired but could not be locked. This condition indicates that there are other job acquisition threads acquiring jobs in parallel. If this is repeatedly the case, the backoff time is increased exponentially by the factor waitIncreaseFactor. The time is capped by maxBackoff. With every increase in backoff time, the number of jobs acquired increases by waitIncreaseFactor as well.0
.max-backoffSpecifies the maximum wait time of the job acquisition thread in milliseconds in case jobs were acquired but could not be locked.0
.backoff-decrease-thresholdSpecifies the number of successful job acquisition cycles without a job locking failure before the backoff time is decreased again. In that case, the backoff time is reduced by waitIncreaseFactor.100
.wait-increase-factorSpecifies the factor by which wait and backoff time are increased in case their activation conditions are repeatedly met.2
Datasource
eximeebpms.bpm.database.schema-updateIf automatic schema update should be applied, use one of [true, false, create, create-drop, drop-create]true
.typeType of the underlying database. Possible values: h2, mysql, oracle, postgres, mssql, db2.Will be automatically determined from datasource
.table-prefixPrefix of the eximeebpms database tables. Attention: The table prefix will not be applied if you are using schema-update!EximeeBPMS default value
.schema-nameThe dataBase schema nameEximeeBPMS default value
.jdbc-batch-processingControls if the engine executes the jdbc statements as Batch or not. It has to be disabled for some databases. See the user guide for further details.EximeeBPMS default value: true
Eventing
eximeebpms.bpm.eventing.executionEnables eventing of delegate execution events. See the user guide for further details.true
.historyEnables eventing of history events. See the user guide for further details.true
.taskEnables eventing of task events. See the user guide for further details.true
.skippableControls if listeners are registered as built-in (false) or are skippable (true). See the user guide for further details.true
Management
eximeebpms.bpm.management.health.eximeebpms.enabledEnables default eximeebpms health indicatorstrue
Metrics
eximeebpms.bpm.metrics.enabledEnables metrics reportingEximeeBPMS default value
.db-reporter-activateEnables db metrics reportingEximeeBPMS default value
Webapp
eximeebpms.bpm.webapp.enabledSwitch to disable the EximeeBPMS Webapp auto-configuration.true
.index-redirect-enabledRegisters a redirect from / to eximeebpms's bundled index.html.
If this property is set to false, the default Spring Boot behaviour is taken into account.
true
.application-pathChanges the application path of the webapp.
When setting to /, the legacy behavior of EximeeBPMS Spring Boot Starter <= 3.4.x is restored.
/eximeebpms
eximeebpms.bpm.webapp.csrf
.target-originSets the application expected deployment domain. See the user guide for details.Not set
.deny-statusSets the HTTP response status code used for a denied request. See the user guide for details.403
.random-classSets the name of the class used to generate tokens. See the user guide for details.java.security.SecureRandom
.entry-pointsSets additional URLs that will not be tested for the presence of a valid token. See the user guide for details.Not set
.enable-secure-cookieIf set to true, the cookie flag Secure is enabled.false
.enable-same-site-cookieIf set to false, the cookie flag SameSite is disabled. The default value of the SameSite cookie is LAX and it can be changed via same-site-cookie-option configuration property.true
.same-site-cookie-optionCan be configured either to STRICT or LAX.

Note:
  • Is ignored when enable-same-site-cookie is set to false
  • Cannot be set in conjunction with same-site-cookie-value
Not set
.same-site-cookie-valueA custom value for the cookie property.

Note:
  • Is ignored when enable-same-site-cookie is set to false
  • Cannot be set in conjunction with same-site-cookie-option
Not set
.cookie-nameA custom value to change the cookie name.
Note: Please make sure to additionally change the cookie name for each webapp (e. g. Cockpit ) separately.
XSRF-TOKEN
.enable-secure-cookieIf set to true, the cookie flag Secure is enabled for the Session Cookie.

Note: If the Secure flag is set in the cookie by any other means already, this property will not remove it by setting it to false.
false
.enable-same-site-cookieIf set to false, the cookie flag SameSite is disabled. The default value of the SameSite cookie is LAX and it can be changed via same-site-cookie-option configuration property.

Note: If the SameSite flag is set in the cookie by any other means already, this property will not adjust or remove it.
true
.same-site-cookie-optionCan be configured either to STRICT or LAX.

Note:
  • Is ignored when enable-same-site-cookie is set to false
  • Cannot be set in conjunction with same-site-cookie-value
  • Will not change the value of the SameSite flag if it is set already by any other means
Not set
.same-site-cookie-valueA custom value for the cookie property.

Note:
  • Is ignored when enable-same-site-cookie is set to false
  • Cannot be set in conjunction with same-site-cookie-option
  • Will not change the value of the SameSite flag if it is set already by any other means
Not set
.cookie-nameA custom value to configure the name of the session cookie to adjust.JSESSIONID
eximeebpms.bpm.webapp.header-security
.xss-protection-disabledThe header can be entirely disabled if set to true.
Allowed set of values is true and false.
false
.xss-protection-optionThe allowed set of values:
  • BLOCK: If the browser detects a cross-site scripting attack, the page is blocked completely
  • SANITIZE: If the browser detects a cross-site scripting attack, the page is sanitized from suspicious parts (value 0)
Note:
  • Is ignored when .xss-protection-disabled is set to true
  • Cannot be set in conjunction with .xss-protection-value
BLOCK
.xss-protection-valueA custom value for the header can be specified.

Note:
  • Is ignored when .xss-protection-disabled is set to true
  • Cannot be set in conjunction with .xss-protection-option
1; mode=block
.content-security-policy-disabledThe header can be entirely disabled if set to true.
Allowed set of values is true and false.
false
.content-security-policy-valueA custom value for the header can be specified.

Note: Property is ignored when .content-security-policy-disabled is set to true
base-uri 'self'
.content-type-options-disabledThe header can be entirely disabled if set to true.
Allowed set of values is true and false.
false
.content-type-options-valueA custom value for the header can be specified.

Note: Property is ignored when .content-security-policy-disabled is set to true
nosniff
.hsts-disabledSet to false to enable the header. The header is disabled by default.
Allowed set of values is true and false.
true
.hsts-max-ageAmount of seconds, the browser should remember to access the webapp via HTTPS.

Note:
  • Corresponds by default to one year
  • Is ignored when hstsDisabled is true
  • Cannot be set in conjunction with hstsValue
  • Allows a maximum value of 231-1
31536000
.hsts-include-subdomains-disabledHSTS is additionally to the domain of the webapp enabled for all its subdomains.

Note:
  • Is ignored when hstsDisabled is true
  • Cannot be set in conjunction with hstsValue
true
.hsts-valueA custom value for the header can be specified.

Note:
  • Is ignored when hstsDisabled is true
  • Cannot be set in conjunction with hstsMaxAge or hstsIncludeSubdomainsDisabled
max-age=31536000
eximeebpms.bpm.webapp.auth.cache
.ttl-enabledThe authentication cache time to live can be entirely disabled if set to false. I. e., authentication information is cached for the lifetime of the HTTP session.
Allowed set of values is true and false.
true
.time-to-liveA number of milliseconds, while the web apps reuse the cache for an HTTP session before they recreate it and query for the authentication information again from the database.

The allowed set of values:
  • a time duration in milliseconds between 1 and 263-1
  • 0 which effectively leads to querying for the authentication information on each REST API request
Note: Ignored when .enabled is set to false
300,000
Authorization
eximeebpms.bpm.authorization.enabledEnables authorizationEximeeBPMS default value
.enabled-for-custom-codeEnables authorization for custom codeEximeeBPMS default value
.authorization-check-revokesConfigures authorization check revokesEximeeBPMS default value
.tenant-check-enabledPerforms tenant checks to ensure that an authenticated user can only access data that belongs to one of his tenants.true
Admin User
eximeebpms.bpm.admin-user.idThe username (e.g., 'admin')-
.passwordThe initial password=id
.firstName, .lastName, .emailAdditional (optional) user attributesDefaults to value of 'id'
Filter
eximeebpms.bpm.filter.createName of a "show all" filter. If set, a new filter is created on start that displays all tasks. Useful for testing on h2 db.-
OAuth2
eximeebpms.bpm.oauth2.identity-provider.enabledEnables the OAuth2 identity provider.true
.group-name-attributeEnables and configures the OAuth2 Granted Authorities Mapper.-
.group-name-delimiterConfigures the delimiter used in the OAuth2 Granted Authorities Mapper. It's only used if the configured group-name-attribute contains String value., (comma)
eximeebpms.bpm.oauth2.sso-logout.enabledActivates the client initiated OIDC logout feature.false
.post-logout-redirect-uriConfigures the URI the user is redirected after SSO logout from the provider.{baseUrl}

Generic Properties

The method of configuration described above does not cover all process engine properties available. To override any process engine configuration property that is not exposed (i.e. listed above) you can use generic-properties.

eximeebpms:
  bpm:
    generic-properties:
      properties:
        ...

Note:

Overriding an already exposed property using the generic-properties keyword does not effect the process engine configuration. All exposed properties can only be overridden with their exposed identifier.

Examples

Override configuration using exposed properties:

eximeebpms.bpm:
  admin-user:
    id: kermit
    password: superSecret
    firstName: Kermit
  filter:
    create: All tasks

Override configuration using generic properties:

eximeebpms:
  bpm:
    generic-properties:
      properties:
        enable-password-policy: true

You can configure the Session Cookie for the Spring Boot application via the application.yaml configuration file.

EximeeBPMS Spring Boot Starter versions <= 2.3 (Spring Boot version 1.x)

server:
  session:
    cookie:
      secure: true
      http-only: true # Not possible for versions before 1.5.14

EximeeBPMS Spring Boot Starter versions >= 3.0 (Spring Boot version 2.x)

server:
  servlet:
    session:
      cookie:
        secure: true
        http-only: true # Not possible for versions before 2.0.3

Further details of the session cookie like the SameSite flag can be configured via eximeebpms.bpm.webapp.session-cookie in the application.yaml.

Configuring Spin DataFormats

The EximeeBPMS Spring Boot Starter auto-configures the Spin Jackson Json DataFormat when the eximeebpms-spin-dataformat-json-jackson dependency is detected on the classpath. To include a DataFormatConfigurator for the desired Jackson Java 8 module, the appropriate dependency needs to be included on the classpath as well. Note that eximeebpms-engine-plugin-spin needs to be included as a dependency as well for the auto-configurators to work.

Auto-configuration is currently supported for the following Jackson Java 8 modules:

  1. Parameter names (jackson-module-parameter-names)
  2. Java 8 Date/time (jackson-datatype-jdk8)
  3. Java 8 Datatypes (jackson-datatype-jsr310)

Heads Up!

The Spin Jackson Json DataFormat auto-configuration is disabled when using eximeebpms-spin-dataformat-all as a dependency. The eximeebpms-spin-dataformat-all artifact shades the Jackson libraries, which breaks compatibility with the regular Jackson modules. If usage of eximeebpms-spin-dataformat-all is necessary, please use the standard method for Spin Custom DataFormat configuration.

For example, to provide support for Java 8 Date/time types in Spin, the following dependencies, with their appropriate version tags, will need to be added in the Spring Boot Application’s pom.xml file:

<dependencies>
    <dependency>
      <groupId>org.eximeebpms.bpm</groupId>
      <artifactId>eximeebpms-engine-plugin-spin</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eximeebpms.spin</groupId>
      <artifactId>eximeebpms-spin-dataformat-json-jackson</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jdk8</artifactId>
    </dependency>
</dependencies>

Spring Boot also provides some nice configuration properties, to further configure the Jackson ObjectMapper. They can be found here.

To provide additional configurations, the following actions need to be performed:

  1. Provide a custom implementation of org.eximeebpms.spin.spi.DataFormatConfigurator;
  2. Add the appropriate key-value pair of the fully qualified classnames of the interface and the implementation to the META-INF/spring.factories file;
  3. Ensure that the artifact containing the configurator is reachable from Spin’s classloader.