org.camunda.bpm.engine.impl.bpmn.behavior
Class AbstractBpmnActivityBehavior
java.lang.Object
org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
- All Implemented Interfaces:
- CoreActivityBehavior<ActivityExecution>, ActivityBehavior, SignallableActivityBehavior
- Direct Known Subclasses:
- CallableElementActivityBehavior, CancelEndEventActivityBehavior, ClassDelegateActivityBehavior, DmnBusinessRuleTaskActivityBehavior, ErrorEndEventActivityBehavior, ExternalTaskActivityBehavior, IntermediateCatchEventActivityBehavior, IntermediateCatchLinkEventActivityBehavior, IntermediateThrowSignalEventActivityBehavior, MailActivityBehavior, MultiInstanceActivityBehavior, ShellActivityBehavior, SubProcessActivityBehavior, TaskActivityBehavior, ThrowEscalationEventActivityBehavior
public class AbstractBpmnActivityBehavior
- extends FlowNodeActivityBehavior
Denotes an 'activity' in the sense of BPMN 2.0:
a parent class for all tasks, subprocess and callActivity.
- Author:
- Joram Barrez, Daniel Meyer, Thorben Lindhauer
|
Method Summary |
protected BpmnError |
checkIfCauseOfExceptionIsBpmnError(Throwable e)
Searches recursively through the exception to see if the exception itself
or one of its causes is a BpmnError. |
protected void |
createCompensateEventSubscription(ActivityExecution execution,
ActivityImpl compensationHandler)
|
protected void |
executeWithErrorPropagation(ActivityExecution execution,
Callable<Void> toExecute)
Takes an ActivityExecution and an Callable and wraps
the call to the Callable with the proper error propagation. |
protected boolean |
isCompensationEventSubprocess(ActivityImpl activity)
|
protected boolean |
isProcessEngineExceptionWithoutCause(Exception exception)
|
protected boolean |
isTransactionNotActive()
|
protected void |
leave(ActivityExecution execution)
Subclasses that call leave() will first pass through this method, before
the regular FlowNodeActivityBehavior.leave(ActivityExecution) is
called. |
protected void |
propagateBpmnError(BpmnError error,
ActivityExecution execution)
|
protected void |
propagateError(String errorCode,
Exception origException,
ActivityExecution execution)
|
protected void |
propagateException(ActivityExecution execution,
Exception ex)
Decides how to propagate the exception properly, e.g. |
protected void |
propagateExceptionAsError(Exception exception,
ActivityExecution execution)
|
void |
signal(ActivityExecution execution,
String signalName,
Object signalData)
|
protected void |
signalCompensationDone(ActivityExecution execution)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final BpmnBehaviorLogger LOG
AbstractBpmnActivityBehavior
public AbstractBpmnActivityBehavior()
leave
protected void leave(ActivityExecution execution)
- Subclasses that call leave() will first pass through this method, before
the regular
FlowNodeActivityBehavior.leave(ActivityExecution) is
called.
- Overrides:
leave in class FlowNodeActivityBehavior
isCompensationEventSubprocess
protected boolean isCompensationEventSubprocess(ActivityImpl activity)
createCompensateEventSubscription
protected void createCompensateEventSubscription(ActivityExecution execution,
ActivityImpl compensationHandler)
propagateExceptionAsError
protected void propagateExceptionAsError(Exception exception,
ActivityExecution execution)
throws Exception
- Throws:
Exception
executeWithErrorPropagation
protected void executeWithErrorPropagation(ActivityExecution execution,
Callable<Void> toExecute)
throws Exception
- Takes an
ActivityExecution and an Callable and wraps
the call to the Callable with the proper error propagation. This method
also makes sure that exceptions not caught by following activities in the
process will be thrown and not propagated.
- Parameters:
execution - toExecute -
- Throws:
Exception
propagateException
protected void propagateException(ActivityExecution execution,
Exception ex)
throws Exception
- Decides how to propagate the exception properly, e.g. as bpmn error or "normal" error.
- Parameters:
execution - the current executionex - the exception to propagate
- Throws:
Exception - if no error handler could be found
checkIfCauseOfExceptionIsBpmnError
protected BpmnError checkIfCauseOfExceptionIsBpmnError(Throwable e)
- Searches recursively through the exception to see if the exception itself
or one of its causes is a
BpmnError.
- Parameters:
e - the exception to check
- Returns:
- the BpmnError that was the cause of this exception or null if no
BpmnError was found
isTransactionNotActive
protected boolean isTransactionNotActive()
isProcessEngineExceptionWithoutCause
protected boolean isProcessEngineExceptionWithoutCause(Exception exception)
propagateBpmnError
protected void propagateBpmnError(BpmnError error,
ActivityExecution execution)
throws Exception
- Throws:
Exception
propagateError
protected void propagateError(String errorCode,
Exception origException,
ActivityExecution execution)
throws Exception
- Throws:
Exception
signal
public void signal(ActivityExecution execution,
String signalName,
Object signalData)
throws Exception
- Specified by:
signal in interface SignallableActivityBehavior- Overrides:
signal in class FlowNodeActivityBehavior
- Throws:
Exception
signalCompensationDone
protected void signalCompensationDone(ActivityExecution execution)
Copyright © 2016 camunda services GmbH. All rights reserved.