Package org.jbpm.process.workitem.bpmn2

## Class BusinessRuleTaskHandler

- java.lang.Object
- - org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler
  - - org.jbpm.process.workitem.bpmn2.AbstractRuleTaskHandler
    - - org.jbpm.process.workitem.bpmn2.BusinessRuleTaskHandler

- All Implemented Interfaces:
    `org.kie.api.runtime.process.WorkItemHandler`, `org.kie.internal.runtime.Cacheable`

      @Wid(widfile="BusinessRuleTaskDefinitions.wid",name="BusinessRuleTask",displayName="BusinessRuleTask",defaultHandler="mvel: new org.jbpm.process.workitem.bpmn2.BusinessRuleTaskHandler()",documentation="jbpm-workitems-bpmn2/index.html",category="jbpm-workitems-bpmn2",icon="defaultbusinessruletaskicon.png",parameters={@WidParameter(name="KieSessionName",required=true),@WidParameter(name="KieSessionType")},mavenDepends=@WidMavenDepends(group="org.jbpm",artifact="jbpm-workitems-bpmn2",version="7.61.0-SNAPSHOT"),serviceInfo=@WidService(category="BPMN2",description="Execute business rule or service tasks",keywords="business,rule,task",action=@WidAction(title="Execute a business rule task"),authinfo=@WidAuth(required=true,params={"groupId","artifactId","version"},paramsdescription={"Group Id","Artifact Id","Version"})))
      public class BusinessRuleTaskHandler
      extends AbstractRuleTaskHandler

  Additional BusinessRuleTask support that allows to decouple rules from processes - as default BusinessRuleTask uses exact same working memory (kie session) as process which essentially means same kbase. To allow better separation and maintainability BusinessRuleTaskHandler is provided that supports:
  - DRL stateful
  - DRL stateless

  Session type can be given by KieSessionType data input and session name can be given as KieSessionName property -these apply to DRL only.

  Results returned will be then put back into the data outputs.
  DRL handling is based on same names for data input and output as that is then used as correlation.

- - ### Field Summary

    - ### Fields inherited from class org.jbpm.process.workitem.bpmn2.AbstractRuleTaskHandler

      `DMN_LANG, DRL_LANG, STATEFUL_TYPE, STATEFULL_TYPE, STATELESS_TYPE`

    - ### Fields inherited from class org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler

      `handlingProcessId, handlingStrategy, logThrownException, retries`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BusinessRuleTaskHandler​(String groupId, String artifactId, String version)` |
    `BusinessRuleTaskHandler​(String groupId, String artifactId, String version, long scannerInterval)` |
    `BusinessRuleTaskHandler​(String groupId, String artifactId, String version, long scannerInterval, ClassLoader classLoader, org.kie.api.runtime.manager.RuntimeManager runtimeManager)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getRuleLanguage()` |

    - ### Methods inherited from class org.jbpm.process.workitem.bpmn2.AbstractRuleTaskHandler

      `abortWorkItem, close, executeWorkItem, getKieContainer, handleDMN, handleStatefull, handleStateless, setRuntimeManager`

    - ### Methods inherited from class org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler

      `findNodeInstance, handleException, handleException, setLogThrownException`

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

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

- - ### Constructor Detail

    - #### BusinessRuleTaskHandler

          public BusinessRuleTaskHandler​(String groupId,
                                         String artifactId,
                                         String version)

    - #### BusinessRuleTaskHandler

          public BusinessRuleTaskHandler​(String groupId,
                                         String artifactId,
                                         String version,
                                         long scannerInterval)

    - #### BusinessRuleTaskHandler

          public BusinessRuleTaskHandler​(String groupId,
                                         String artifactId,
                                         String version,
                                         long scannerInterval,
                                         ClassLoader classLoader,
                                         org.kie.api.runtime.manager.RuntimeManager runtimeManager)

  - ### Method Detail

    - #### getRuleLanguage

          public String getRuleLanguage()

      Specified by:
        `getRuleLanguage` in class `AbstractRuleTaskHandler`