REST API for process engine level tenancy


#1

I have implemented multi-tenancy using different process engine having different schema.
With this every REST API call goes to default process engine and gives 401 when try to call REST Api with user credentials from ther process enginen call REST API for tasks/processes specific to my process engine? Or this is a known limitation.


#2

Can anyone please help me here.


#3

Can you try to explain better what exactly is happening, it’s hard for me to follow from the description


#4

I have created two separate process engines (default and tenant1) which points to two separate DB schemas by updating my standalone.xml of JBoss. Now I have deployed a process with entries in process.xml to be deployed on both process engines.

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

  <process-archive name="sample-approval-ten">
    <process-engine>tenant1</process-engine>
    <properties>
      <property name="isDeleteUponUndeploy">false</property>
      <property name="isScanForProcessDefinitions">true</property>
    </properties>
  </process-archive>
  
  <process-archive name="sample-approval">
    <process-engine>default</process-engine>
    <properties>
      <property name="isDeleteUponUndeploy">false</property>
      <property name="isScanForProcessDefinitions">true</property>
    </properties>
  </process-archive>
  
</process-application>

I can successfully see the process deployed inside each process engine using Camunda Web UI.
This I have done to achieve multi tenancy.

Now I started a process from a process engine (tenant1) by using Camunda Web UI.

Now I want to claim/see/ task, for this whenever I am hitting rest API (using user credentials for tenant1 process engine) I am getting http 401. Looks like all request getting served for default process engine.

So I am looking for, is their a way to differentiate process engines during rest Api calls?

Please let me know if my question is still unclear.


#5

Any help here will be much appreciated.


#6

The default process engine is available out of the box by accessing /engine-rest/engine/default/{rest-methods} or simply /engine-rest/{rest-methods}. Any other shared (i.e., it is globally visible) process engine that is created later is available through /engine-rest/engine/{name}/{rest-methods} without any further configuration.

This answers my question.