Interface KogitoWorkItemManager


public interface KogitoWorkItemManager
  • Method Details

    • completeWorkItem

      void completeWorkItem(String id, Map<String,Object> results, Policy... policies)
      Notifies the work item manager that the work item with the given id has been completed. Results related to the execution of this work item can be passed.
      Parameters:
      id - the id of the work item that has been completed
      results - the results related to this work item, or null if there are no results
    • abortWorkItem

      void abortWorkItem(String id, Policy... policies)
      Notifies the work item manager that the work item with the given id could not be executed and should be aborted.
      Parameters:
      id - the id of the work item that should be aborted
    • updateWorkItem

      <T> T updateWorkItem(String id, Function<KogitoWorkItem,T> updater, Policy... policies)
      Updates work item, performing operation indicated by updater
      Parameters:
      id - the id of the work item that has been completed
      updater - consumer implementation that contains the logic to update workitem
      policies - optional security information
      Returns:
      result of the operation performed by updater consumer
    • registerWorkItemHandler

      void registerWorkItemHandler(String workItemName, KogitoWorkItemHandler handler)
      Register the given handler for all work items of the given type of work
      Parameters:
      workItemName - the type of work this work item handler can execute
      handler - the handler for executing work items
    • transitionWorkItem

      void transitionWorkItem(String id, WorkItemTransition transition)
      Transition work item with given id into the next life cycle phase.
      Parameters:
      id - work item id to be transitioned
      transition - actual transition to apply to work item
    • getHandlerIds

      Collection<String> getHandlerIds()
      retrieves the handlers names registered in the work item handler
      Returns:
    • getKogitoWorkItemHandler

      KogitoWorkItemHandler getKogitoWorkItemHandler(String name)
      retrieeves the handle registered by the name
      Parameters:
      name -
      Returns: