Camunda Multi-Tenancy processes.xml

时间:2015-02-12 22:27:04

标签: bpm multi-tenant camunda

我是camunda bpm的新手,正在按照tomcat包装版本7.2进行PoC。在我的eclipse-maven项目中,我在/ src / main / resources / processes下的每个文件夹(tenant1,tenant2,all)下都有一个.bpmn文件。虽然我能够将模型配置为单独部署到命名租户引擎,但我无法配置在“全部”下部署模型。文件夹到所有引擎(tenant1和tenant2)

这是我的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>​
&#13;
&#13;
&#13;

以上配置工作正常,但是当我添加此配置以便能够在文件夹下部署模型时所有&#39;对于所有可用的引擎,它失败了。请注意,我使用星号来指定所有我不确定的引擎。我该怎么做(指定多个或所有引擎)?

&#13;
&#13;
   <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>​
&#13;
&#13;
&#13;

感谢!

1 个答案:

答案 0 :(得分:2)

process-engine元素不支持您尝试使用的通配符或正则表达式。

我认为你必须创建一个&#34; all-archive&#34;通过写一些类似

的方式为每个租户
<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>