Class CompletionEvaluationResult
java.lang.Object
org.flowable.cmmn.engine.impl.util.CompletionEvaluationResult
A class holding the result from evaluating a stage or case plan model for completion. Evaluation can happen on two modes: with autocompletion in mind or
without. The difference being whether there is still optional work available or not.
- Author:
- Micha Kiener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final boolean
protected final PlanItemInstanceEntity
protected final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionCompletionEvaluationResult
(boolean isCompletable, boolean shouldBeCompleted, PlanItemInstanceEntity planItemInstance) -
Method Summary
Modifier and TypeMethodDescriptionReturns the first plan item preventing the stage or case from being completed.boolean
Returns true, if the plan item (most likely a stage or a case plan model) is completable, meaning, there is no more active or required work to be done, but it might still have available or enabled plan items.boolean
Returns true, if the plan item (most likely a stage or case plan model) should be completed according the state of all of its enclosed plan items, their required rules, availability state and the plan items autocomplete mode.
-
Field Details
-
isCompletable
protected final boolean isCompletable -
shouldBeCompleted
protected final boolean shouldBeCompleted -
planItemInstance
-
-
Constructor Details
-
CompletionEvaluationResult
public CompletionEvaluationResult(boolean isCompletable, boolean shouldBeCompleted, PlanItemInstanceEntity planItemInstance)
-
-
Method Details
-
isCompletable
public boolean isCompletable()Returns true, if the plan item (most likely a stage or a case plan model) is completable, meaning, there is no more active or required work to be done, but it might still have available or enabled plan items.- Returns:
- true if the plan item is completable
-
shouldBeCompleted
public boolean shouldBeCompleted()Returns true, if the plan item (most likely a stage or case plan model) should be completed according the state of all of its enclosed plan items, their required rules, availability state and the plan items autocomplete mode. If autocomplete is activated, this flag will represent the same as the completable one, if not, it might be different.- Returns:
- whether the plan item should be completed
-
getPlanItemInstance
Returns the first plan item preventing the stage or case from being completed. This will be null, ifisCompletable()
is true, otherwise it contains the plan item which first prevented it from being completed.- Returns:
- the plan item first preventing the case or stage from being completable, might be null if it is actually completable
-