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


Java ProcessApplicationUnavailableException类代码示例

本文整理汇总了Java中org.camunda.bpm.application.ProcessApplicationUnavailableException的典型用法代码示例。如果您正苦于以下问题:Java ProcessApplicationUnavailableException类的具体用法?Java ProcessApplicationUnavailableException怎么用?Java ProcessApplicationUnavailableException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ProcessApplicationUnavailableException类属于org.camunda.bpm.application包,在下文中一共展示了ProcessApplicationUnavailableException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: notifyExecutionListener

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
protected void notifyExecutionListener(DelegateExecution execution) throws Exception {
  ProcessApplicationReference processApp = Context.getCurrentProcessApplication();
  try {
    ProcessApplicationInterface processApplication = processApp.getProcessApplication();
    ExecutionListener executionListener = processApplication.getExecutionListener();
    if(executionListener != null) {
      executionListener.notify(execution);

    } else {
      LOG.paDoesNotProvideExecutionListener(processApp.getName());

    }
  } catch (ProcessApplicationUnavailableException e) {
    // Process Application unavailable => ignore silently
    LOG.cannotInvokeListenerPaUnavailable(processApp.getName(), e);
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:ProcessApplicationEventListenerDelegate.java

示例2: notifyTaskListener

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
protected void notifyTaskListener(DelegateTask task) throws Exception {
  ProcessApplicationReference processApp = Context.getCurrentProcessApplication();
  try {
    ProcessApplicationInterface processApplication = processApp.getProcessApplication();
    TaskListener taskListener = processApplication.getTaskListener();
    if(taskListener != null) {
      taskListener.notify(task);

    } else {
      LOG.paDoesNotProvideTaskListener(processApp.getName());

    }
  } catch (ProcessApplicationUnavailableException e) {
    // Process Application unavailable => ignore silently
    LOG.cannotInvokeListenerPaUnavailable(processApp.getName(), e);
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:18,代码来源:ProcessApplicationEventListenerDelegate.java

示例3: getCurrentPaSerializers

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
protected static VariableSerializers getCurrentPaSerializers() {
  if (Context.getCurrentProcessApplication() != null) {
    ProcessApplicationReference processApplicationReference = Context.getCurrentProcessApplication();
    try {
      ProcessApplicationInterface processApplicationInterface = processApplicationReference.getProcessApplication();

      ProcessApplicationInterface rawPa = processApplicationInterface.getRawObject();
      if (rawPa instanceof AbstractProcessApplication) {
        return ((AbstractProcessApplication) rawPa).getVariableSerializers();
      }
      else {
        return null;
      }
    } catch (ProcessApplicationUnavailableException e) {
      throw LOG.cannotDeterminePaDataformats(e);
    }
  }
  else {
    return null;
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:22,代码来源:TypedValueField.java

示例4: getElResolverDelegate

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
protected ELResolver getElResolverDelegate() {

    ProcessApplicationReference processApplicationReference = Context.getCurrentProcessApplication();
    if(processApplicationReference != null) {

      try {
        ProcessApplicationInterface processApplication = processApplicationReference.getProcessApplication();
        return processApplication.getBeanElResolver();

      } catch (ProcessApplicationUnavailableException e) {
        throw new ProcessEngineException("Cannot access process application '"+processApplicationReference.getName()+"'", e);
      }

    } else {
      return new BeanELResolver();
    }

  }
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:19,代码来源:ProcessApplicationBeanElResolverDelegate.java

示例5: getElResolverDelegate

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
protected ELResolver getElResolverDelegate() {

    ProcessApplicationReference processApplicationReference = Context.getCurrentProcessApplication();
    if(processApplicationReference != null) {

      try {
        ProcessApplicationInterface processApplication = processApplicationReference.getProcessApplication();
        return processApplication.getElResolver();

      } catch (ProcessApplicationUnavailableException e) {
        throw new ProcessEngineException("Cannot access process application '"+processApplicationReference.getName()+"'", e);
      }

    } else {
      return null;
    }

  }
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:19,代码来源:ProcessApplicationElResolverDelegate.java

示例6: getProcessApplication

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
protected ProcessApplicationInterface getProcessApplication() {
  ProcessApplicationReference reference = processEngineConfiguration.getCommandExecutorTxRequired().execute(new Command<ProcessApplicationReference>() {
    public ProcessApplicationReference execute(CommandContext commandContext) {
      ProcessDefinitionEntity definition = commandContext
          .getProcessDefinitionManager()
          .findLatestProcessDefinitionByKey(PROCESS_ID);
      String deploymentId = definition.getDeploymentId();
      ProcessApplicationManager processApplicationManager = processEngineConfiguration.getProcessApplicationManager();
      return processApplicationManager.getProcessApplicationForDeployment(deploymentId);
    }
  });

  assertNotNull(reference);

  ProcessApplicationInterface processApplication = null;
  try {
    processApplication = reference.getProcessApplication();
  } catch (ProcessApplicationUnavailableException e) {
    fail("Could not retrieve process application");
  }

  return processApplication.getRawObject();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:24,代码来源:AbstractPaLocalScriptEngineTest.java

示例7: getReference

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
@Test
public void getReference() throws ProcessApplicationUnavailableException {
  OSGiProcessApplication app = new OSGiProcessApplication(createBundleMock(), createBlueprintContainerMock());
  ProcessApplicationReference ref = app.getReference();
  assertThat(ref, is(instanceOf(OSGiProcessApplicationReference.class)));
  assertThat((OSGiProcessApplication) ref.getProcessApplication(), is(sameInstance(app)));
  assertThat(ref.getName(), is(BUNDLE_NAME));
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform-osgi,代码行数:9,代码来源:OSGiProcessApplicationTest.java

示例8: getProcessApplication

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
public ProcessApplicationInterface getProcessApplication() throws ProcessApplicationUnavailableException {
  try {
    // check whether process application is still deployed
    selfReference.getName();
  }
  catch(EJBException e) {
    throw LOG.processApplicationUnavailableException(processApplicationName, e);
  }
  return selfReference;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:EjbProcessApplicationReference.java

示例9: getProcessApplication

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
public AbstractProcessApplication getProcessApplication() throws ProcessApplicationUnavailableException {
  AbstractProcessApplication application = processApplication.get();
  if (application == null) {
    throw LOG.processApplicationUnavailableException(name);
  }
  else {
    return application;
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:10,代码来源:ProcessApplicationReferenceImpl.java

示例10: getPaScriptEngine

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
protected ScriptEngine getPaScriptEngine(String language, ProcessApplicationReference pa) {
  try {
    ProcessApplicationInterface processApplication = pa.getProcessApplication();
    ProcessApplicationInterface rawObject = processApplication.getRawObject();

    if (rawObject instanceof AbstractProcessApplication) {
      AbstractProcessApplication abstractProcessApplication = (AbstractProcessApplication) rawObject;
      return abstractProcessApplication.getScriptEngineForName(language, enableScriptEngineCaching);
    }
    return null;
  }
  catch (ProcessApplicationUnavailableException e) {
    throw new ProcessEngineException("Process Application is unavailable.", e);
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:16,代码来源:ScriptingEngines.java

示例11: getPaEnvScripts

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
protected Map<String, List<ExecutableScript>> getPaEnvScripts(ProcessApplicationReference pa) {
  try {
    ProcessApplicationInterface processApplication = pa.getProcessApplication();
    ProcessApplicationInterface rawObject = processApplication.getRawObject();

    if (rawObject instanceof AbstractProcessApplication) {
      AbstractProcessApplication abstractProcessApplication = (AbstractProcessApplication) rawObject;
      return abstractProcessApplication.getEnvironmentScripts();
    }
    return null;
  }
  catch (ProcessApplicationUnavailableException e) {
    throw new ProcessEngineException("Process Application is unavailable.", e);
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:16,代码来源:ScriptingEnvironment.java

示例12: testSetPAContextByName

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
public void testSetPAContextByName() throws ProcessApplicationUnavailableException {

    Assert.assertNull(Context.getCurrentProcessApplication());

    try {
      ProcessApplicationContext.setCurrentProcessApplication(pa.getName());

      Assert.assertEquals(getCurrentContextApplication().getProcessApplication(), pa);
    } finally {
      ProcessApplicationContext.clear();
    }

    Assert.assertNull(Context.getCurrentProcessApplication());
  }
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:15,代码来源:ProcessApplicationContextTest.java

示例13: testSetPAContextByReference

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
public void testSetPAContextByReference() throws ProcessApplicationUnavailableException {
  Assert.assertNull(Context.getCurrentProcessApplication());

  try {
    ProcessApplicationContext.setCurrentProcessApplication(pa.getReference());

    Assert.assertEquals(getCurrentContextApplication().getProcessApplication(), pa);
  } finally {
    ProcessApplicationContext.clear();
  }

  Assert.assertNull(Context.getCurrentProcessApplication());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:14,代码来源:ProcessApplicationContextTest.java

示例14: testSetPAContextByRawPA

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
public void testSetPAContextByRawPA() throws ProcessApplicationUnavailableException {
  Assert.assertNull(Context.getCurrentProcessApplication());

  try {
    ProcessApplicationContext.setCurrentProcessApplication(pa);

    Assert.assertEquals(pa, getCurrentContextApplication().getProcessApplication());
  } finally {
    ProcessApplicationContext.clear();
  }

  Assert.assertNull(Context.getCurrentProcessApplication());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:14,代码来源:ProcessApplicationContextTest.java

示例15: getValue

import org.camunda.bpm.application.ProcessApplicationUnavailableException; //导入依赖的package包/类
public ProcessApplicationInterface getValue() throws IllegalStateException, IllegalArgumentException {
  try {
    return reference.getProcessApplication();
    
  } catch (ProcessApplicationUnavailableException e) {
    throw new IllegalStateException("Process application '"+reference.getName()+"' is not unavailable.", e);
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:9,代码来源:NoViewProcessApplicationStartService.java


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