Class AbstractMovePlanItemInstanceToTerminalStateOperation

    • Constructor Detail

      • AbstractMovePlanItemInstanceToTerminalStateOperation

        public AbstractMovePlanItemInstanceToTerminalStateOperation​(CommandContext commandContext,
                                                                    PlanItemInstanceEntity planItemInstanceEntity)
    • Method Detail

      • isAsyncLeave

        protected boolean isAsyncLeave​(PlanItemInstanceEntity planItemInstanceEntity,
                                       org.flowable.cmmn.model.PlanItemDefinition planItemDefinition)
      • getVariableAggregations

        protected org.flowable.cmmn.model.VariableAggregationDefinitions getVariableAggregations()
      • internalExecute

        protected abstract void internalExecute()
        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 class AbstractChangePlanItemInstanceStateOperation
      • isRepeatingOnDelete

        public boolean isRepeatingOnDelete​(String originalState,
                                           String newState)
      • isWithoutStageOrParentIsNotTerminated

        public boolean isWithoutStageOrParentIsNotTerminated​(PlanItemInstanceEntity planItemInstanceEntity)
      • hasRepetitionRuleAndNoEntryCriteria

        public boolean hasRepetitionRuleAndNoEntryCriteria​(org.flowable.cmmn.model.PlanItem planItem)
        Returns true, if the given plan item has a repetition rule, but no entry criteria to be satisfied and no collection based repetition. A collection based repetition is similar to entry criteria as it needs to be available in order to repeat the plan item.
        Parameters:
        planItem - the plan item to test
        Returns:
        true, if the plan item has a repetition rule without any conditions like entry criteria or a collection to be based on for repetition
      • hasRepetitionOnCollection

        public boolean hasRepetitionOnCollection​(org.flowable.cmmn.model.PlanItem planItem)
      • hasMaxInstanceCount

        public boolean hasMaxInstanceCount​(org.flowable.cmmn.model.PlanItem planItem)
      • hasRepetitionRuleEntryCriteria

        public boolean hasRepetitionRuleEntryCriteria​(org.flowable.cmmn.model.PlanItem planItem)
      • hasRepetitionRule

        public boolean hasRepetitionRule​(org.flowable.cmmn.model.PlanItem planItem)
      • isWaitingForRepetitionPlanItemInstanceExists

        public boolean isWaitingForRepetitionPlanItemInstanceExists​(PlanItemInstanceEntity planItemInstanceEntity)
      • exitChildPlanItemInstances

        protected void exitChildPlanItemInstances​(String parentTransition,
                                                  String exitCriterionId,
                                                  String exitEventType)
        Exits (terminates) all child plan items of the current one (e.g. if the current one is a stage or plan model) on a terminate or complete transition of the parent as in this case, child plan items not being in an ending state must also be terminated. Depending on the plan item behavior, it might be delegated to the behavior or the default one is to simply exit the child plan item as well.
        Parameters:
        parentTransition - the transition of the parent plan item to an ending state as it might have an impact on how to end the child plan item
        exitCriterionId - the optional exit criterion being triggered on the parent to end it, might be null
        exitEventType - the optional exit event type, if an exit sentry was triggered, as it might have an impact on the child ending as well
      • aggregateVariablesForSingleInstance

        protected void aggregateVariablesForSingleInstance​(PlanItemInstanceEntity planItemInstanceEntity,
                                                           org.flowable.cmmn.model.VariableAggregationDefinitions aggregations)
      • aggregateVariablesForAllInstances

        protected void aggregateVariablesForAllInstances​(PlanItemInstanceEntity planItemInstanceEntity,
                                                         org.flowable.cmmn.model.VariableAggregationDefinitions aggregations)
      • shouldAggregateForSingleInstance

        protected abstract boolean shouldAggregateForSingleInstance()
        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
      • shouldAggregateForMultipleInstances

        protected abstract boolean shouldAggregateForMultipleInstances()
        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
      • isEvaluateRepetitionRule

        public abstract boolean isEvaluateRepetitionRule()
      • getAsyncLeaveTransitionMetadata

        protected abstract Map<String,​String> getAsyncLeaveTransitionMetadata()