Search in sources :

Example 16 with AbstractProcessApplication

use of org.camunda.bpm.application.AbstractProcessApplication 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 17 with AbstractProcessApplication

use of org.camunda.bpm.application.AbstractProcessApplication 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

AbstractProcessApplication (org.camunda.bpm.application.AbstractProcessApplication)17 PlatformServiceContainer (org.camunda.bpm.container.impl.spi.PlatformServiceContainer)9 ProcessesXml (org.camunda.bpm.application.impl.metadata.spi.ProcessesXml)4 JmxManagedProcessApplication (org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessApplication)4 ProcessApplicationInterface (org.camunda.bpm.application.ProcessApplicationInterface)3 ProcessApplicationUnavailableException (org.camunda.bpm.application.ProcessApplicationUnavailableException)3 DeployedProcessArchive (org.camunda.bpm.container.impl.deployment.util.DeployedProcessArchive)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 Method (java.lang.reflect.Method)2 URL (java.net.URL)2 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)2 JobExecutor (org.camunda.bpm.engine.impl.jobexecutor.JobExecutor)2 Test (org.junit.Test)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1 HashMap (java.util.HashMap)1 ProcessApplicationReference (org.camunda.bpm.application.ProcessApplicationReference)1 ProcessApplicationInfoImpl (org.camunda.bpm.application.impl.ProcessApplicationInfoImpl)1 ProcessArchiveXml (org.camunda.bpm.application.impl.metadata.spi.ProcessArchiveXml)1 JmxManagedBpmPlatformPlugins (org.camunda.bpm.container.impl.jmx.services.JmxManagedBpmPlatformPlugins)1