Class ExitPlanItemInstanceOperation
- 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.ExitPlanItemInstanceOperation
-
- All Implemented Interfaces:
Runnable
public class ExitPlanItemInstanceOperation extends AbstractMovePlanItemInstanceToTerminalStateOperation
- Author:
- Joram Barrez, Micha Kiener
-
-
Field Summary
Fields Modifier and Type Field Description protected StringexitCriterionIdprotected StringexitEventTypeprotected StringexitTypeprotected BooleanisStage-
Fields 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
Constructors Constructor Description ExitPlanItemInstanceOperation(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity, String exitCriterionId, String exitType, String exitEventType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabortOperationIfNewStateEqualsOldState()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 Map<String,String>getAsyncLeaveTransitionMetadata()StringgetExitCriterionId()StringgetExitEventType()StringgetExitType()StringgetLifeCycleTransition()StringgetNewState()StringgetOperationName()BooleangetStage()protected voidinternalExecute()Implementing classes should be aware that unlike extending from AbstractChangePlanItemInstanceStateOperation, this method will be executed just before the deleting the entitybooleanisEvaluateRepetitionRule()booleanisStage()voidsetExitCriterionId(String exitCriterionId)voidsetExitEventType(String exitEventType)voidsetExitType(String exitType)voidsetStage(Boolean stage)protected booleanshouldAggregateForMultipleInstances()Whether multi aggregation needs to be done.protected booleanshouldAggregateForSingleInstance()Whether variable aggregation should be done when a single instance completes.booleanshouldPlanItemStayInCurrentState()booleanshouldStageGoIntoCompletedState()-
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
-
-
-
-
Constructor Detail
-
ExitPlanItemInstanceOperation
public ExitPlanItemInstanceOperation(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity, String exitCriterionId, String exitType, String exitEventType)
-
-
Method Detail
-
getNewState
public String getNewState()
- Specified by:
getNewStatein classAbstractChangePlanItemInstanceStateOperation
-
abortOperationIfNewStateEqualsOldState
public boolean abortOperationIfNewStateEqualsOldState()
Description copied from class:AbstractChangePlanItemInstanceStateOperationOverwrite 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:
abortOperationIfNewStateEqualsOldStatein 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
-
shouldStageGoIntoCompletedState
public boolean shouldStageGoIntoCompletedState()
- Returns:
- true, if this plan item is a stage and according the exit sentry exit event type needs to go in complete state instead of terminated
-
shouldPlanItemStayInCurrentState
public boolean shouldPlanItemStayInCurrentState()
-
getLifeCycleTransition
public String getLifeCycleTransition()
- Specified by:
getLifeCycleTransitionin classAbstractChangePlanItemInstanceStateOperation
-
internalExecute
protected void internalExecute()
Description copied from class:AbstractMovePlanItemInstanceToTerminalStateOperationImplementing classes should be aware that unlike extending from AbstractChangePlanItemInstanceStateOperation, this method will be executed just before the deleting the entity- Specified by:
internalExecutein classAbstractMovePlanItemInstanceToTerminalStateOperation
-
isEvaluateRepetitionRule
public boolean isEvaluateRepetitionRule()
- Specified by:
isEvaluateRepetitionRulein classAbstractMovePlanItemInstanceToTerminalStateOperation
-
getAsyncLeaveTransitionMetadata
protected Map<String,String> getAsyncLeaveTransitionMetadata()
- Specified by:
getAsyncLeaveTransitionMetadatain classAbstractMovePlanItemInstanceToTerminalStateOperation
-
shouldAggregateForSingleInstance
protected boolean shouldAggregateForSingleInstance()
Description copied from class:AbstractMovePlanItemInstanceToTerminalStateOperationWhether 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:
shouldAggregateForSingleInstancein classAbstractMovePlanItemInstanceToTerminalStateOperation
-
shouldAggregateForMultipleInstances
protected boolean shouldAggregateForMultipleInstances()
Description copied from class:AbstractMovePlanItemInstanceToTerminalStateOperationWhether 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:
shouldAggregateForMultipleInstancesin classAbstractMovePlanItemInstanceToTerminalStateOperation
-
isStage
public boolean isStage()
-
getOperationName
public String getOperationName()
- Specified by:
getOperationNamein classAbstractChangePlanItemInstanceStateOperation
-
getExitCriterionId
public String getExitCriterionId()
-
setExitCriterionId
public void setExitCriterionId(String exitCriterionId)
-
getExitType
public String getExitType()
-
setExitType
public void setExitType(String exitType)
-
getExitEventType
public String getExitEventType()
-
setExitEventType
public void setExitEventType(String exitEventType)
-
getStage
public Boolean getStage()
-
setStage
public void setStage(Boolean stage)
-
-