Class CaseDefinitionStartUndeployContext

java.lang.Object
org.flowable.cmmn.engine.impl.deployer.CaseDefinitionStartUndeployContext

public class CaseDefinitionStartUndeployContext extends Object
Context passed to CaseDefinitionStartLifecycleHandler.undeploy(CaseDefinitionStartUndeployContext) when a case definition is being superseded by a new version. Carries both the previous (now-superseded) case definition and the new one — most handlers only need the previous case definition, but the EventRegistry "manual" re-point branch updates subscriptions to point at getNewCaseDefinition().

Handlers register their obsolete event subscription types via registerObsoleteEventSubscriptionType(String). The deployer issues one mass-delete per unique registered type after the undeploy iteration — fewer DB round-trips than per-handler deletes, and tighter than a fixed sweep that always ran regardless of which types the previous case definition actually used.

  • Field Details

    • previousCaseDefinition

      protected final CaseDefinitionEntity previousCaseDefinition
    • newCaseDefinition

      protected final CaseDefinitionEntity newCaseDefinition
    • previousCaseModel

      protected final Case previousCaseModel
    • cmmnEngineConfiguration

      protected final CmmnEngineConfiguration cmmnEngineConfiguration
    • commandContext

      protected final CommandContext commandContext
    • obsoleteEventSubscriptionTypes

      protected final Set<String> obsoleteEventSubscriptionTypes
  • Constructor Details

  • Method Details

    • getPreviousCaseDefinition

      public CaseDefinitionEntity getPreviousCaseDefinition()
    • getNewCaseDefinition

      public CaseDefinitionEntity getNewCaseDefinition()
    • getPreviousCaseModel

      public Case getPreviousCaseModel()
    • getCmmnEngineConfiguration

      public CmmnEngineConfiguration getCmmnEngineConfiguration()
    • getCommandContext

      public CommandContext getCommandContext()
    • getEventSubscriptionService

      public EventSubscriptionService getEventSubscriptionService()
    • registerObsoleteEventSubscriptionType

      public void registerObsoleteEventSubscriptionType(String eventType)
      Registers an event subscription event-type that the deployer should mass-delete for the previous case definition (scope-type CMMN, scope-id null) after the undeploy iteration. Multiple handlers registering the same type result in a single DB sweep.