congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ProcessEngineConfigurationImpl
Code IndexAdd Tabnine to your IDE (free)

How to use
ProcessEngineConfigurationImpl
in
org.camunda.bpm.engine.impl.cfg

Best Java code snippets using org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl (Showing top 20 results out of 315)

origin: camunda/camunda-bpm-platform

@Override
public ProcessEngine buildProcessEngine() {
 ProcessEngine processEngine = super.buildProcessEngine();
 autoDeployResources(processEngine);
 return processEngine;
}
origin: camunda/camunda-bpm-platform

/**
 * Deprecated: use {@link #getProcessEngines()} instead
 */
@Deprecated
public CommandExecutor getCommandExecutor() {
 if(processEngines.isEmpty()) {
  return null;
 } else {
  return processEngines.get(0).getProcessEngineConfiguration().getCommandExecutorTxRequired();
 }
}
origin: camunda/camunda-bpm-platform

 public static boolean isBatchWindowConfigured(CommandContext commandContext) {
  return commandContext.getProcessEngineConfiguration().getBatchWindowManager().isBatchWindowConfigured(commandContext.getProcessEngineConfiguration());
 }
}
origin: camunda/camunda-bpm-platform

protected void initializeExpressionManager() {
 if (processEngineConfiguration.getExpressionManager() == null && applicationContext != null) {
  processEngineConfiguration.setExpressionManager(
    new SpringExpressionManager(applicationContext, processEngineConfiguration.getBeans()));
 }
}

origin: camunda/camunda-bpm-platform

public void fireHistoricCaseActivityInstanceUpdate() {
 ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
 HistoryLevel historyLevel = configuration.getHistoryLevel();
 if (historyLevel.isHistoryEventProduced(HistoryEventTypes.CASE_ACTIVITY_INSTANCE_UPDATE, this)) {
  CmmnHistoryEventProducer eventProducer = configuration.getCmmnHistoryEventProducer();
  HistoryEventHandler eventHandler = configuration.getHistoryEventHandler();
  HistoryEvent event = eventProducer.createCaseActivityInstanceUpdateEvt(this);
  eventHandler.handleEvent(event);
 }
}
origin: camunda/camunda-bpm-platform

public static void clearUserOperationLog(ProcessEngineConfigurationImpl processEngineConfiguration) {
 if (processEngineConfiguration.getHistoryLevel().equals(HistoryLevel.HISTORY_LEVEL_FULL)) {
  HistoryService historyService = processEngineConfiguration.getHistoryService();
  List<UserOperationLogEntry> logs = historyService.createUserOperationLogQuery().list();
  for (UserOperationLogEntry log : logs) {
   historyService.deleteUserOperationLogEntry(log.getId());
  }
 }
}
origin: camunda/camunda-bpm-platform

protected AcquiredJobs acquireJobs() {
 JobExecutor jobExecutor = processEngineConfiguration.getJobExecutor();
 return processEngineConfiguration.getCommandExecutorTxRequired()
  .execute(new AcquireJobsCmd(jobExecutor));
}
origin: camunda/camunda-bpm-platform

@Test
public void useDefaultLevelAudit() throws Exception {
 ProcessEngineConfigurationImpl config = config("true", ProcessEngineConfiguration.HISTORY_AUTO);
 // init the db with level=auto -> audit
 processEngineImpl = (ProcessEngineImpl) config.buildProcessEngine();
 // the history Level has been overwritten with audit
 assertThat(config.getHistoryLevel(), CoreMatchers.equalTo(HistoryLevel.HISTORY_LEVEL_AUDIT));
 // and this is written to the database
 HistoryLevel databaseLevel =
   config.getCommandExecutorSchemaOperations().execute(new DetermineHistoryLevelCmd(config.getHistoryLevels()));
 assertThat(databaseLevel, CoreMatchers.equalTo(HistoryLevel.HISTORY_LEVEL_AUDIT));
}
origin: camunda/camunda-bpm-platform

