org.kie.internal.builder.fluent

## Interface WorkItemManagerFluent<T,P,U>

-     public interface WorkItemManagerFluent<T,P,U>

  A work item manager is responsible for finding the right work item handler when a work item should be executed and should be notified when this work item has been completed (or aborted).

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `abortWorkItem(long id)` Notifies the work item manager that the work item with the given id could not be executed and should be aborted.
    `T` | `completeWorkItem(long id, Map<String,Object> results)` Notifies the work item manager that the work item with the given id has been completed.
    `KieSessionFluent` | `getKieSession()`
    `T` | `registerWorkItemHandler(String workItemName, org.kie.api.runtime.process.WorkItemHandler handler)` Register the given handler for all work items of the given type of work

- - ### Method Detail

    - #### completeWorkItem

          T completeWorkItem(long id,
                             Map<String,Object> results)

      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

          T abortWorkItem(long id)

      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

    - #### registerWorkItemHandler

          T registerWorkItemHandler(String workItemName,
                                    org.kie.api.runtime.process.WorkItemHandler 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

    - #### getKieSession

          KieSessionFluent getKieSession()

Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.