Class DocumentEventSubscriptionRegistrar

java.lang.Object
com.flowable.platform.engine.impl.documentevent.runtime.DocumentEventSubscriptionRegistrar

public final class DocumentEventSubscriptionRegistrar extends Object
Resolves expressions on a DocumentEventDeclaration, resolves each location row to a concrete content-folder id (or scope-folder id, depending on the scope), and persists one EventSubscriptionEntity per (lifecycle × location) pair. Each subscription is keyed by the synthetic __flowableDocument* event type and a correlation-key string derived from that single row's folderId / scopeFolderId. The standard BpmnEventRegistryEventConsumer / CmmnEventRegistryEventConsumer match these against the inbound EventInstance broadcast by DocumentEventContentItemListener. Multi-row matching is therefore inherent — each row is its own subscription, and OSS will route the event to any subscription whose correlation key matches.

When the declaration's location list is empty the activity matches documents in any folder — the registrar produces one subscription per lifecycle with no correlation key, which matches every inbound event of that lifecycle via the empty-set powerset entry.

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    deleteForBpmn(org.flowable.engine.delegate.DelegateExecution execution)
     
    static void
    deleteForCmmn(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, String planItemInstanceId)
     
    static String
    eventTypeFor(String lifecycle)
    Returns the synthetic event-registry key for a single modeler-facing lifecycle value.
    static void
    registerForBpmn(DocumentEventDeclaration parsed, org.flowable.engine.delegate.DelegateExecution execution)
     
    static void
    registerForBpmnStart(DocumentEventDeclaration parsed, org.flowable.engine.impl.persistence.entity.ProcessDefinitionEntity processDefinition, String activityId, org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl processEngineConfiguration, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
    Register deploy-time subscriptions for a process-level / event-sub-process start event.
    static void
    registerForCmmn(DocumentEventDeclaration parsed, org.flowable.common.engine.impl.interceptor.CommandContext commandContext, org.flowable.cmmn.engine.impl.persistence.entity.PlanItemInstanceEntity planItemInstance)
     
    static void
    registerForCmmnCaseStart(DocumentEventDeclaration parsed, org.flowable.cmmn.engine.CmmnEngineConfiguration cmmnEngineConfiguration, org.flowable.cmmn.engine.impl.persistence.entity.CaseDefinitionEntity caseDefinition, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
    Register deploy-time subscriptions for a case-level start trigger.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • registerForBpmnStart

      public static void registerForBpmnStart(DocumentEventDeclaration parsed, org.flowable.engine.impl.persistence.entity.ProcessDefinitionEntity processDefinition, String activityId, org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl processEngineConfiguration, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
      Register deploy-time subscriptions for a process-level / event-sub-process start event. No execution exists yet; the subscription is keyed on processDefinitionId only.
    • registerForBpmn

      public static void registerForBpmn(DocumentEventDeclaration parsed, org.flowable.engine.delegate.DelegateExecution execution)
    • deleteForBpmn

      public static void deleteForBpmn(org.flowable.engine.delegate.DelegateExecution execution)
    • registerForCmmnCaseStart

      public static void registerForCmmnCaseStart(DocumentEventDeclaration parsed, org.flowable.cmmn.engine.CmmnEngineConfiguration cmmnEngineConfiguration, org.flowable.cmmn.engine.impl.persistence.entity.CaseDefinitionEntity caseDefinition, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
      Register deploy-time subscriptions for a case-level start trigger.
    • registerForCmmn

      public static void registerForCmmn(DocumentEventDeclaration parsed, org.flowable.common.engine.impl.interceptor.CommandContext commandContext, org.flowable.cmmn.engine.impl.persistence.entity.PlanItemInstanceEntity planItemInstance)
    • deleteForCmmn

      public static void deleteForCmmn(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, String planItemInstanceId)
    • eventTypeFor

      public static String eventTypeFor(String lifecycle)
      Returns the synthetic event-registry key for a single modeler-facing lifecycle value.