protected boolean isSymptomOfContextSwitchFailure(Throwable t, ExecutionEntity contextExecution) { // a context switch failure can occur, if the current engine has no PA registration for the deployment // subclasses may assert the actual throwable to narrow down the diagnose return ProcessApplicationContextUtil.getTargetProcessApplication(contextExecution) == null; }
protected boolean isSymptomOfContextSwitchFailure(Throwable t, ExecutionEntity contextExecution) { // a context switch failure can occur, if the current engine has no PA registration for the deployment // subclasses may assert the actual throwable to narrow down the diagnose return ProcessApplicationContextUtil.getTargetProcessApplication(contextExecution) == null; }
public static ProcessApplicationReference getTargetProcessApplication(CoreExecution execution) { if (execution instanceof ExecutionEntity) { return getTargetProcessApplication((ExecutionEntity) execution); } else { return getTargetProcessApplication((CaseExecutionEntity) execution); } }
public static ProcessApplicationReference getTargetProcessApplication(CoreExecution execution) { if (execution instanceof ExecutionEntity) { return getTargetProcessApplication((ExecutionEntity) execution); } else { return getTargetProcessApplication((CaseExecutionEntity) execution); } }
protected ProcessApplicationReference getTargetProcessApplication(ExecutionEntity execution) { return ProcessApplicationContextUtil.getTargetProcessApplication(execution); }
protected ProcessApplicationReference getTargetProcessApplication(ExecutionEntity execution) { return ProcessApplicationContextUtil.getTargetProcessApplication(execution); }
protected boolean shouldPerformPaContextSwitch(DelegateExecution execution) { if(execution == null) { return false; } else { ProcessApplicationReference targetPa = ProcessApplicationContextUtil.getTargetProcessApplication((ExecutionEntity) execution); return targetPa != null && !targetPa.equals(Context.getCurrentProcessApplication()); } }
protected boolean shouldPerformPaContextSwitch(DelegateExecution execution) { if(execution == null) { return false; } else { ProcessApplicationReference targetPa = ProcessApplicationContextUtil.getTargetProcessApplication((ExecutionEntity) execution); return targetPa != null && !targetPa.equals(Context.getCurrentProcessApplication()); } }
protected ProcessApplicationReference getProcessApplicationForInvocation(final DelegateInvocation invocation) { BaseDelegateExecution contextExecution = invocation.getContextExecution(); ResourceDefinitionEntity contextResource = invocation.getContextResource(); if (contextExecution != null) { return ProcessApplicationContextUtil.getTargetProcessApplication((CoreExecution) contextExecution); } else if (contextResource != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(contextResource); } else { return null; } }
protected ProcessApplicationReference getProcessApplicationForInvocation(final DelegateInvocation invocation) { BaseDelegateExecution contextExecution = invocation.getContextExecution(); ResourceDefinitionEntity contextResource = invocation.getContextResource(); if (contextExecution != null) { return ProcessApplicationContextUtil.getTargetProcessApplication((CoreExecution) contextExecution); } else if (contextResource != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(contextResource); } else { return null; } }
protected ProcessApplicationReference getContextProcessApplication() { if (taskId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getTask()); } else if (executionId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getExecution()); } else if (caseExecutionId != null) { return ProcessApplicationContextUtil.getTargetProcessApplication(getCaseExecution()); } else { return null; } }
public static ProcessApplicationReference getTargetProcessApplication(TaskEntity task) { if (task.getProcessDefinition() != null) { return getTargetProcessApplication(task.getProcessDefinition()); } else if (task.getCaseDefinition() != null) { return getTargetProcessApplication(task.getCaseDefinition()); } else { return null; } }
public static ProcessApplicationReference getTargetProcessApplication(TaskEntity task) { if (task.getProcessDefinition() != null) { return getTargetProcessApplication(task.getProcessDefinition()); } else if (task.getCaseDefinition() != null) { return getTargetProcessApplication(task.getCaseDefinition()); } else { return null; } }
protected <T> T performContextSwitch(final Callable<T> callable) { ProcessApplicationReference targetProcessApplication = ProcessApplicationContextUtil.getTargetProcessApplication(deploymentId); if(targetProcessApplication != null) { return Context.executeWithinProcessApplication(new Callable<T>() { public T call() throws Exception { return doCall(callable); } }, targetProcessApplication); } else { return doCall(callable); } }
protected <T> T performContextSwitch(final Callable<T> callable) { ProcessApplicationReference targetProcessApplication = ProcessApplicationContextUtil.getTargetProcessApplication(deploymentId); if(targetProcessApplication != null) { return Context.executeWithinProcessApplication(new Callable<T>() { public T call() throws Exception { return doCall(callable); } }, targetProcessApplication); } else { return doCall(callable); } }
public static ProcessApplicationReference getTargetProcessApplication(ExecutionEntity execution) { if (execution == null) { return null; } ProcessApplicationReference processApplicationForDeployment = getTargetProcessApplication((ProcessDefinitionEntity) execution.getProcessDefinition()); // logg application context switch details if(LOG.isContextSwitchLoggable() && processApplicationForDeployment == null) { loggContextSwitchDetails(execution); } return processApplicationForDeployment; }
public static ProcessApplicationReference getTargetProcessApplication(ExecutionEntity execution) { if (execution == null) { return null; } ProcessApplicationReference processApplicationForDeployment = getTargetProcessApplication((ProcessDefinitionEntity) execution.getProcessDefinition()); // logg application context switch details if(LOG.isContextSwitchLoggable() && processApplicationForDeployment == null) { loggContextSwitchDetails(execution); } return processApplicationForDeployment; }
public static ProcessApplicationReference getTargetProcessApplication(CaseExecutionEntity execution) { if (execution == null) { return null; } ProcessApplicationReference processApplicationForDeployment = getTargetProcessApplication((CaseDefinitionEntity) execution.getCaseDefinition()); // logg application context switch details if(LOG.isContextSwitchLoggable() && processApplicationForDeployment == null) { loggContextSwitchDetails(execution); } return processApplicationForDeployment; }
public static ProcessApplicationReference getTargetProcessApplication(CaseExecutionEntity execution) { if (execution == null) { return null; } ProcessApplicationReference processApplicationForDeployment = getTargetProcessApplication((CaseDefinitionEntity) execution.getCaseDefinition()); // logg application context switch details if(LOG.isContextSwitchLoggable() && processApplicationForDeployment == null) { loggContextSwitchDetails(execution); } return processApplicationForDeployment; }
public Object resolveDelegateClass(final ActivityExecution execution) { ProcessApplicationReference targetProcessApplication = ProcessApplicationContextUtil.getTargetProcessApplication((ExecutionEntity) execution); if (ProcessApplicationContextUtil.requiresContextSwitch(targetProcessApplication)) { return Context.executeWithinProcessApplication(new Callable<Object>() { @Override public Object call() throws Exception { return resolveDelegateClass(execution); } }, targetProcessApplication, new InvocationContext(execution)); } else { return instantiateDelegateClass(execution); } }