Strategy: Single Engine - Multiple apps deploy bpmn flows

Our clients(or users or apps) would build workflows; maintain bmpn files; but wish to deploy into one central custom common engine. There could be multiple such clients; each deploying and executing serveral flows independently.
What should be our strategy.:

  1. REST Endpoints only; Deployed, executed, monitor all through APIs exposed by this engine.
  2. Build a small JDK like jar and share with clients to provide a more easy-to-use feature.
  3. Can every client builds a jar of its bpmn files and its custom delegates; with its own processes xml(Process Application); so multiple processes xml are hosted in single engine. Is this possible?
    Any other better approaches, best practices. Please suggest.

You can’t have multiple processes.xml files for one camunda distribution deployment.

But you can configure multiple process engines in the processes.xml or setup a one process engine which can be shared with all the clients.

You should go through this for multi-tenancy setup: Multi-Tenancy | docs.camunda.org


Approach 1: One Process Engine Per Tenant

  • Multi-Tenancy can be achieved by providing one process engine per tenant.
  • Each process engine is configured to use a different data source which connects the data of the tenant.
  • The data of the tenants can be stored in different databases, in one database with different schemas or in one schema with different tables.

Approach 2: Single Process Engine With Tenant-Identifiers

  • Multi-Tenancy can be achieved with one process engine which uses tenant identifiers (i.e., tenant-ids).
  • The data of all tenants is stored in one table (same database and schema).
  • Isolation is provided by the means of a tenant identifier that is stored in a column.

Multiple process engines can be configured like this:

<process-application
  xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <process-archive name="tenant1-archive">
    <process-engine>tenant1</process-engine>
    <properties>
      <property name="resourceRootPath">classpath:processes/tenant1/</property>
      <property name="isDeleteUponUndeploy">false</property>
      <property name="isScanForProcessDefinitions">true</property>
    </properties>
  </process-archive>

  <process-archive name="tenant2-archive">
    <process-engine>tenant2</process-engine>
    <properties>
      <property name="resourceRootPath">classpath:processes/tenant2/</property>
      <property name="isDeleteUponUndeploy">false</property>
      <property name="isScanForProcessDefinitions">true</property>
    </properties>
  </process-archive>

</process-application>
1 Like