Search in sources :

Example 6 with ProcessApplicationUnavailableException

use of org.camunda.bpm.application.ProcessApplicationUnavailableException in project camunda-bpm-platform by camunda.

the class ScriptingEngines method getPaScriptEngine.

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);
    }
}
Also used : ProcessApplicationUnavailableException(org.camunda.bpm.application.ProcessApplicationUnavailableException) AbstractProcessApplication(org.camunda.bpm.application.AbstractProcessApplication) ProcessApplicationInterface(org.camunda.bpm.application.ProcessApplicationInterface) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 7 with ProcessApplicationUnavailableException

use of org.camunda.bpm.application.ProcessApplicationUnavailableException in project camunda-bpm-platform by camunda.

the class ScriptingEnvironment method getPaEnvScripts.

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);
    }
}
Also used : ProcessApplicationUnavailableException(org.camunda.bpm.application.ProcessApplicationUnavailableException) AbstractProcessApplication(org.camunda.bpm.application.AbstractProcessApplication) ProcessApplicationInterface(org.camunda.bpm.application.ProcessApplicationInterface) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Aggregations

ProcessApplicationInterface (org.camunda.bpm.application.ProcessApplicationInterface)7 ProcessApplicationUnavailableException (org.camunda.bpm.application.ProcessApplicationUnavailableException)7 ProcessApplicationReference (org.camunda.bpm.application.ProcessApplicationReference)4 AbstractProcessApplication (org.camunda.bpm.application.AbstractProcessApplication)3 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)3 ExecutionListener (org.camunda.bpm.engine.delegate.ExecutionListener)1 TaskListener (org.camunda.bpm.engine.delegate.TaskListener)1 ProcessApplicationManager (org.camunda.bpm.engine.impl.application.ProcessApplicationManager)1 CommandContext (org.camunda.bpm.engine.impl.interceptor.CommandContext)1 ProcessDefinitionEntity (org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity)1