public static ProcessEngine getDefaultProcessEngine() { return getDefaultProcessEngine(true); }
public static ProcessEngine getDefaultProcessEngine() { return getDefaultProcessEngine(true); }
@Override public ProcessEngine getDefaultProcessEngine() { ProcessEngine defaultProcessEngine = BpmPlatform.getDefaultProcessEngine(); if(defaultProcessEngine != null) { return defaultProcessEngine; } else { return ProcessEngines.getDefaultProcessEngine(false); } }
@Override public ProcessEngine getDefaultProcessEngine() { ProcessEngine defaultProcessEngine = BpmPlatform.getDefaultProcessEngine(); if(defaultProcessEngine != null) { return defaultProcessEngine; } else { return ProcessEngines.getDefaultProcessEngine(false); } }
@Produces @Named @ApplicationScoped public ProcessEngine processEngine() { ProcessEngine processEngine = BpmPlatform.getProcessEngineService().getDefaultProcessEngine(); if(processEngine != null) { return processEngine; } else { List<ProcessEngine> processEngines = BpmPlatform.getProcessEngineService().getProcessEngines(); if (processEngines != null && processEngines.size() == 1) { return processEngines.get(0); } else { return ProcessEngines.getDefaultProcessEngine(false); } } }
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; } }); } }
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; } }); } }
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(); } }
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(); } }
@Override public ProcessEngine getDefaultProcessEngine() { return ProcessEngines.getDefaultProcessEngine(); }
@Override public ProcessEngine getDefaultProcessEngine() { return ProcessEngines.getDefaultProcessEngine(); }
public static ProcessEngine getDefaultProcessEngine() { return getDefaultProcessEngine(true); }
@Override public ProcessEngine getDefaultProcessEngine() { ProcessEngine defaultProcessEngine = BpmPlatform.getDefaultProcessEngine(); if(defaultProcessEngine != null) { return defaultProcessEngine; } else { return ProcessEngines.getDefaultProcessEngine(false); } }
/** * Gets EventBus from registered default process engine. * * @return the camunda eventBus */ public static CamundaEventBus eventBus() { return eventBus(Optional.ofNullable(ProcessEngines.getDefaultProcessEngine()) .orElseThrow(illegalState("No processEngine registered."))); }
/** * Retrieve the processEngine bound to the current testing thread * via calling init(ProcessEngine processEngine). In case no such * processEngine is bound yet, init(processEngine) is called with * a default process engine. * * @return processEngine bound to the current testing thread * @throws IllegalStateException in case a processEngine has not * been initialised yet and cannot be initialised with a * default engine. */ public static ProcessEngine processEngine() { ProcessEngine processEngine = ProcessEngineAssertions.processEngine.get(); if (processEngine != null) return processEngine; processEngine = ProcessEngines.getDefaultProcessEngine(); if (processEngine != null) { init(processEngine); return processEngine; } throw new IllegalStateException( String.format("Call %s.init(ProcessEngine processEngine) first!", ProcessEngineAssertions.class.getSimpleName()) ); }
@Produces @Named @ApplicationScoped public ProcessEngine processEngine() { ProcessEngine processEngine = BpmPlatform.getProcessEngineService().getDefaultProcessEngine(); if(processEngine != null) { return processEngine; } else { List<ProcessEngine> processEngines = BpmPlatform.getProcessEngineService().getProcessEngines(); if (processEngines != null && processEngines.size() == 1) { return processEngines.get(0); } else { return ProcessEngines.getDefaultProcessEngine(false); } } }
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; } }); } }
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(); } }