Search in sources :

Example 1 with ExternalTaskActivityBehavior

use of org.camunda.bpm.engine.impl.bpmn.behavior.ExternalTaskActivityBehavior in project camunda-bpm-platform by camunda.

the class ExternalTaskEntity method bpmnError.

public void bpmnError(String errorCode) {
    ensureActive();
    ActivityExecution activityExecution = getExecution();
    BpmnError bpmnError = new BpmnError(errorCode);
    try {
        ExternalTaskActivityBehavior behavior = ((ExternalTaskActivityBehavior) activityExecution.getActivity().getActivityBehavior());
        behavior.propagateBpmnError(bpmnError, activityExecution);
    } catch (Exception ex) {
        throw ProcessEngineLogger.CMD_LOGGER.exceptionBpmnErrorPropagationFailed(errorCode, ex);
    }
}
Also used : ActivityExecution(org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution) BpmnError(org.camunda.bpm.engine.delegate.BpmnError) ExternalTaskActivityBehavior(org.camunda.bpm.engine.impl.bpmn.behavior.ExternalTaskActivityBehavior)

Aggregations

BpmnError (org.camunda.bpm.engine.delegate.BpmnError)1 ExternalTaskActivityBehavior (org.camunda.bpm.engine.impl.bpmn.behavior.ExternalTaskActivityBehavior)1 ActivityExecution (org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution)1