Class TerminatePlanItemInstanceOperation
java.lang.Object
org.flowable.cmmn.engine.impl.agenda.operation.CmmnOperation
org.flowable.cmmn.engine.impl.agenda.operation.AbstractPlanItemInstanceOperation
org.flowable.cmmn.engine.impl.agenda.operation.AbstractChangePlanItemInstanceStateOperation
org.flowable.cmmn.engine.impl.agenda.operation.AbstractMovePlanItemInstanceToTerminalStateOperation
org.flowable.cmmn.engine.impl.agenda.operation.TerminatePlanItemInstanceOperation
- All Implemented Interfaces:
Runnable
public class TerminatePlanItemInstanceOperation
extends AbstractMovePlanItemInstanceToTerminalStateOperation
- Author:
- Joram Barrez
-
Field Summary
FieldsFields inherited from class org.flowable.cmmn.engine.impl.agenda.operation.AbstractPlanItemInstanceOperation
planItemInstanceEntity
Fields inherited from class org.flowable.cmmn.engine.impl.agenda.operation.CmmnOperation
commandContext, isNoop
-
Constructor Summary
ConstructorsConstructorDescriptionTerminatePlanItemInstanceOperation
(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity, String exitType, String exitEventType) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Overwrite this default implemented hook, if the operation should be aborted on a void transition which might be the case, if the old and new state will be the same.protected void
Implementing classes should be aware that unlike extending from AbstractChangePlanItemInstanceStateOperation, this method will be executed just before the deleting the entityboolean
void
setExitEventType
(String exitEventType) void
setExitType
(String exitType) protected boolean
Whether multi aggregation needs to be done.protected boolean
Whether variable aggregation should be done when a single instance completes.Methods inherited from class org.flowable.cmmn.engine.impl.agenda.operation.AbstractMovePlanItemInstanceToTerminalStateOperation
aggregateVariablesForAllInstances, aggregateVariablesForSingleInstance, exitChildPlanItemInstances, getVariableAggregations, hasMaxInstanceCount, hasRepetitionOnCollection, hasRepetitionRule, hasRepetitionRuleAndNoEntryCriteria, hasRepetitionRuleEntryCriteria, isAsyncLeave, isRepeatingOnDelete, isWaitingForRepetitionPlanItemInstanceExists, isWithoutStageOrParentIsNotTerminated, resolveEventDefinitionKey, run
Methods inherited from class org.flowable.cmmn.engine.impl.agenda.operation.AbstractChangePlanItemInstanceStateOperation
createPlanItemLifeCycleEvent, isStateNotChanged, toString
Methods inherited from class org.flowable.cmmn.engine.impl.agenda.operation.AbstractPlanItemInstanceOperation
getCaseInstanceId, getCurrentTime, getPlanItemInstanceEntity, removeSentryRelatedData, setPlanItemInstanceEntity
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
-
Field Details
-
exitType
-
exitEventType
-
-
Constructor Details
-
TerminatePlanItemInstanceOperation
public TerminatePlanItemInstanceOperation(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity, String exitType, String exitEventType)
-
-
Method Details
-
getNewState
- Specified by:
getNewState
in classAbstractChangePlanItemInstanceStateOperation
-
getLifeCycleTransition
- Specified by:
getLifeCycleTransition
in classAbstractChangePlanItemInstanceStateOperation
-
isEvaluateRepetitionRule
public boolean isEvaluateRepetitionRule()- Specified by:
isEvaluateRepetitionRule
in classAbstractMovePlanItemInstanceToTerminalStateOperation
-
shouldAggregateForSingleInstance
protected boolean shouldAggregateForSingleInstance()Description copied from class:AbstractMovePlanItemInstanceToTerminalStateOperation
Whether variable aggregation should be done when a single instance completes. This does not need to check whether the plan item instance has variable aggregations, that is the same for all instances. e.g. When an instance completes normally we should aggregate the data, but if it terminates we shouldn't- Specified by:
shouldAggregateForSingleInstance
in classAbstractMovePlanItemInstanceToTerminalStateOperation
-
shouldAggregateForMultipleInstances
protected boolean shouldAggregateForMultipleInstances()Description copied from class:AbstractMovePlanItemInstanceToTerminalStateOperation
Whether multi aggregation needs to be done. This does not need to check whether the plan item instance has variable aggregations, that is the same for all instances. e.g. Multi aggregation needs to be done when we do a normal completion, but not when the plan items are terminated- Specified by:
shouldAggregateForMultipleInstances
in classAbstractMovePlanItemInstanceToTerminalStateOperation
-
internalExecute
protected void internalExecute()Description copied from class:AbstractMovePlanItemInstanceToTerminalStateOperation
Implementing classes should be aware that unlike extending from AbstractChangePlanItemInstanceStateOperation, this method will be executed just before the deleting the entity- Specified by:
internalExecute
in classAbstractMovePlanItemInstanceToTerminalStateOperation
-
getAsyncLeaveTransitionMetadata
- Specified by:
getAsyncLeaveTransitionMetadata
in classAbstractMovePlanItemInstanceToTerminalStateOperation
-
abortOperationIfNewStateEqualsOldState
public boolean abortOperationIfNewStateEqualsOldState()Description copied from class:AbstractChangePlanItemInstanceStateOperation
Overwrite this default implemented hook, if the operation should be aborted on a void transition which might be the case, if the old and new state will be the same.- Overrides:
abortOperationIfNewStateEqualsOldState
in classAbstractChangePlanItemInstanceStateOperation
- Returns:
- true, if this operation should be aborted, if the new plan item state is the same as the old one, false, if the operation is to be executed in any case
-
getOperationName
- Specified by:
getOperationName
in classAbstractChangePlanItemInstanceStateOperation
-
getExitType
-
setExitType
-
getExitEventType
-
setExitEventType
-