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
public class ReactivateCaseInstanceOperation extends AbstractCaseInstanceOperation
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
Constructors Constructor Description ReactivateCaseInstanceOperation(CommandContext commandContext, CaseInstanceEntity caseInstanceEntity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<org.flowable.cmmn.model.PlanItem>reactivateDependingPlanItems(PlanItemInstanceEntity planItemInstance, List<PlanItemInstanceEntity> planItemInstances)Reactivates all plan items having a dependency on the given plan item instance (e.g.protected PlanItemInstanceEntityreactivatePlanItem(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.voidrun()protected PlanItemInstanceEntitysearchPlanItemInstance(String planItemDefinitionId, List<PlanItemInstanceEntity> planItemInstances)StringtoString()-
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, setRepetitionCounter
-
-
-
-
Constructor Detail
-
ReactivateCaseInstanceOperation
public ReactivateCaseInstanceOperation(CommandContext commandContext, CaseInstanceEntity caseInstanceEntity)
-
-
Method Detail
-
run
public void run()
- Specified by:
runin interfaceRunnable- Overrides:
runin classAbstractCaseInstanceOperation
-
reactivateDependingPlanItems
protected List<org.flowable.cmmn.model.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
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. 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)
-
-