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 Type
    Method
    Description
    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.
  • 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 like CmmnEngineAgenda.planTerminatePlanItemInstanceOperation(PlanItemInstanceEntity, String, String) or CmmnEngineAgenda.planCompletePlanItemInstanceOperation(PlanItemInstanceEntity).
      Parameters:
      commandContext - the command context under which this hook gets invoked
      planItemInstanceEntity - the plan item instance to put into an ending state
      parentEndTransition - 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 instance
      exitEventType - 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)