Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.1.0-SNAPSHOT
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.bpmn2.handler
Class SignallingTaskHandlerDecorator

    java.lang.Object
      org.jbpm.bpmn2.handler.AbstractExceptionHandlingTaskHandler
          org.jbpm.bpmn2.handler.SignallingTaskHandlerDecorator

All Implemented Interfaces:
  WorkItemHandler

    public class SignallingTaskHandlerDecorator

extends AbstractExceptionHandlingTaskHandler

This class will wrap a `WorkItemHandler` instance so that an event (signal, error or other) can be sent to the process instance if and when the wrapped `WorkItemHandler` instance throws an exception (during a `WorkItemHandler.executeWorkItem(WorkItem, WorkItemManager)` or `WorkItemHandler.abortWorkItem(WorkItem, WorkItemManager)` method.

In order to prevent an endless loop, the signal will only be sent once. If the signal should be sent the next time the same wrapped `WorkItemHandler` instance throws an exception, the `SignallingTaskHandlerDecorator` instance must either be reset via the `clear()` or `clearProcessInstance(Long)` methods.

Otherwise, the number of exceptions handled can be changed via the `WorkItemHandler#setExceptionCountLimit` method.

This class is not thread-safe.

Constructor Summary
`SignallingTaskHandlerDecorator(Class<? extends WorkItemHandler> originalTaskHandlerClass, String eventType)` Constructs an instance that uses the given `eventType` parameter to signal the process instance using the given `KieSession` `ksession` parameter when an instance of the class specified by the `originalTaskHandlerClass` throws an exception upon `WorkItemHandler.executeWorkItem(WorkItem, WorkItemManager)`
`SignallingTaskHandlerDecorator(WorkItemHandler originalTaskHandler, String eventType)`

Method Summary
`void` | `clear()`
`void` | `clearProcessInstance(Long processInstanceId)`
`String` | `getWorkItemExceptionParameterName()`
`void` | `handleAbortException(Throwable cause, WorkItem workItem, WorkItemManager manager)`
`void` | `handleExecuteException(Throwable cause, WorkItem workItem, WorkItemManager manager)`
`void` | `setExceptionCountLimit(int limit)`
`void` | `setWorkItemExceptionParameterName(String parameterName)`

Methods inherited from class org.jbpm.bpmn2.handler.AbstractExceptionHandlingTaskHandler
`abortWorkItem, executeWorkItem, getOriginalTaskHandler`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SignallingTaskHandlerDecorator

    public SignallingTaskHandlerDecorator(Class<? extends WorkItemHandler> originalTaskHandlerClass,
                                          String eventType)

  Constructs an instance that uses the given `eventType` parameter to signal the process instance using the given `KieSession` `ksession` parameter when an instance of the class specified by the `originalTaskHandlerClass` throws an exception upon `WorkItemHandler.executeWorkItem(WorkItem, WorkItemManager)`

  Parameters:
    `originalTaskHandlerClass` -
    `eventType` -

### SignallingTaskHandlerDecorator

    public SignallingTaskHandlerDecorator(WorkItemHandler originalTaskHandler,
                                          String eventType)

Method Detail

### setWorkItemExceptionParameterName

    public void setWorkItemExceptionParameterName(String parameterName)

### getWorkItemExceptionParameterName

    public String getWorkItemExceptionParameterName()

### handleExecuteException

    public void handleExecuteException(Throwable cause,
                                       WorkItem workItem,
                                       WorkItemManager manager)

  Specified by:
    `handleExecuteException` in class `AbstractExceptionHandlingTaskHandler`

### handleAbortException

    public void handleAbortException(Throwable cause,
                                     WorkItem workItem,
                                     WorkItemManager manager)

  Specified by:
    `handleAbortException` in class `AbstractExceptionHandlingTaskHandler`

### setExceptionCountLimit

    public void setExceptionCountLimit(int limit)

### clearProcessInstance

    public void clearProcessInstance(Long processInstanceId)

### clear

    public void clear()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.1.0-SNAPSHOT
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.