Interface TenantIdProvider


  • public interface TenantIdProvider
    SPI which can be implemented to assign tenant ids to process instances, case instances and historic decision instances.

    The SPI is invoked if the process definition, case definition or decision definition does not have a tenant id or execution does not have a tenant id.

    An implementation of this SPI can be set on the ProcessEngineConfigurationImpl.

    Since:
    7.5
    Author:
    Daniel Meyer
    • Method Detail

      • provideTenantIdForProcessInstance

        java.lang.String provideTenantIdForProcessInstance​(TenantIdProviderProcessInstanceContext ctx)
        Invoked when a process instance is started and the Process Definition does not have a tenant id.

        Implementors can either return a tenant id or null. If null is returned the process instance is not assigned a tenant id.

        Parameters:
        ctx - holds information about the process instance which is about to be started.
        Returns:
        a tenant id or null if case the implementation does not assign a tenant id to the process instance
      • provideTenantIdForCaseInstance

        java.lang.String provideTenantIdForCaseInstance​(TenantIdProviderCaseInstanceContext ctx)
        Invoked when a case instance is started and the Case Definition does not have a tenant id.

        Implementors can either return a tenant id or null. If null is returned the case instance is not assigned a tenant id.

        Parameters:
        ctx - holds information about the case instance which is about to be started.
        Returns:
        a tenant id or null if case the implementation does not assign a tenant id to case process instance
      • provideTenantIdForHistoricDecisionInstance

        java.lang.String provideTenantIdForHistoricDecisionInstance​(TenantIdProviderHistoricDecisionInstanceContext ctx)
        Invoked when a historic decision instance is created and the Decision Definition or the Execution does not have a tenant id.

        Implementors can either return a tenant id or null. If null is returned the historic decision instance is not assigned a tenant id.

        Parameters:
        ctx - holds information about the decision definition and the execution.
        Returns:
        a tenant id or null if case the implementation does not assign a tenant id to the historic decision instance