Multitenancy

Workflow Engine and Workflow Server support multi-tenancy. You can pass a Tenant Id to the process and use it. A Tenant Id is a string.

Table of contents

  1. Multitenancy Support in Workflow Engine
  2. Multitenancy Support in Workflow Server
  3. Tags of Schemes

Multitenancy Support in Workflow Engine

Table of contents

A Tenant Id is always passed at the process creation and cannot be changed further.

var createInstanceParams = new CreateInstanceParams("SchemeCod", processId)
{
  TenantId = "TenantId"
};

workflowRuntime.CreateInstance(createInstanceParams);

After setting, you can always get the Tenant Id value from the process instance; and, use it as you wish.

string tenantId =  processInstance.TenantId;

Multitenancy Support in Workflow Server

Table of contents

A Tenant Id is passed with each request to the Workflow API. On creating a process, the Tenant Id is recorded to it. Hereinafter, the Tenant Id must be passed with each request; the system will check the correspondence of the passed Tenant Id to the one recorded in the process.

Tenant Id

Tags of Schemes

Table of contents

Each process scheme can be assigned a set of tags. Further, you can search for schemes with the given tags. For example, if you want to allow access to a scheme for selected tenants only, you can use the tags of this scheme.

Tags of Schemes in Workflow Engine

Table of contents

You can set tags either programmatically or in the schemes designer.

Using a code:

workflowRuntime.Builder.AddSchemeTags("SchemeCode",new List<string>() {"tag1", "tag2"});
workflowRuntime.Builder.RemoveSchemeTags("SchemeCode",new List<string>() {"tag1", "tag2"});

Using the schemes designer:

Tags

You can find scheme codes by tags using the following instruction:

workflowRuntime.GetSchemeCodes(new List<string>() {"tag1", "tag2"});

The search condition is OR. That is, the method returns all scheme codes with at least one of the tags indicated.

Tags of Schemes in Workflow Server

Table of contents

In Workflow Server, tags can be specified in the list of schemes directly.

Tags

To search for schemes by tags, you should use the getschemelist method from the Workflow API.

Tags search

Top