Jay D
Jay D

Reputation: 93

Camunda Multi-Tenancy processes.xml

I'm new to camunda bpm and am doing a PoC by following the tomcat packaging ver 7.2. In my eclipse-maven project, I have one .bpmn file under each of the folder (tenant1, tenant2, all) located under /src/main/resources/processes. While I'm able to configure the models to be deployed separately to named tenant engines, I'm not able to configure for deploying the models under 'all' folder to all the engines (tenant1 and tenant2)

Here is my processes.xml:

<?xml version="1.0" encoding="UTF-8" ?>

<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>​

The above config works fine but when I add this config to be able deploy models under folder 'all' to all the available engines, it fails. Note that I'm using an asterisk to specify all engines which is what I'm not sure of. How do I do this (specify multiple or all engines)?

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

Thanks.!

Upvotes: 1

Views: 1370

Answers (1)

thorben
thorben

Reputation: 1587

Something like a wildcard or a regular expression that you tried to use is not supported in the process-engine element.

I think you have to create an "all-archive" for each tenant by writing something like

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

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

Upvotes: 2

Related Questions