Search in sources :

Example 1 with ProcessApplicationManager

use of org.camunda.bpm.engine.impl.application.ProcessApplicationManager in project camunda-bpm-platform by camunda.

the class ProcessApplicationContextUtil method getTargetProcessApplication.

public static ProcessApplicationReference getTargetProcessApplication(String deploymentId) {
    ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
    ProcessApplicationManager processApplicationManager = processEngineConfiguration.getProcessApplicationManager();
    ProcessApplicationReference processApplicationForDeployment = processApplicationManager.getProcessApplicationForDeployment(deploymentId);
    return processApplicationForDeployment;
}
Also used : ProcessApplicationReference(org.camunda.bpm.application.ProcessApplicationReference) ProcessApplicationManager(org.camunda.bpm.engine.impl.application.ProcessApplicationManager) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)

Example 2 with ProcessApplicationManager

use of org.camunda.bpm.engine.impl.application.ProcessApplicationManager in project camunda-bpm-platform by camunda.

the class AbstractPaLocalScriptEngineTest method getProcessApplication.

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();
}
Also used : ProcessApplicationReference(org.camunda.bpm.application.ProcessApplicationReference) ProcessApplicationUnavailableException(org.camunda.bpm.application.ProcessApplicationUnavailableException) CommandContext(org.camunda.bpm.engine.impl.interceptor.CommandContext) ProcessApplicationManager(org.camunda.bpm.engine.impl.application.ProcessApplicationManager) ProcessDefinitionEntity(org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity) ProcessApplicationInterface(org.camunda.bpm.application.ProcessApplicationInterface)

Example 3 with ProcessApplicationManager

use of org.camunda.bpm.engine.impl.application.ProcessApplicationManager in project camunda-bpm-platform by camunda.

the class RegisterProcessApplicationCmd method execute.

public ProcessApplicationRegistration execute(CommandContext commandContext) {
    commandContext.getAuthorizationManager().checkCamundaAdmin();
    final ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
    final ProcessApplicationManager processApplicationManager = processEngineConfiguration.getProcessApplicationManager();
    return processApplicationManager.registerProcessApplicationForDeployments(deploymentsToRegister, reference);
}
Also used : ProcessApplicationManager(org.camunda.bpm.engine.impl.application.ProcessApplicationManager) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)

Example 4 with ProcessApplicationManager

use of org.camunda.bpm.engine.impl.application.ProcessApplicationManager in project camunda-bpm-platform by camunda.

the class TestHelper method assertAndEnsureNoProcessApplicationsRegistered.

public static String assertAndEnsureNoProcessApplicationsRegistered(ProcessEngine processEngine) {
    ProcessEngineConfigurationImpl engineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
    ProcessApplicationManager processApplicationManager = engineConfiguration.getProcessApplicationManager();
    if (processApplicationManager.hasRegistrations()) {
        processApplicationManager.clearRegistrations();
        return "There are still process applications registered";
    } else {
        return null;
    }
}
Also used : ProcessApplicationManager(org.camunda.bpm.engine.impl.application.ProcessApplicationManager) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)

Example 5 with ProcessApplicationManager

use of org.camunda.bpm.engine.impl.application.ProcessApplicationManager in project camunda-bpm-platform by camunda.

the class ProcessApplicationContextUtil method loggContextSwitchDetails.

private static void loggContextSwitchDetails(CaseExecutionEntity execution) {
    final CoreExecutionContext<? extends CoreExecution> executionContext = Context.getCoreExecutionContext();
    // only log for first atomic op:
    if (executionContext == null || (executionContext.getExecution() != execution)) {
        ProcessApplicationManager processApplicationManager = Context.getProcessEngineConfiguration().getProcessApplicationManager();
        LOG.debugNoTargetProcessApplicationFoundForCaseExecution(execution, processApplicationManager);
    }
}
Also used : ProcessApplicationManager(org.camunda.bpm.engine.impl.application.ProcessApplicationManager)

Aggregations

ProcessApplicationManager (org.camunda.bpm.engine.impl.application.ProcessApplicationManager)7 ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)4 ProcessApplicationReference (org.camunda.bpm.application.ProcessApplicationReference)2 ProcessApplicationInterface (org.camunda.bpm.application.ProcessApplicationInterface)1 ProcessApplicationUnavailableException (org.camunda.bpm.application.ProcessApplicationUnavailableException)1 CommandContext (org.camunda.bpm.engine.impl.interceptor.CommandContext)1 ProcessDefinitionEntity (org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity)1