本文整理汇总了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);
}
}
示例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);
}
}
示例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;
}
}
示例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();
}
}
示例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;
}
}
示例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();
}
示例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));
}
示例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;
}
示例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;
}
}
示例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);
}
}
示例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);
}
}
示例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());
}
示例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());
}
示例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());
}
示例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);
}
}