Java Code Examples for org.camunda.bpm.engine.ProcessEngines#getDefaultProcessEngine()

The following examples show how to use org.camunda.bpm.engine.ProcessEngines#getDefaultProcessEngine() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DbSchemaPrune.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
  ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
  CommandExecutor commandExecutor = processEngine.getProcessEngineConfiguration().getCommandExecutorTxRequired();
  commandExecutor.execute(new Command<Object> (){
    public Object execute(CommandContext commandContext) {
      commandContext
        .getSession(PersistenceSession.class)
        .dbSchemaPrune();
      return null;
    }
  });
}
 
Example 2
Source File: DbSchemaDrop.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
  ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
  CommandExecutor commandExecutor = processEngine.getProcessEngineConfiguration().getCommandExecutorTxRequired();
  commandExecutor.execute(new Command<Object> (){
    public Object execute(CommandContext commandContext) {
      commandContext
        .getSession(PersistenceSession.class)
        .dbSchemaDrop();
      return null;
    }
  });
  processEngine.close();
}
 
Example 3
Source File: ContainerManagedProcessEngineProvider.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Override
public ProcessEngine getDefaultProcessEngine() {
  ProcessEngine defaultProcessEngine = BpmPlatform.getDefaultProcessEngine();
  if(defaultProcessEngine != null) {
    return defaultProcessEngine;
  } else {
    return ProcessEngines.getDefaultProcessEngine(false);
  }
}
 
Example 4
Source File: SpringBootProcessEngineProvider.java    From camunda-bpm-spring-boot-starter with Apache License 2.0 4 votes vote down vote up
@Override
public ProcessEngine getDefaultProcessEngine() {
  return ProcessEngines.getDefaultProcessEngine();
}
 
Example 5
Source File: SpringBootProcessEngineProvider.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
@Override
public ProcessEngine getDefaultProcessEngine() {
  return ProcessEngines.getDefaultProcessEngine();
}