Class ReactivateCaseInstanceOperation
java.lang.Object
org.flowable.cmmn.engine.impl.agenda.operation.CmmnOperation
org.flowable.cmmn.engine.impl.agenda.operation.AbstractCaseInstanceOperation
org.flowable.cmmn.engine.impl.agenda.operation.ReactivateCaseInstanceOperation
- All Implemented Interfaces:
Runnable
This operation reactivates a case model by first setting its reactivation event listener to active and triggering it, then in a second phase step through
all plan items having a reactivation sentry and reactivate them before the model is completely re-evaluated again for reactivation of the case.
- Author:
- Micha Kiener
-
Field Summary
Fields inherited from class org.flowable.cmmn.engine.impl.agenda.operation.AbstractCaseInstanceOperation
caseInstanceEntity, caseInstanceEntityId
Fields inherited from class org.flowable.cmmn.engine.impl.agenda.operation.CmmnOperation
commandContext, isNoop
-
Constructor Summary
ConstructorsConstructorDescriptionReactivateCaseInstanceOperation
(CommandContext commandContext, CaseInstanceEntity caseInstanceEntity) -
Method Summary
Modifier and TypeMethodDescriptionreactivateDependingPlanItems
(PlanItemInstanceEntity planItemInstance, List<PlanItemInstanceEntity> planItemInstances) Reactivates all plan items having a dependency on the given plan item instance (e.g.protected PlanItemInstanceEntity
reactivatePlanItem
(PlanItemInstanceEntity planItemInstance) Reactivates the given plan item by creating a new instance with the same data, but of course no timestamps yet set so we keep the original one in place with all its information.void
run()
protected PlanItemInstanceEntity
searchPlanItemInstance
(String planItemDefinitionId, List<PlanItemInstanceEntity> planItemInstances) toString()
Methods inherited from class org.flowable.cmmn.engine.impl.agenda.operation.AbstractCaseInstanceOperation
getCaseInstanceEntity, getCaseInstanceId, setCaseInstanceEntity, setCaseInstanceEntityId
Methods inherited from class org.flowable.cmmn.engine.impl.agenda.operation.CmmnOperation
childPlanItemInstanceForPlanItemExists, createPlanItemInstanceIfNeeded, createPlanItemInstancesForNewOrReactivatedStage, evaluateReactivationCondition, evaluateReactivationRule, getCaseInstance, getPlanItemCreationOrReactivationType, getPlanModel, getStage, isEventListenerWithAvailableCondition, isNoop, isStage, markAsNoop, onPlanned, setRepetitionCounter
-
Constructor Details
-
ReactivateCaseInstanceOperation
public ReactivateCaseInstanceOperation(CommandContext commandContext, CaseInstanceEntity caseInstanceEntity)
-
-
Method Details
-
run
public void run()- Specified by:
run
in interfaceRunnable
- Overrides:
run
in classAbstractCaseInstanceOperation
-
reactivateDependingPlanItems
protected List<PlanItem> reactivateDependingPlanItems(PlanItemInstanceEntity planItemInstance, List<PlanItemInstanceEntity> planItemInstances) Reactivates all plan items having a dependency on the given plan item instance (e.g. the reactivation listener or any other plan item being reactivated) in order to become active once it is triggered or completed. This is necessary as we don't want to force modelers to use repetition just for reactivation to work, but reactivate depending plan items automatically, even though they might have been active before.- Parameters:
planItemInstance
- the plan item instance to activate depending plan items forplanItemInstances
- the list of plan items of the case to search for depending ones- Returns:
- the list of reactivated, directly depending plan items
-
reactivatePlanItem
Reactivates the given plan item by creating a new instance with the same data, but of course no timestamps yet set so we keep the original one in place with all its information. After this reactivation make sure to plan its reactivation using the agenda for further processing of the reactivation.- Parameters:
planItemInstance
- the plan item to be reactivated- Returns:
- the newly reactivated plan item instance
-
searchPlanItemInstance
protected PlanItemInstanceEntity searchPlanItemInstance(String planItemDefinitionId, List<PlanItemInstanceEntity> planItemInstances) -
toString
-