本文整理汇总了Java中org.activiti.engine.impl.bpmn.helper.ErrorPropagation类的典型用法代码示例。如果您正苦于以下问题:Java ErrorPropagation类的具体用法?Java ErrorPropagation怎么用?Java ErrorPropagation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ErrorPropagation类属于org.activiti.engine.impl.bpmn.helper包,在下文中一共展示了ErrorPropagation类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
@Override
public void execute(DelegateExecution execution) {
ActivityExecution activityExecution = (ActivityExecution) execution;
if (getLocalLoopVariable(activityExecution, getCollectionElementIndexVariable()) == null) {
try {
createInstances(activityExecution);
} catch (BpmnError error) {
ErrorPropagation.propagateError(error, activityExecution);
}
if (resolveNrOfInstances(activityExecution) == 0) {
leave(activityExecution);
}
} else {
innerActivityBehavior.execute(execution);
}
}
示例2: propagateError
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
@Override
public void propagateError(BpmnError bpmnError, DelegateExecution execution) {
try {
org.activiti.engine.delegate.BpmnError activiti5BpmnError = new org.activiti.engine.delegate.BpmnError(bpmnError.getErrorCode(), bpmnError.getMessage());
ErrorPropagation.propagateError(activiti5BpmnError, (ActivityExecution) execution);
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
}
}
示例3: mapException
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
@Override
public boolean mapException(Exception camelException, DelegateExecution execution, List<MapExceptionEntry> mapExceptions) {
try {
return ErrorPropagation.mapException(camelException, (ExecutionEntity) execution, mapExceptions);
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
return false;
}
}
示例4: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
@Override
public void execute(DelegateExecution execution) {
ActivityExecution activityExecution = (ActivityExecution) execution;
ScriptingEngines scriptingEngines = Context.getProcessEngineConfiguration().getScriptingEngines();
if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) {
ObjectNode taskElementProperties = Context.getBpmnOverrideElementProperties(scriptTaskId, execution.getProcessDefinitionId());
if (taskElementProperties != null && taskElementProperties.has(DynamicBpmnConstants.SCRIPT_TASK_SCRIPT)) {
String overrideScript = taskElementProperties.get(DynamicBpmnConstants.SCRIPT_TASK_SCRIPT).asText();
if (StringUtils.isNotEmpty(overrideScript) && !overrideScript.equals(script)) {
script = overrideScript;
}
}
}
boolean noErrors = true;
try {
Object result = scriptingEngines.evaluate(script, language, execution, storeScriptVariables);
if (resultVariable != null) {
execution.setVariable(resultVariable, result);
}
} catch (ActivitiException e) {
LOGGER.warn("Exception while executing {} : {}", activityExecution.getActivity().getId(), e.getMessage());
noErrors = false;
Throwable rootCause = ExceptionUtils.getRootCause(e);
if (rootCause instanceof BpmnError) {
ErrorPropagation.propagateError((BpmnError) rootCause, activityExecution);
} else {
throw e;
}
}
if (noErrors) {
leave(activityExecution);
}
}
示例5: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
public void execute(ActivityExecution execution) throws Exception {
if (getLoopVariable(execution, LOOP_COUNTER) == null) {
try {
createInstances(execution);
} catch (BpmnError error) {
ErrorPropagation.propagateError(error, execution);
}
} else {
innerActivityBehavior.execute(execution);
}
}
示例6: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
public void execute(ActivityExecution execution) throws Exception {
ScriptingEngines scriptingEngines = Context
.getProcessEngineConfiguration()
.getScriptingEngines();
boolean noErrors = true;
try {
Object result = scriptingEngines.evaluate(script, language, execution);
if (resultVariable != null) {
execution.setVariable(resultVariable, result);
}
String resultString = "";
if (result != null)
resultString = result.toString();
setDataObjectValues(execution, resultString);
} catch (ActivitiException e) {
noErrors = false;
if (e.getCause() instanceof ScriptException
&& e.getCause().getCause() instanceof ScriptException
&& e.getCause().getCause().getCause() instanceof BpmnError) {
ErrorPropagation.propagateError((BpmnError) e.getCause().getCause().getCause(), execution);
} else {
throw e;
}
}
if (noErrors) {
leave(execution);
}
}
示例7: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
public void execute(ActivityExecution execution) throws Exception {
if (getLocalLoopVariable(execution, LOOP_COUNTER) == null) {
try {
createInstances(execution);
} catch (BpmnError error) {
ErrorPropagation.propagateError(error, execution);
}
} else {
innerActivityBehavior.execute(execution);
}
}
示例8: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
public void execute(ActivityExecution execution) throws Exception {
ScriptingEngines scriptingEngines = Context
.getProcessEngineConfiguration()
.getScriptingEngines();
boolean noErrors = true;
try {
Object result = scriptingEngines.evaluate(script, language, execution, storeScriptVariables);
if (resultVariable != null) {
execution.setVariable(resultVariable, result);
}
} catch (ActivitiException e) {
LOGGER.warn("Exception while executing " + execution.getActivity().getId() + " : " + e.getMessage());
noErrors = false;
if (e.getCause() instanceof ScriptException
&& e.getCause().getCause() instanceof ScriptException
&& e.getCause().getCause().getCause() instanceof BpmnError) {
ErrorPropagation.propagateError((BpmnError) e.getCause().getCause().getCause(), execution);
} else {
throw e;
}
}
if (noErrors) {
leave(execution);
}
}
示例9: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
@Override
public void execute(DelegateExecution execution) {
ActivityExecution activityExecution = (ActivityExecution) execution;
ErrorPropagation.propagateError(errorCode, activityExecution);
}
示例10: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
public void execute(ActivityExecution execution) throws Exception {
ErrorPropagation.propagateError(errorCode, execution);
}