private static ProcessEngineImpl createProcessEngineImpl(String databaseSchemaUpdate, boolean executeSchemaOperations) {
 ProcessEngineImpl processEngine = 
   (ProcessEngineImpl) new CustomStandaloneInMemProcessEngineConfiguration()
       .setExecuteSchemaOperations(executeSchemaOperations)
       .setProcessEngineName("database-history-test-engine")
       .setDatabaseSchemaUpdate(databaseSchemaUpdate)
       .setHistory(ProcessEngineConfiguration.HISTORY_FULL)
       .setJdbcUrl("jdbc:h2:mem:DatabaseHistoryPropertyTest")
       .buildProcessEngine();
 
 return processEngine;
}

origin: camunda/camunda-bpm-platform

@Test
public void testHistoryCleanupJobScheduled() throws ParseException {
 final ProcessEngineConfigurationImpl standaloneInMemProcessEngineConfiguration = (ProcessEngineConfigurationImpl)ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration();
 standaloneInMemProcessEngineConfiguration.setHistoryCleanupBatchWindowStartTime("23:00");
 standaloneInMemProcessEngineConfiguration.setHistoryCleanupBatchWindowEndTime("01:00");
 standaloneInMemProcessEngineConfiguration.setJdbcUrl("jdbc:h2:mem:camunda" + getClass().getSimpleName() + "testHistoryCleanupJobScheduled");
 ProcessEngine engine = standaloneInMemProcessEngineConfiguration
  .buildProcessEngine();
 final List<Job> historyCleanupJobs = engine.getHistoryService().findHistoryCleanupJobs();
 assertFalse(historyCleanupJobs.isEmpty());
 final ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) engine.getProcessEngineConfiguration();
 for (Job historyCleanupJob : historyCleanupJobs) {
  assertEquals(processEngineConfiguration.getBatchWindowManager().getCurrentOrNextBatchWindow(ClockUtil.getCurrentTime(), processEngineConfiguration).getStart(), historyCleanupJob.getDuedate());
 }
 closeProcessEngine(engine);
}
origin: camunda/camunda-bpm-platform

@Test
public void readLevelFullfromDB() throws Exception {
 final ProcessEngineConfigurationImpl config = config("true", ProcessEngineConfiguration.HISTORY_FULL);
 // init the db with level=full
 processEngineImpl = (ProcessEngineImpl) config.buildProcessEngine();
 HistoryLevel historyLevel = config.getCommandExecutorSchemaOperations().execute(new DetermineHistoryLevelCmd(config.getHistoryLevels()));
 assertThat(historyLevel, CoreMatchers.equalTo(HistoryLevel.HISTORY_LEVEL_FULL));
}
origin: camunda/camunda-bpm-platform

protected void setUp() throws Exception {
 ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration
   .createProcessEngineConfigurationFromResource("org/camunda/bpm/engine/test/standalone/jpa/camunda.cfg.xml");
 processEngineConfiguration.setJavaSerializationFormatEnabled(true);
 cachedProcessEngine = processEngineConfiguration.buildProcessEngine();
 EntityManagerSessionFactory entityManagerSessionFactory = (EntityManagerSessionFactory) processEngineConfiguration
  .getSessionFactories()
  .get(EntityManagerSession.class);
 entityManagerFactory = entityManagerSessionFactory.getEntityManagerFactory();
}
origin: camunda/camunda-bpm-platform

public static ProcessEngineConfiguration parseProcessEngineConfiguration(Resource springResource, String beanName) {
 DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
 XmlBeanDefinitionReader xmlBeanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);
 xmlBeanDefinitionReader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
 xmlBeanDefinitionReader.loadBeanDefinitions(springResource);
 ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) beanFactory.getBean(beanName);
 if (processEngineConfiguration.getBeans() == null) {
  processEngineConfiguration.setBeans(new SpringBeanFactoryProxyMap(beanFactory));
 }
 return processEngineConfiguration;
}
origin: camunda/camunda-bpm-platform

protected static ExpressionManager getExpressionManager() {
 return Context.getProcessEngineConfiguration().getExpressionManager();
}
origin: camunda/camunda-bpm-platform

private void hintJobExecutorIfNeeded(JobEntity jobEntity, Date duedate) {
 // Check if this timer fires before the next time the job executor will check for new timers to fire.
 // This is highly unlikely because normally waitTimeInMillis is 5000 (5 seconds)
 // and timers are usually set further in the future
 JobExecutor jobExecutor = Context.getProcessEngineConfiguration().getJobExecutor();
 int waitTimeInMillis = jobExecutor.getWaitTimeInMillis();
 if (duedate.getTime() < (ClockUtil.getCurrentTime().getTime() + waitTimeInMillis)) {
  hintJobExecutor(jobEntity);
 }
}
origin: camunda/camunda-bpm-platform

