org.jbpm.services.task.wih

## Class NonManagedLocalHTWorkItemHandler

- java.lang.Object
- - org.jbpm.services.task.wih.AbstractHTWorkItemHandler
  - - org.jbpm.services.task.wih.NonManagedLocalHTWorkItemHandler

- All Implemented Interfaces:
    org.kie.api.runtime.process.WorkItemHandler

      public class NonManagedLocalHTWorkItemHandler
      extends AbstractHTWorkItemHandler

  LocalHumanTaskHandler that is intended to be used when RuntimeManager is not used, most likely in backward compatible cases where simply providing:
  - `KieSession`
  - `TaskService`
  is usual case. It will ensure that task listener will be registered on task service.
  Important notes are that this handler instance should have independent `TaskService` instances as it's `close` method will clear task listeners on the task service.
  This is not suited for CDI environments and thus it's Veto'ed.
  Can be bootstrapped in two ways:
  by constructor and providing both KieSession and TaskService
by no arg constructor and then use setters for KieSession and TaskService, after using setters call to init method is required

- - ### Field Summary

    - ### Fields inherited from class org.jbpm.services.task.wih.AbstractHTWorkItemHandler

      `action`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NonManagedLocalHTWorkItemHandler()`
    `NonManagedLocalHTWorkItemHandler(org.kie.api.runtime.KieSession ksession, org.kie.api.task.TaskService taskService)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abortWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)`
    `void` | `close()`
    `void` | `executeWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)`
    `org.kie.api.runtime.KieSession` | `getKsession()`
    `org.kie.api.task.TaskService` | `getTaskService()`
    `void` | `init()`
    `void` | `setKsession(org.kie.api.runtime.KieSession ksession)`
    `void` | `setTaskService(org.kie.api.task.TaskService taskService)`

    - ### Methods inherited from class org.jbpm.services.task.wih.AbstractHTWorkItemHandler

      `createTaskBasedOnWorkItemParams, createTaskContentBasedOnWorkItemParams, createTaskDataBasedOnWorkItemParams, isAutoClaim, setAction`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NonManagedLocalHTWorkItemHandler

          public NonManagedLocalHTWorkItemHandler()

    - #### NonManagedLocalHTWorkItemHandler

          public NonManagedLocalHTWorkItemHandler(org.kie.api.runtime.KieSession ksession,
                                                  org.kie.api.task.TaskService taskService)

  - ### Method Detail

    - #### init

          public void init()

    - #### close

          public void close()

    - #### executeWorkItem

          public void executeWorkItem(org.kie.api.runtime.process.WorkItem workItem,
                                      org.kie.api.runtime.process.WorkItemManager manager)

      Specified by:
        `executeWorkItem` in interface `org.kie.api.runtime.process.WorkItemHandler`
      Specified by:
        `executeWorkItem` in class `AbstractHTWorkItemHandler`

    - #### abortWorkItem

          public void abortWorkItem(org.kie.api.runtime.process.WorkItem workItem,
                                    org.kie.api.runtime.process.WorkItemManager manager)

      Specified by:
        `abortWorkItem` in interface `org.kie.api.runtime.process.WorkItemHandler`
      Specified by:
        `abortWorkItem` in class `AbstractHTWorkItemHandler`

    - #### getKsession

          public org.kie.api.runtime.KieSession getKsession()

    - #### setKsession

          public void setKsession(org.kie.api.runtime.KieSession ksession)

    - #### getTaskService

          public org.kie.api.task.TaskService getTaskService()

    - #### setTaskService

          public void setTaskService(org.kie.api.task.TaskService taskService)

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