本文整理汇总了Java中org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants类的典型用法代码示例。如果您正苦于以下问题:Java EngineConfigurationConstants类的具体用法?Java EngineConfigurationConstants怎么用?Java EngineConfigurationConstants使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EngineConfigurationConstants类属于org.flowable.engine.common.impl.interceptor包,在下文中一共展示了EngineConfigurationConstants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initVariableServiceConfiguration
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
public void initVariableServiceConfiguration() {
this.variableServiceConfiguration = new VariableServiceConfiguration();
this.variableServiceConfiguration.setHistoryLevel(this.historyLevel);
this.variableServiceConfiguration.setClock(this.clock);
this.variableServiceConfiguration.setObjectMapper(this.objectMapper);
this.variableServiceConfiguration.setEventDispatcher(this.eventDispatcher);
this.variableServiceConfiguration.setVariableTypes(this.variableTypes);
if (this.internalHistoryVariableManager != null) {
this.variableServiceConfiguration.setInternalHistoryVariableManager(this.internalHistoryVariableManager);
} else {
this.variableServiceConfiguration.setInternalHistoryVariableManager(new CmmnHistoryVariableManager(cmmnHistoryManager));
}
this.variableServiceConfiguration.setMaxLengthString(this.getMaxLengthString());
this.variableServiceConfiguration.setSerializableVariableTypeTrackDeserializedObjects(this.isSerializableVariableTypeTrackDeserializedObjects());
this.variableServiceConfiguration.init();
addServiceConfiguration(EngineConfigurationConstants.KEY_VARIABLE_SERVICE_CONFIG, this.variableServiceConfiguration);
}
示例2: initVariableServiceConfiguration
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
public void initVariableServiceConfiguration() {
this.variableServiceConfiguration = new VariableServiceConfiguration();
this.variableServiceConfiguration.setHistoryLevel(this.historyLevel);
this.variableServiceConfiguration.setClock(this.clock);
this.variableServiceConfiguration.setObjectMapper(this.objectMapper);
this.variableServiceConfiguration.setEventDispatcher(this.eventDispatcher);
this.variableServiceConfiguration.setVariableTypes(this.variableTypes);
if (this.internalHistoryVariableManager != null) {
this.variableServiceConfiguration.setInternalHistoryVariableManager(this.internalHistoryVariableManager);
} else {
this.variableServiceConfiguration.setInternalHistoryVariableManager(new DefaultHistoryVariableManager(this));
}
this.variableServiceConfiguration.setMaxLengthString(this.getMaxLengthString());
this.variableServiceConfiguration.setSerializableVariableTypeTrackDeserializedObjects(this.isSerializableVariableTypeTrackDeserializedObjects());
this.variableServiceConfiguration.init();
addServiceConfiguration(EngineConfigurationConstants.KEY_VARIABLE_SERVICE_CONFIG, this.variableServiceConfiguration);
}
示例3: addAndRemoveEventListenerTypedNullType
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
/**
* Test that adding a listener with a null-type is never called.
*/
public void addAndRemoveEventListenerTypedNullType() throws Exception {
// Create a listener that just adds the events to a list
TestFlowableEventListener newListener = new TestFlowableEventListener();
// Add event-listener to dispatcher
dispatcher.addEventListener(newListener, (FlowableEngineEventType) null);
TaskServiceConfiguration taskServiceConfiguration = (TaskServiceConfiguration) processEngineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_TASK_SERVICE_CONFIG);
FlowableEntityEventImpl event1 = new FlowableEntityEventImpl(taskServiceConfiguration.getTaskEntityManager().create(), FlowableEngineEventType.ENTITY_CREATED);
FlowableEntityEventImpl event2 = new FlowableEntityEventImpl(taskServiceConfiguration.getTaskEntityManager().create(), FlowableEngineEventType.ENTITY_DELETED);
// Dispatch events, all should have entered the listener
dispatcher.dispatchEvent(event1);
dispatcher.dispatchEvent(event2);
assertTrue(newListener.getEventsReceived().isEmpty());
}
示例4: getObject
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
@Override
public DomainProcessEngine getObject() throws Exception {
if (engine == null) {
Map<String, ProcessEngine> engines = new HashMap<>();
ctx.getBeansOfType(DataSource.class).entrySet().stream().
filter(entry -> (!entry.getKey().startsWith("local"))).
forEachOrdered(entry -> {
String domain = StringUtils.substringBefore(entry.getKey(), DataSource.class.getSimpleName());
DataSource dataSource = entry.getValue();
PlatformTransactionManager transactionManager = ctx.getBean(
domain + "TransactionManager", PlatformTransactionManager.class);
Object entityManagerFactory = ctx.getBean(domain + "EntityManagerFactory");
SpringProcessEngineConfiguration conf = ctx.getBean(SpringProcessEngineConfiguration.class);
conf.setDataSource(dataSource);
conf.setTransactionManager(transactionManager);
conf.setTransactionsExternallyManaged(true);
conf.setJpaEntityManagerFactory(entityManagerFactory);
if (conf.getBeans() == null) {
conf.setBeans(new SpringBeanFactoryProxyMap(ctx));
}
if (conf.getExpressionManager() == null) {
conf.setExpressionManager(new SpringExpressionManager(ctx, conf.getBeans()));
}
if (EngineServiceUtil.getIdmEngineConfiguration(conf) == null) {
conf.addEngineConfiguration(
EngineConfigurationConstants.KEY_IDM_ENGINE_CONFIG,
ctx.getBean(SpringIdmEngineConfiguration.class));
}
engines.put(domain, conf.buildProcessEngine());
});
engine = new DomainProcessEngine(engines);
}
return engine;
}
示例5: DecisionAnalysisService
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
@Autowired
public DecisionAnalysisService(ProcessEngine processEngine) {
this.repositoryService = processEngine.getRepositoryService();
FormEngineConfigurationApi formEngineConfiguration = (FormEngineConfigurationApi) processEngine.getProcessEngineConfiguration()
.getEngineConfigurations().get(EngineConfigurationConstants.KEY_FORM_ENGINE_CONFIG);
this.formRepositoryService = formEngineConfiguration.getFormRepositoryService();
}
示例6: initTaskServiceConfiguration
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
public void initTaskServiceConfiguration() {
this.taskServiceConfiguration = new TaskServiceConfiguration();
this.taskServiceConfiguration.setHistoryLevel(this.historyLevel);
this.taskServiceConfiguration.setClock(this.clock);
this.taskServiceConfiguration.setObjectMapper(this.objectMapper);
this.taskServiceConfiguration.setEventDispatcher(this.eventDispatcher);
if (this.internalHistoryTaskManager != null) {
this.taskServiceConfiguration.setInternalHistoryTaskManager(this.internalHistoryTaskManager);
} else {
this.taskServiceConfiguration.setInternalHistoryTaskManager(new CmmnHistoryTaskManager(cmmnHistoryManager));
}
if (this.internalTaskVariableScopeResolver != null) {
this.taskServiceConfiguration.setInternalTaskVariableScopeResolver(this.internalTaskVariableScopeResolver);
} else {
this.taskServiceConfiguration.setInternalTaskVariableScopeResolver(new DefaultCmmnTaskVariableScopeResolver(this));
}
this.taskServiceConfiguration.setEnableTaskRelationshipCounts(this.isEnableTaskRelationshipCounts);
this.taskServiceConfiguration.setTaskQueryLimit(this.taskQueryLimit);
this.taskServiceConfiguration.setHistoricTaskQueryLimit(this.historicTaskQueryLimit);
this.taskServiceConfiguration.init();
addServiceConfiguration(EngineConfigurationConstants.KEY_TASK_SERVICE_CONFIG, this.taskServiceConfiguration);
}
示例7: initIdentityLinkServiceConfiguration
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
public void initIdentityLinkServiceConfiguration() {
this.identityLinkServiceConfiguration = new IdentityLinkServiceConfiguration();
this.identityLinkServiceConfiguration.setHistoryLevel(this.historyLevel);
this.identityLinkServiceConfiguration.setClock(this.clock);
this.identityLinkServiceConfiguration.setObjectMapper(this.objectMapper);
this.identityLinkServiceConfiguration.setEventDispatcher(this.eventDispatcher);
this.identityLinkServiceConfiguration.init();
addServiceConfiguration(EngineConfigurationConstants.KEY_IDENTITY_LINK_SERVICE_CONFIG, this.identityLinkServiceConfiguration);
}
示例8: initJobServiceConfiguration
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
public void initJobServiceConfiguration() {
this.jobServiceConfiguration = new JobServiceConfiguration();
this.jobServiceConfiguration.setHistoryLevel(this.historyLevel);
this.jobServiceConfiguration.setClock(this.clock);
this.jobServiceConfiguration.setObjectMapper(this.objectMapper);
this.jobServiceConfiguration.setEventDispatcher(this.eventDispatcher);
this.jobServiceConfiguration.setCommandExecutor(this.commandExecutor);
this.jobServiceConfiguration.setExpressionManager(this.expressionManager);
this.jobServiceConfiguration.setBusinessCalendarManager(this.businessCalendarManager);
this.jobServiceConfiguration.setJobHandlers(this.jobHandlers);
this.jobServiceConfiguration.setFailedJobCommandFactory(this.failedJobCommandFactory);
List<AsyncRunnableExecutionExceptionHandler> exceptionHandlers = new ArrayList<>();
if (customAsyncRunnableExecutionExceptionHandlers != null) {
exceptionHandlers.addAll(customAsyncRunnableExecutionExceptionHandlers);
}
if (addDefaultExceptionHandler) {
exceptionHandlers.add(new DefaultAsyncRunnableExecutionExceptionHandler());
}
this.jobServiceConfiguration.setAsyncRunnableExecutionExceptionHandlers(exceptionHandlers);
this.jobServiceConfiguration.setAsyncExecutorNumberOfRetries(this.asyncExecutorNumberOfRetries);
this.jobServiceConfiguration.setAsyncExecutorResetExpiredJobsMaxTimeout(this.asyncExecutorResetExpiredJobsMaxTimeout);
if (this.jobManager != null) {
this.jobServiceConfiguration.setJobManager(this.jobManager);
}
if (this.internalJobManager != null) {
this.jobServiceConfiguration.setInternalJobManager(this.internalJobManager);
} else {
this.jobServiceConfiguration.setInternalJobManager(new DefaultInternalCmmnJobManager(this));
}
this.jobServiceConfiguration.init();
addServiceConfiguration(EngineConfigurationConstants.KEY_JOB_SERVICE_CONFIG, this.jobServiceConfiguration);
}
示例9: initTaskServiceConfiguration
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
public void initTaskServiceConfiguration() {
this.taskServiceConfiguration = new TaskServiceConfiguration();
this.taskServiceConfiguration.setHistoryLevel(this.historyLevel);
this.taskServiceConfiguration.setClock(this.clock);
this.taskServiceConfiguration.setObjectMapper(this.objectMapper);
this.taskServiceConfiguration.setEventDispatcher(this.eventDispatcher);
if (this.internalHistoryTaskManager != null) {
this.taskServiceConfiguration.setInternalHistoryTaskManager(this.internalHistoryTaskManager);
} else {
this.taskServiceConfiguration.setInternalHistoryTaskManager(new DefaultHistoryTaskManager(this));
}
if (this.internalTaskVariableScopeResolver != null) {
this.taskServiceConfiguration.setInternalTaskVariableScopeResolver(this.internalTaskVariableScopeResolver);
} else {
this.taskServiceConfiguration.setInternalTaskVariableScopeResolver(new DefaultTaskVariableScopeResolver(this));
}
if (this.internalTaskLocalizationManager != null) {
this.taskServiceConfiguration.setInternalTaskLocalizationManager(this.internalTaskLocalizationManager);
} else {
this.taskServiceConfiguration.setInternalTaskLocalizationManager(new DefaultTaskLocalizationManager(this));
}
this.taskServiceConfiguration.setEnableTaskRelationshipCounts(this.performanceSettings.isEnableTaskRelationshipCounts());
this.taskServiceConfiguration.setEnableLocalization(this.performanceSettings.isEnableLocalization());
this.taskServiceConfiguration.setTaskQueryLimit(this.taskQueryLimit);
this.taskServiceConfiguration.setHistoricTaskQueryLimit(this.historicTaskQueryLimit);
this.taskServiceConfiguration.init();
addServiceConfiguration(EngineConfigurationConstants.KEY_TASK_SERVICE_CONFIG, this.taskServiceConfiguration);
}
示例10: tearDown
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
@Override
protected void tearDown() throws Exception {
processEngineConfiguration.setBulkInsertEnabled(oldIsBulkInsertableValue);
processEngineConfiguration.getPerformanceSettings().setEnableEagerExecutionTreeFetching(oldExecutionTreeFetchValue);
processEngineConfiguration.getPerformanceSettings().setEnableExecutionRelationshipCounts(oldExecutionRelationshipCountValue);
processEngineConfiguration.getPerformanceSettings().setEnableTaskRelationshipCounts(oldTaskRelationshipCountValue);
TaskServiceConfiguration TaskServiceConfiguration = (TaskServiceConfiguration) processEngineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_TASK_SERVICE_CONFIG);
TaskServiceConfiguration.setEnableTaskRelationshipCounts(oldTaskRelationshipCountValue);
processEngineConfiguration.setEnableProcessDefinitionInfoCache(oldenableProcessDefinitionInfoCacheValue);
((AbstractHistoryManager) processEngineConfiguration.getHistoryManager()).setHistoryLevel(oldHistoryLevel);
((CommandExecutorImpl) processEngineConfiguration.getCommandExecutor()).setFirst(oldFirstCommandInterceptor);
processEngineConfiguration.addSessionFactory(oldDbSqlSessionFactory);
// Validate (cause this tended to be screwed up)
List<HistoricActivityInstance> historicActivityInstances = historyService.createHistoricActivityInstanceQuery().list();
for (HistoricActivityInstance historicActivityInstance : historicActivityInstances) {
Assert.assertNotNull(historicActivityInstance.getStartTime());
Assert.assertNotNull(historicActivityInstance.getEndTime());
}
FlowableProfiler.getInstance().reset();
for (Deployment deployment : repositoryService.createDeploymentQuery().list()) {
repositoryService.deleteDeployment(deployment.getId(), true);
}
super.tearDown();
}
示例11: addAndRemoveEventListenerAllEvents
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
/**
* Test adding a listener and check if events are sent to it. Also checks that after removal, no events are received.
*/
public void addAndRemoveEventListenerAllEvents() throws Exception {
// Create a listener that just adds the events to a list
TestFlowableEventListener newListener = new TestFlowableEventListener();
// Add event-listener to dispatcher
dispatcher.addEventListener(newListener);
TaskServiceConfiguration taskServiceConfiguration = (TaskServiceConfiguration) processEngineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_TASK_SERVICE_CONFIG);
FlowableEntityEventImpl event1 = new FlowableEntityEventImpl(taskServiceConfiguration.getTaskEntityManager().create(), FlowableEngineEventType.ENTITY_CREATED);
FlowableEntityEventImpl event2 = new FlowableEntityEventImpl(taskServiceConfiguration.getTaskEntityManager().create(), FlowableEngineEventType.ENTITY_CREATED);
// Dispatch events
dispatcher.dispatchEvent(event1);
dispatcher.dispatchEvent(event2);
assertEquals(2, newListener.getEventsReceived().size());
assertEquals(event1, newListener.getEventsReceived().get(0));
assertEquals(event2, newListener.getEventsReceived().get(1));
// Remove listener and dispatch events again, listener should not be
// invoked
dispatcher.removeEventListener(newListener);
newListener.clearEventsReceived();
dispatcher.dispatchEvent(event1);
dispatcher.dispatchEvent(event2);
assertTrue(newListener.getEventsReceived().isEmpty());
}
示例12: addAndRemoveEventListenerTyped
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
/**
* Test adding a listener and check if events are sent to it, for the types it was registered for. Also checks that after removal, no events are received.
*/
public void addAndRemoveEventListenerTyped() throws Exception {
// Create a listener that just adds the events to a list
TestFlowableEventListener newListener = new TestFlowableEventListener();
// Add event-listener to dispatcher
dispatcher.addEventListener(newListener, FlowableEngineEventType.ENTITY_CREATED, FlowableEngineEventType.ENTITY_DELETED);
TaskServiceConfiguration taskServiceConfiguration = (TaskServiceConfiguration) processEngineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_TASK_SERVICE_CONFIG);
FlowableEntityEventImpl event1 = new FlowableEntityEventImpl(taskServiceConfiguration.getTaskEntityManager().create(), FlowableEngineEventType.ENTITY_CREATED);
FlowableEntityEventImpl event2 = new FlowableEntityEventImpl(taskServiceConfiguration.getTaskEntityManager().create(), FlowableEngineEventType.ENTITY_DELETED);
FlowableEntityEventImpl event3 = new FlowableEntityEventImpl(taskServiceConfiguration.getTaskEntityManager().create(), FlowableEngineEventType.ENTITY_UPDATED);
// Dispatch events, only 2 out of 3 should have entered the listener
dispatcher.dispatchEvent(event1);
dispatcher.dispatchEvent(event2);
dispatcher.dispatchEvent(event3);
assertEquals(2, newListener.getEventsReceived().size());
assertEquals(event1, newListener.getEventsReceived().get(0));
assertEquals(event2, newListener.getEventsReceived().get(1));
// Remove listener and dispatch events again, listener should not be
// invoked
dispatcher.removeEventListener(newListener);
newListener.clearEventsReceived();
dispatcher.dispatchEvent(event1);
dispatcher.dispatchEvent(event2);
assertTrue(newListener.getEventsReceived().isEmpty());
}
示例13: executeAcquireJobsCommand
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
protected List<TimerJobEntity> executeAcquireJobsCommand() {
return processEngineConfiguration.getCommandExecutor().execute(new Command<List<TimerJobEntity>>() {
@Override
public List<TimerJobEntity> execute(CommandContext commandContext) {
JobServiceConfiguration jobServiceConfiguration = (JobServiceConfiguration) processEngineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_JOB_SERVICE_CONFIG);
return jobServiceConfiguration.getTimerJobEntityManager().findTimerJobsToExecute(new Page(0, 1));
}
});
}
示例14: testResetExpiredJobTimeout
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
@Deployment
public void testResetExpiredJobTimeout() {
Date startOfTestTime = new Date();
processEngineConfiguration.getClock().setCurrentTime(startOfTestTime);
runtimeService.startProcessInstanceByKey("myProcess");
Job job = managementService.createJobQuery().singleResult();
assertNotNull(job);
assertTrue(job instanceof JobEntity);
JobEntity jobEntity = (JobEntity) job;
assertNull(jobEntity.getLockOwner());
assertNull(jobEntity.getLockExpirationTime());
int expiredJobsPagesSize = processEngineConfiguration.getAsyncExecutorResetExpiredJobsPageSize();
JobServiceConfiguration jobServiceConfiguration = (JobServiceConfiguration) processEngineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_JOB_SERVICE_CONFIG);
List<? extends JobInfoEntity> expiredJobs = managementService.executeCommand(new FindExpiredJobsCmd(expiredJobsPagesSize, jobServiceConfiguration.getJobEntityManager()));
assertEquals(0, expiredJobs.size());
// Move time to timeout + 1 second. This should trigger the max timeout and the job should be reset (unacquired: reinserted as a new job)
processEngineConfiguration.getClock().setCurrentTime(new Date(startOfTestTime.getTime() + (processEngineConfiguration.getAsyncExecutorResetExpiredJobsMaxTimeout() + 1)));
expiredJobs = managementService.executeCommand(new FindExpiredJobsCmd(expiredJobsPagesSize, jobServiceConfiguration.getJobEntityManager()));
assertEquals(1, expiredJobs.size());
assertEquals(job.getId(), expiredJobs.get(0).getId());
assertJobDetails(false);
List<String> jobIds = new ArrayList<>();
for (JobInfoEntity j : expiredJobs) {
jobIds.add(j.getId());
}
managementService.executeCommand(new ResetExpiredJobsCmd(jobIds, jobServiceConfiguration.getJobEntityManager()));
assertEquals(0, managementService.executeCommand(new FindExpiredJobsCmd(expiredJobsPagesSize, jobServiceConfiguration.getJobEntityManager())).size());
assertNull(managementService.createJobQuery().jobId(job.getId()).singleResult());
assertNotNull(managementService.createJobQuery().singleResult());
}
示例15: testBasicJobExecutorOperation
import org.flowable.engine.common.impl.interceptor.EngineConfigurationConstants; //导入依赖的package包/类
public void testBasicJobExecutorOperation() throws Exception {
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutor();
commandExecutor.execute(new Command<Void>() {
@Override
public Void execute(CommandContext commandContext) {
JobServiceConfiguration jobServiceConfiguration = (JobServiceConfiguration) processEngineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_JOB_SERVICE_CONFIG);
JobManager jobManager = jobServiceConfiguration.getJobManager();
jobManager.execute(createTweetMessage("message-one"));
jobManager.execute(createTweetMessage("message-two"));
jobManager.execute(createTweetMessage("message-three"));
jobManager.execute(createTweetMessage("message-four"));
TimerJobEntityManager timerJobManager = jobServiceConfiguration.getTimerJobEntityManager();
timerJobManager.insert(createTweetTimer("timer-one", new Date()));
timerJobManager.insert(createTweetTimer("timer-one", new Date()));
timerJobManager.insert(createTweetTimer("timer-two", new Date()));
return null;
}
});
GregorianCalendar currentCal = new GregorianCalendar();
currentCal.add(Calendar.MINUTE, 1);
processEngineConfiguration.getClock().setCurrentTime(currentCal.getTime());
waitForJobExecutorToProcessAllJobs(8000L, 200L);
Set<String> messages = new HashSet<>(tweetHandler.getMessages());
Set<String> expectedMessages = new HashSet<>();
expectedMessages.add("message-one");
expectedMessages.add("message-two");
expectedMessages.add("message-three");
expectedMessages.add("message-four");
expectedMessages.add("timer-one");
expectedMessages.add("timer-two");
assertEquals(new TreeSet<>(expectedMessages), new TreeSet<>(messages));
}