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;
}
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();
}
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);
}
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;
}
}
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);
}
}
Aggregations