Package org.kie.internal.runtime.manager

## Interface WorkItemHandlerProducer

-     public interface WorkItemHandlerProducer

  Allows to provide custom implementations to deliver WorkItem name and WorkItemHandler instance pairs for the runtime.
  It will be invoked by RegisterableItemsFactory implementation (especially InjectableRegisterableItemsFactory in CDI world) for every KieSession. Recommendation is to always produce new instances to avoid unexpected results.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.Map<java.lang.String,​org.kie.api.runtime.process.WorkItemHandler>` | `getWorkItemHandlers​(java.lang.String identifier, java.util.Map<java.lang.String,​java.lang.Object> params)` | Returns map of (key = work item name, value work item handler instance) of work items to be registered on KieSession Parameters that might be given are as follows: ksession taskService runtimeManager

- - ### Method Detail

    - #### getWorkItemHandlers

          java.util.Map<java.lang.String,​org.kie.api.runtime.process.WorkItemHandler> getWorkItemHandlers​(java.lang.String identifier,
                                                                                                                java.util.Map<java.lang.String,​java.lang.Object> params)

      Returns map of (key = work item name, value work item handler instance) of work items to be registered on KieSession
      Parameters that might be given are as follows:
      - ksession
      - taskService
      - runtimeManager
      Parameters:
        `identifier` - - identifier of the owner - usually RuntimeManager that allows the producer to filter out and provide valid instances for given owner
        `params` - - owner might provide some parameters, usually KieSession, TaskService, RuntimeManager instances
      Returns:
        map of work item handler instances (recommendation is to always return new instances when this method is invoked)