當前位置: 首頁>>代碼示例>>Java>>正文


Java ErrorPropagation.propagateError方法代碼示例

本文整理匯總了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);
    }
}
 
開發者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: 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

示例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);
  }
}
 
開發者ID:iotsap,項目名稱:FiWare-Template-Handler,代碼行數:12,代碼來源:MultiInstanceActivityBehavior.java

示例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);
   }
}
 
開發者ID:iotsap,項目名稱:FiWare-Template-Handler,代碼行數:34,代碼來源:ScriptTaskActivityBehavior.java

示例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);
  }
}
 
開發者ID:springvelocity,項目名稱:xbpm5,代碼行數:12,代碼來源:MultiInstanceActivityBehavior.java

示例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);
   }
}
 
開發者ID:springvelocity,項目名稱:xbpm5,代碼行數:31,代碼來源:ScriptTaskActivityBehavior.java

示例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);
}
 
開發者ID:flowable,項目名稱:flowable-engine,代碼行數:6,代碼來源:ErrorEndEventActivityBehavior.java

示例9: 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.propagateError方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。