Class ReactivateCaseInstanceOperation

All Implemented Interfaces:
Runnable

public class ReactivateCaseInstanceOperation extends AbstractCaseInstanceOperation
This operation reactivates a case model by first setting its reactivation event listener to active and triggering it, then in a second phase step through all plan items having a reactivation sentry and reactivate them before the model is completely re-evaluated again for reactivation of the case.
Author:
Micha Kiener
  • Constructor Details

  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class AbstractCaseInstanceOperation
    • reactivateDependingPlanItems

      protected List<PlanItem> reactivateDependingPlanItems(PlanItemInstanceEntity planItemInstance, List<PlanItemInstanceEntity> planItemInstances)
      Reactivates all plan items having a dependency on the given plan item instance (e.g. the reactivation listener or any other plan item being reactivated) in order to become active once it is triggered or completed. This is necessary as we don't want to force modelers to use repetition just for reactivation to work, but reactivate depending plan items automatically, even though they might have been active before.
      Parameters:
      planItemInstance - the plan item instance to activate depending plan items for
      planItemInstances - the list of plan items of the case to search for depending ones
      Returns:
      the list of reactivated, directly depending plan items
    • reactivatePlanItem

      protected PlanItemInstanceEntity reactivatePlanItem(PlanItemInstanceEntity planItemInstance)
      Reactivates the given plan item by creating a new instance with the same data, but of course no timestamps yet set so we keep the original one in place with all its information. After this reactivation make sure to plan its reactivation using the agenda for further processing of the reactivation.
      Parameters:
      planItemInstance - the plan item to be reactivated
      Returns:
      the newly reactivated plan item instance
    • searchPlanItemInstance

      protected PlanItemInstanceEntity searchPlanItemInstance(String planItemDefinitionId, List<PlanItemInstanceEntity> planItemInstances)
    • toString

      public String toString()
      Overrides:
      toString in class Object