org.camunda.bpm.engine.impl.bpmn.behavior
Class AbstractBpmnActivityBehavior

java.lang.Object
  extended by org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
      extended by 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, 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

Nested Class Summary
 class AbstractBpmnActivityBehavior.ErrorDeclarationForProcessInstanceFinder
           
protected  class AbstractBpmnActivityBehavior.ErrorPropagationException
           
 
Field Summary
protected static BpmnBehaviorLogger LOG
           
 
Fields inherited from class org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
bpmnActivityBehavior
 
Constructor Summary
AbstractBpmnActivityBehavior()
           
 
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 org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
execute, leaveIgnoreConditions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final BpmnBehaviorLogger LOG
Constructor Detail

AbstractBpmnActivityBehavior

public AbstractBpmnActivityBehavior()
Method Detail

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 execution
ex - 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 © 2015 camunda services GmbH. All rights reserved.