本文整理汇总了Java中org.activiti.engine.impl.bpmn.helper.ErrorPropagation.propagateError方法的典型用法代码示例。如果您正苦于以下问题:Java ErrorPropagation.propagateError方法的具体用法?Java ErrorPropagation.propagateError怎么用?Java ErrorPropagation.propagateError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.impl.bpmn.helper.ErrorPropagation
的用法示例。
在下文中一共展示了ErrorPropagation.propagateError方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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);
}
}
示例4: 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);
}
}
示例5: 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);
}
}
示例6: 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);
}
}
示例7: 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);
}
}
示例8: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入方法依赖的package包/类
@Override
public void execute(DelegateExecution execution) {
ActivityExecution activityExecution = (ActivityExecution) execution;
ErrorPropagation.propagateError(errorCode, activityExecution);
}
示例9: execute
import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入方法依赖的package包/类
public void execute(ActivityExecution execution) throws Exception {
ErrorPropagation.propagateError(errorCode, execution);
}