Search in sources :

Example 11 with ProcessApplicationInterface

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

use of org.camunda.bpm.application.ProcessApplicationInterface 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)12 ProcessApplicationUnavailableException (org.camunda.bpm.application.ProcessApplicationUnavailableException)7 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)5 ProcessApplicationReference (org.camunda.bpm.application.ProcessApplicationReference)4 ComponentView (org.jboss.as.ee.component.ComponentView)4 ManagedReference (org.jboss.as.naming.ManagedReference)4 StartException (org.jboss.msc.service.StartException)4 AbstractProcessApplication (org.camunda.bpm.application.AbstractProcessApplication)3 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ArrayList (java.util.ArrayList)1 ProcessApplicationDeploymentInfo (org.camunda.bpm.application.ProcessApplicationDeploymentInfo)1 ProcessApplicationDeploymentInfoImpl (org.camunda.bpm.application.impl.ProcessApplicationDeploymentInfoImpl)1 ProcessApplicationInfoImpl (org.camunda.bpm.application.impl.ProcessApplicationInfoImpl)1 BpmPlatformPlugin (org.camunda.bpm.container.impl.plugin.BpmPlatformPlugin)1 BpmPlatformPlugins (org.camunda.bpm.container.impl.plugin.BpmPlatformPlugins)1 RepositoryService (org.camunda.bpm.engine.RepositoryService)1 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