public static ProcessApplicationReference getTargetProcessApplication(String deploymentId) {
 ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
 ProcessApplicationManager processApplicationManager = processEngineConfiguration.getProcessApplicationManager();
 ProcessApplicationReference processApplicationForDeployment = processApplicationManager.getProcessApplicationForDeployment(deploymentId);
 return processApplicationForDeployment;
}
origin: camunda/camunda-bpm-platform

public void testGetTableNameAsCamundaAdmin() {
 // given
 identityService.setAuthentication(userId, Collections.singletonList(Groups.CAMUNDA_ADMIN));
 String tablePrefix = processEngineConfiguration.getDatabaseTablePrefix();
 // when
 String tableName = managementService.getTableName(ProcessDefinitionEntity.class);
 // then
 assertEquals(tablePrefix + "ACT_RE_PROCDEF", tableName);
}
origin: camunda/camunda-bpm-platform

@Test
public void testHistoryConfigurationWhenBatchNotDefined() {
 ProcessEngineConfigurationImpl processEngineConfigurationImplMock = mock(ProcessEngineConfigurationImpl.class);
 when(processEngine.getProcessEngineConfiguration()).thenReturn(processEngineConfigurationImplMock);
 when(processEngineConfigurationImplMock.getHistoryCleanupBatchWindowStartTime()).thenReturn(null);
 when(processEngineConfigurationImplMock.getHistoryCleanupBatchWindowEndTime()).thenReturn(null);
 when(processEngineConfigurationImplMock.getBatchWindowManager()).thenReturn(new DefaultBatchWindowManager());
 given()
  .contentType(ContentType.JSON)
 .then().expect()
  .statusCode(Status.OK.getStatusCode())
  .body("batchWindowStartTime", equalTo(null))
  .body("batchWindowEndTime", equalTo(null))
 .when()
  .get(CONFIGURATION_URL);
}
origin: camunda/camunda-bpm-platform

protected boolean isHistoryEventProduced(HistoryEventType eventType, ExternalTask externalTask) {
 ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
 HistoryLevel historyLevel = configuration.getHistoryLevel();
 return historyLevel.isHistoryEventProduced(eventType, externalTask);
}
origin: camunda/camunda-bpm-platform

@Test
public void usesDefaultValueAuditWhenNoValueIsConfigured() {
 final ProcessEngineConfigurationImpl config = config("true", ProcessEngineConfiguration.HISTORY_AUTO);
 ProcessEngineImpl processEngine = buildEngine(config);
 final Integer level = config.getCommandExecutorSchemaOperations().execute(new Command<Integer>() {
  @Override
  public Integer execute(CommandContext commandContext) {
   return HistoryLevelSetupCommand.databaseHistoryLevel(commandContext);
  }
 });
 assertThat(level, equalTo(HistoryLevel.HISTORY_LEVEL_AUDIT.getId()));
 assertThat(processEngine.getProcessEngineConfiguration().getHistoryLevel(), equalTo(HistoryLevel.HISTORY_LEVEL_AUDIT));
}
org.camunda.bpm.engine.impl.cfgProcessEngineConfigurationImpl

Most used methods

  • buildProcessEngine
  • getCommandExecutorTxRequired
  • getBatchWindowManager
  • getCommandExecutorSchemaOperations
  • getExpressionManager
  • getJobExecutor
  • getBeans
  • getDatabaseTablePrefix
  • getHistoryLevel
  • getProcessApplicationManager
  • getVariableSerializers
  • setCustomPreBPMNParseListeners
  • getVariableSerializers,
  • setCustomPreBPMNParseListeners,
  • getBatchJobsPerSeed,
  • getCommandExecutorTxRequiresNew,
  • getCustomPreBPMNParseListeners,
  • getDataSource,
  • getDbMetricsReporter,
  • getDbSqlSessionFactory,
  • getDefaultCharset,
  • getHistory

Popular in Java

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now