当前位置: 首页>>代码示例>>Java>>正文


Java ErrorPropagation类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:18,代码来源:MultiInstanceActivityBehavior.java

示例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);
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:10,代码来源:DefaultFlowable5CompatibilityHandler.java

示例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;
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:10,代码来源:DefaultFlowable5CompatibilityHandler.java

示例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);
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:40,代码来源:ScriptTaskActivityBehavior.java

示例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);
  }
}
 
开发者ID:iotsap,项目名称:FiWare-Template-Handler,代码行数:12,代码来源:MultiInstanceActivityBehavior.java

示例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);
   }
}
 
开发者ID:iotsap,项目名称:FiWare-Template-Handler,代码行数:34,代码来源:ScriptTaskActivityBehavior.java

示例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);
  }
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:12,代码来源:MultiInstanceActivityBehavior.java

示例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);
   }
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:31,代码来源:ScriptTaskActivityBehavior.java

示例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);
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:6,代码来源:ErrorEndEventActivityBehavior.java

示例10: execute

import org.activiti.engine.impl.bpmn.helper.ErrorPropagation; //导入依赖的package包/类
public void execute(ActivityExecution execution) throws Exception {    
  ErrorPropagation.propagateError(errorCode, execution);    
}
 
开发者ID:iotsap,项目名称:FiWare-Template-Handler,代码行数:4,代码来源:ErrorEndEventActivityBehavior.java


注:本文中的org.activiti.engine.impl.bpmn.helper.ErrorPropagation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。