Interface OnParentEndDependantActivityBehavior
- All Known Implementing Classes:
CasePageTaskActivityBehaviour
public interface OnParentEndDependantActivityBehavior
Implement this behavior interface if you want to hook into the end semantics of a plan item depending on its parent ending transition. As an example, the
case page behavior implements this interface to control the delegated ending whenever its parent (e.g. a stage or the root plan model) gets completed or
terminated.
By implementing this interface, you overwrite the default behavior which delegates the ending to its children by terminating them, regardless, if it got
completed or terminated. It also means you MUST either complete, terminate or exit the plan item, otherwise it would be left in a wrong state when its
parent gets ended.
- Author:
- Micha Kiener
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onParentEnd
(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity, String parentEndTransition, String exitEventType) This method will be triggered on a child plan item instance whenever its parent transitions to an ending state with all necessary information to implement the necessary behavior.
-
Method Details
-
onParentEnd
void onParentEnd(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity, String parentEndTransition, String exitEventType) This method will be triggered on a child plan item instance whenever its parent transitions to an ending state with all necessary information to implement the necessary behavior. MAKE SURE that you will put the provided plan item instance to an ending state by triggering the appropriate operation on the agenda likeCmmnEngineAgenda.planTerminatePlanItemInstanceOperation(PlanItemInstanceEntity, String, String)
orCmmnEngineAgenda.planCompletePlanItemInstanceOperation(PlanItemInstanceEntity)
.- Parameters:
commandContext
- the command context under which this hook gets invokedplanItemInstanceEntity
- the plan item instance to put into an ending stateparentEndTransition
- the transition of the parent plan item instance to its ending state as it might have an impact on how to end this plan item instanceexitEventType
- the optional exit event type (e.g.Criterion.EXIT_EVENT_TYPE_COMPLETE
, etc) if the parent was ended through an exit sentry, the exit event type will contain information on how exactly the exit was triggered (e.g. exit or complete, etc)
-