Interface CaseDefinitionStartLifecycleHandler
- All Known Implementing Classes:
EventRegistryCaseDefinitionStartLifecycleHandler
public interface CaseDefinitionStartLifecycleHandler
Implemented by an opt-in handler attached to a
Case that owns a deploy-time start trigger
(event-registry subscription, timer cron, custom subscription type, etc.). The
CmmnDeployer iterates the handlers attached to each case via
Case.getStartLifecycleHandlers() and calls deploy(CaseDefinitionStartDeployContext) on the freshly-deployed case
definition's handlers / undeploy(CaseDefinitionStartUndeployContext) on the previous (now-superseded) case definition's
handlers.
Restoration after deployment-deletion goes through deploy(CaseDefinitionStartDeployContext) too — the deploy context's
isRestoringPreviousVersion() flag distinguishes it from a fresh deploy. Both methods must
be implemented; a handler that opts into the deploy-time lifecycle owns both halves.
Custom integrations install additional handlers via a custom CmmnParseHandler (registered
in customCmmnParseHandlers) that calls case.addStartLifecycleHandler(...) during
parsing. Multiple handlers may co-exist on a single case.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeploy(CaseDefinitionStartDeployContext context) Register the deploy-time artifact (event subscription, timer job, etc.) for this case definition's start trigger when it is freshly deployed.voidRemove or update the deploy-time artifact for this case definition's start trigger when its case definition is superseded by a new version.
-
Method Details
-
deploy
Register the deploy-time artifact (event subscription, timer job, etc.) for this case definition's start trigger when it is freshly deployed. Also called via the deployment-deletion restoration path when the previous version's start triggers are restored — distinguished byCaseDefinitionStartDeployContext.isRestoringPreviousVersion(). -
undeploy
Remove or update the deploy-time artifact for this case definition's start trigger when its case definition is superseded by a new version. Called on the previous (now-superseded) case definition's handlers.
-