org.flowable.common.engine.impl.AbstractEngineConfiguration Java Examples
The following examples show how to use
org.flowable.common.engine.impl.AbstractEngineConfiguration.
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: DefaultInboundEventProcessingPipeline.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public Collection<EventRegistryEvent> run(String channelKey, String rawEvent) { T event = deserialize(rawEvent); String eventKey = detectEventDefinitionKey(event); boolean multiTenant = false; String tenantId = AbstractEngineConfiguration.NO_TENANT_ID; if (inboundEventTenantDetector != null) { tenantId = inboundEventTenantDetector.detectTenantId(event); multiTenant = true; } EventModel eventModel = multiTenant ? eventRepositoryService.getEventModelByKey(eventKey, tenantId) : eventRepositoryService.getEventModelByKey(eventKey); ChannelModel channelModel = multiTenant ? eventRepositoryService.getChannelModelByKey(channelKey, tenantId) : eventRepositoryService.getChannelModelByKey(channelKey); EventInstanceImpl eventInstance = new EventInstanceImpl( eventModel.getKey(), extractPayload(eventModel, event), tenantId ); return transform(eventInstance); }
Example #2
Source File: FlowableEventDispatcherImpl.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public void dispatchEvent(FlowableEvent event) { if (enabled) { eventSupport.dispatchEvent(event); } CommandContext commandContext = Context.getCommandContext(); if (commandContext != null) { AbstractEngineConfiguration engineConfiguration = commandContext.getCurrentEngineConfiguration(); if (engineConfiguration != null && engineConfiguration.getAdditionalEventDispatchActions() != null) { for (EventDispatchAction eventDispatchAction : engineConfiguration.getAdditionalEventDispatchActions()) { eventDispatchAction.dispatchEvent(commandContext, eventSupport, event); } } } }
Example #3
Source File: SecureJavascriptConfigurator.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public void beforeInit(AbstractEngineConfiguration engineConfiguration) { // Initialize the Rhino context factory (needs to be done once) if (secureScriptContextFactory == null) { initSecureScriptContextFactory(); } // Init parse handler that will set the secure javascript task to the activity ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) engineConfiguration; List<BpmnParseHandler> customDefaultBpmnParseHandlers = processEngineConfiguration.getCustomDefaultBpmnParseHandlers(); if (customDefaultBpmnParseHandlers == null) { customDefaultBpmnParseHandlers = new ArrayList<>(); processEngineConfiguration.setCustomDefaultBpmnParseHandlers(customDefaultBpmnParseHandlers); } customDefaultBpmnParseHandlers.add(new SecureJavascriptTaskParseHandler()); }
Example #4
Source File: SpringFormEngineConfigurator.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public void configure(AbstractEngineConfiguration engineConfiguration) { if (formEngineConfiguration == null) { formEngineConfiguration = new SpringFormEngineConfiguration(); } else if (!(formEngineConfiguration instanceof SpringFormEngineConfiguration)) { throw new IllegalArgumentException("Expected formEngine configuration to be of type " + SpringFormEngineConfiguration.class + " but was " + formEngineConfiguration.getClass()); } initialiseCommonProperties(engineConfiguration, formEngineConfiguration); SpringEngineConfiguration springEngineConfiguration = (SpringEngineConfiguration) engineConfiguration; ((SpringFormEngineConfiguration) formEngineConfiguration).setTransactionManager(springEngineConfiguration.getTransactionManager()); if (formEngineConfiguration.getExpressionManager() == null) { formEngineConfiguration.setExpressionManager(new SpringFormExpressionManager( springEngineConfiguration.getApplicationContext(), springEngineConfiguration.getBeans())); } initFormEngine(); initServiceConfigurations(engineConfiguration, formEngineConfiguration); }
Example #5
Source File: ProcessEngineConfigurator.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public void configure(AbstractEngineConfiguration engineConfiguration) { if (processEngineConfiguration == null) { processEngineConfiguration = new StandaloneProcessEngineConfiguration(); } initialiseCommonProperties(engineConfiguration, processEngineConfiguration); initProcessEngine(); JobServiceConfiguration engineJobServiceConfiguration = getJobServiceConfiguration(engineConfiguration); if (engineJobServiceConfiguration != null) { engineJobServiceConfiguration.getInternalJobManager() .registerScopedInternalJobManager(ScopeTypes.BPMN, ((ProcessEngineConfigurationImpl) processEngineConfiguration).getJobServiceConfiguration().getInternalJobManager()); } initServiceConfigurations(engineConfiguration, processEngineConfiguration); }
Example #6
Source File: SpringContentEngineConfigurator.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public void configure(AbstractEngineConfiguration engineConfiguration) { if (contentEngineConfiguration == null) { contentEngineConfiguration = new SpringContentEngineConfiguration(); } else if (!(contentEngineConfiguration instanceof SpringContentEngineConfiguration)) { throw new IllegalArgumentException("Expected contentEngine configuration to be of type " + SpringContentEngineConfiguration.class + " but was " + engineConfiguration.getClass()); } initialiseCommonProperties(engineConfiguration, contentEngineConfiguration); SpringEngineConfiguration springEngineConfiguration = (SpringEngineConfiguration) engineConfiguration; ((SpringContentEngineConfiguration) contentEngineConfiguration).setTransactionManager(springEngineConfiguration.getTransactionManager()); initContentEngine(); initServiceConfigurations(engineConfiguration, contentEngineConfiguration); }
Example #7
Source File: LDAPConfigurator.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public void configure(AbstractEngineConfiguration engineConfiguration) { this.idmEngineConfiguration = new LdapIdmEngineConfiguration(); if (ldapConfiguration == null) { throw new FlowableException("ldapConfiguration is not set"); } LDAPGroupCache ldapGroupCache = null; if (ldapConfiguration.getGroupCacheSize() > 0) { ldapGroupCache = new LDAPGroupCache(ldapConfiguration.getGroupCacheSize(), ldapConfiguration.getGroupCacheExpirationTime(), engineConfiguration.getClock()); if (ldapConfiguration.getGroupCacheListener() != null) { ldapGroupCache.setLdapCacheListener(ldapConfiguration.getGroupCacheListener()); } } super.configure(engineConfiguration); getIdmEngineConfiguration(engineConfiguration) .setIdmIdentityService(new LDAPIdentityServiceImpl(ldapConfiguration, ldapGroupCache)); }
Example #8
Source File: CmmnDbSchemaManager.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public void initSchema(String databaseSchemaUpdate) { super.initSchema(databaseSchemaUpdate); // When the databaseSchemaUpdate is drop-create: // the IDM engine will have done a drop-create due to the configurator running first // The CmmnDbSchemaManager will go next, but it will do a dropAll, dropping the idm tables too. if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_DROP_CREATE.equals(databaseSchemaUpdate)) { AbstractEngineConfiguration abstractEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration().getEngineConfigurations() .get(EngineConfigurationConstants.KEY_IDM_ENGINE_CONFIG); if (abstractEngineConfiguration != null) { IdmEngineConfiguration idmEngineConfiguration = (IdmEngineConfiguration) abstractEngineConfiguration; idmEngineConfiguration.getSchemaManager().schemaCreate(); } } }
Example #9
Source File: SpringEventRegistryConfigurator.java From flowable-engine with Apache License 2.0 | 6 votes |
@Override public void configure(AbstractEngineConfiguration engineConfiguration) { if (eventEngineConfiguration == null) { eventEngineConfiguration = new SpringEventRegistryEngineConfiguration(); } else if (!(eventEngineConfiguration instanceof SpringEventRegistryEngineConfiguration)) { throw new IllegalArgumentException("Expected eventRegistryEngine configuration to be of type " + SpringEventRegistryEngineConfiguration.class + " but was " + eventEngineConfiguration.getClass()); } initialiseCommonProperties(engineConfiguration, eventEngineConfiguration); SpringEngineConfiguration springEngineConfiguration = (SpringEngineConfiguration) engineConfiguration; ((SpringEventRegistryEngineConfiguration) eventEngineConfiguration).setTransactionManager(springEngineConfiguration.getTransactionManager()); if (eventEngineConfiguration.getExpressionManager() == null) { eventEngineConfiguration.setExpressionManager(new SpringEventExpressionManager( springEngineConfiguration.getApplicationContext(), springEngineConfiguration.getBeans())); } initEventRegistryEngine(); initServiceConfigurations(engineConfiguration, eventEngineConfiguration); }
Example #10
Source File: LiquibaseBasedSchemaManager.java From flowable-engine with Apache License 2.0 | 6 votes |
public void initSchema(String databaseSchemaUpdate) { try { if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_CREATE_DROP.equals(databaseSchemaUpdate)) { schemaCreate(); } else if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_DROP_CREATE.equals(databaseSchemaUpdate)) { schemaDrop(); schemaCreate(); } else if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_TRUE.equals(databaseSchemaUpdate)) { schemaUpdate(); } else if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_FALSE.equals(databaseSchemaUpdate)) { schemaCheckVersion(); } } catch (Exception e) { throw new FlowableException("Error initialising " + context + " data model", e); } }
Example #11
Source File: WorkflowFlowableContext.java From syncope with Apache License 2.0 | 6 votes |
@ConditionalOnMissingBean @Bean @Scope("prototype") public DomainProcessEngineConfiguration processEngineConfiguration() { DomainProcessEngineConfiguration conf = new DomainProcessEngineConfiguration(); conf.setDatabaseSchemaUpdate(AbstractEngineConfiguration.DB_SCHEMA_UPDATE_TRUE); conf.setJpaHandleTransaction(true); conf.setJpaCloseEntityManager(false); conf.setHistoryLevel(historyLevel); conf.setIdmEngineConfigurator(syncopeIdmEngineConfigurator()); conf.setCustomPreVariableTypes(List.of(syncopeEntitiesVariableType())); conf.setFormHandlerHelper(syncopeFormHandlerHelper()); conf.setIdGenerator(idGenerator()); conf.setPreBpmnParseHandlers(List.of(new ShellServiceTaskDisablingBpmnParseHandler())); return conf; }
Example #12
Source File: CmmnEngineConfigurator.java From flowable-engine with Apache License 2.0 | 5 votes |
protected ProcessEngineConfigurationImpl getProcessEngineConfiguration(AbstractEngineConfiguration engineConfiguration) { if (engineConfiguration.getEngineConfigurations().containsKey(EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG)) { return (ProcessEngineConfigurationImpl) engineConfiguration.getEngineConfigurations() .get(EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG); } return null; }
Example #13
Source File: EngineServiceUtil.java From flowable-engine with Apache License 2.0 | 5 votes |
public static ContentService getContentService(AbstractEngineConfiguration engineConfiguration) { ContentService contentService = null; ContentEngineConfigurationApi contentEngineConfiguration = getContentEngineConfiguration(engineConfiguration); if (contentEngineConfiguration != null) { contentService = contentEngineConfiguration.getContentService(); } return contentService; }
Example #14
Source File: CmmnEngineConfigurator.java From flowable-engine with Apache License 2.0 | 5 votes |
@Override public void beforeInit(AbstractEngineConfiguration engineConfiguration) { super.beforeInit(engineConfiguration); // When async history is enabled on the bpmn engine, it also gets enabled on the cmmn engine. // The same async history executor will be shared between the engine instances (see in the configure method), // which will be instantiated by the bpmn engine. However, some properties need to be set here (before instantiation) // to have an async history executor that works for both engines ProcessEngineConfigurationImpl processEngineConfiguration = getProcessEngineConfiguration(engineConfiguration); if (processEngineConfiguration != null && processEngineConfiguration.isAsyncHistoryEnabled()) { processEngineConfiguration.setHistoryJobExecutionScope(JobServiceConfiguration.JOB_EXECUTION_SCOPE_ALL); } }
Example #15
Source File: PasswordEncoderIdmEngineConfigurator.java From flowable-engine with Apache License 2.0 | 5 votes |
@Override public void configure(AbstractEngineConfiguration engineConfiguration) { if (idmEngineConfiguration == null) { idmEngineConfiguration = new StandaloneIdmEngineConfiguration(); } initialiseCommonProperties(engineConfiguration, idmEngineConfiguration); idmEngineConfiguration.setPasswordEncoder(new ApacheDigester(ApacheDigester.Digester.MD5)); idmEngineConfiguration.buildIdmEngine(); initServiceConfigurations(engineConfiguration, idmEngineConfiguration); }
Example #16
Source File: FlowableProfiler.java From flowable-engine with Apache License 2.0 | 5 votes |
@Override public void beforeInit(AbstractEngineConfiguration engineConfiguration) { // Command interceptor List<CommandInterceptor> interceptors = new ArrayList<>(); interceptors.add(new TotalExecutionTimeCommandInterceptor()); engineConfiguration.setCustomPreCommandInterceptors(interceptors); // DbsqlSession engineConfiguration.setDbSqlSessionFactory(new ProfilingDbSqlSessionFactory(engineConfiguration.isUsePrefixId())); }
Example #17
Source File: CmmnEngineConfigurator.java From flowable-engine with Apache License 2.0 | 5 votes |
@Override public void configure(AbstractEngineConfiguration engineConfiguration) { if (cmmnEngineConfiguration == null) { cmmnEngineConfiguration = new CmmnEngineConfiguration(); } initialiseCommonProperties(engineConfiguration, cmmnEngineConfiguration); ProcessEngineConfigurationImpl processEngineConfiguration = getProcessEngineConfiguration(engineConfiguration); if (processEngineConfiguration != null) { copyProcessEngineProperties(processEngineConfiguration); } cmmnEngineConfiguration.setExecuteServiceSchemaManagers(false); initCmmnEngine(); if (processEngineConfiguration != null) { cmmnEngineConfiguration.getJobServiceConfiguration().getInternalJobManager() .registerScopedInternalJobManager(ScopeTypes.BPMN, processEngineConfiguration.getJobServiceConfiguration().getInternalJobManager()); processEngineConfiguration.getJobServiceConfiguration().getInternalJobManager() .registerScopedInternalJobManager(ScopeTypes.CMMN, cmmnEngineConfiguration.getJobServiceConfiguration().getInternalJobManager()); } JobServiceConfiguration engineJobServiceConfiguration = getJobServiceConfiguration(engineConfiguration); if (engineJobServiceConfiguration != null) { engineJobServiceConfiguration.getInternalJobManager() .registerScopedInternalJobManager(ScopeTypes.CMMN, cmmnEngineConfiguration.getJobServiceConfiguration().getInternalJobManager()); } initServiceConfigurations(engineConfiguration, cmmnEngineConfiguration); }
Example #18
Source File: EngineServiceUtil.java From flowable-engine with Apache License 2.0 | 5 votes |
public static CmmnHistoryService getCmmnHistoryService(AbstractEngineConfiguration engineConfiguration) { CmmnHistoryService cmmnHistoryService = null; CmmnEngineConfigurationApi cmmnEngineConfiguration = getCmmnEngineConfiguration(engineConfiguration); if (cmmnEngineConfiguration != null) { cmmnHistoryService = cmmnEngineConfiguration.getCmmnHistoryService(); } return cmmnHistoryService; }
Example #19
Source File: EngineServiceUtil.java From flowable-engine with Apache License 2.0 | 5 votes |
public static CmmnRuntimeService getCmmnRuntimeService(AbstractEngineConfiguration engineConfiguration) { CmmnRuntimeService cmmnRuntimeService = null; CmmnEngineConfigurationApi cmmnEngineConfiguration = getCmmnEngineConfiguration(engineConfiguration); if (cmmnEngineConfiguration != null) { cmmnRuntimeService = cmmnEngineConfiguration.getCmmnRuntimeService(); } return cmmnRuntimeService; }
Example #20
Source File: EngineServiceUtil.java From flowable-engine with Apache License 2.0 | 5 votes |
public static CmmnRepositoryService getCmmnRepositoryService(AbstractEngineConfiguration engineConfiguration) { CmmnRepositoryService cmmnRepositoryService = null; CmmnEngineConfigurationApi cmmnEngineConfiguration = getCmmnEngineConfiguration(engineConfiguration); if (cmmnEngineConfiguration != null) { cmmnRepositoryService = cmmnEngineConfiguration.getCmmnRepositoryService(); } return cmmnRepositoryService; }
Example #21
Source File: EngineServiceUtil.java From flowable-engine with Apache License 2.0 | 5 votes |
public static EventRegistry getEventRegistry(AbstractEngineConfiguration engineConfiguration) { EventRegistry eventRegistry = null; EventRegistryEngineConfiguration eventRegistryEngineConfiguration = getEventRegistryEngineConfiguration(engineConfiguration); if (eventRegistryEngineConfiguration != null) { eventRegistry = eventRegistryEngineConfiguration.getEventRegistry(); } return eventRegistry; }
Example #22
Source File: EngineServiceUtil.java From flowable-engine with Apache License 2.0 | 5 votes |
public static IdmIdentityService getIdmIdentityService(AbstractEngineConfiguration engineConfiguration) { IdmIdentityService idmIdentityService = null; IdmEngineConfigurationApi idmEngineConfiguration = getIdmEngineConfiguration(engineConfiguration); if (idmEngineConfiguration != null) { idmIdentityService = idmEngineConfiguration.getIdmIdentityService(); } return idmIdentityService; }
Example #23
Source File: VariableScopeResolverFactory.java From flowable-engine with Apache License 2.0 | 5 votes |
@Override public Resolver createResolver(AbstractEngineConfiguration engineConfiguration, VariableScope variableScope) { if (variableScope != null) { return new VariableScopeResolver((ProcessEngineConfigurationImpl) engineConfiguration, variableScope); } return null; }
Example #24
Source File: FormEngineConfigurator.java From flowable-engine with Apache License 2.0 | 5 votes |
@Override public void configure(AbstractEngineConfiguration engineConfiguration) { if (formEngineConfiguration == null) { formEngineConfiguration = new StandaloneFormEngineConfiguration(); } initialiseCommonProperties(engineConfiguration, formEngineConfiguration); initFormEngine(); initServiceConfigurations(engineConfiguration, formEngineConfiguration); }
Example #25
Source File: EnsureCleanDbUtils.java From flowable-engine with Apache License 2.0 | 5 votes |
public static void assertAndEnsureCleanDb( String testName, Logger logger, AbstractEngineConfiguration engineConfiguration, EnsureCleanDb ensureCleanDb, boolean hasNoException, Command<Void> dropAndRecreateDbCommand) { Collection<String> tableNamesExcludedFromDbCleanCheck = new HashSet<>(Arrays.asList(ensureCleanDb.excludeTables())); // if the db should not be dropped pass null Command<Void> dropAndRecreateDbCommandToUse = ensureCleanDb.dropDb() ? dropAndRecreateDbCommand : null; assertAndEnsureCleanDb(testName, logger, engineConfiguration, tableNamesExcludedFromDbCleanCheck, hasNoException, dropAndRecreateDbCommandToUse); }
Example #26
Source File: ReflectUtil.java From flowable-engine with Apache License 2.0 | 5 votes |
private static Class loadClass(ClassLoader classLoader, String className) throws ClassNotFoundException { CommandContext commandContext = Context.getCommandContext(); AbstractEngineConfiguration engineConfiguration = null; if (commandContext != null) { engineConfiguration = Context.getCommandContext().getCurrentEngineConfiguration(); } boolean useClassForName = engineConfiguration == null || engineConfiguration.isUseClassForNameClassLoading(); return useClassForName ? Class.forName(className, true, classLoader) : classLoader.loadClass(className); }
Example #27
Source File: ProcessEngineConfigurator.java From flowable-engine with Apache License 2.0 | 5 votes |
protected JobServiceConfiguration getJobServiceConfiguration(AbstractEngineConfiguration engineConfiguration) { if (engineConfiguration.getServiceConfigurations().containsKey(EngineConfigurationConstants.KEY_JOB_SERVICE_CONFIG)) { return (JobServiceConfiguration) engineConfiguration.getServiceConfigurations().get(EngineConfigurationConstants.KEY_JOB_SERVICE_CONFIG); } return null; }
Example #28
Source File: ListQueryParameterObject.java From flowable-engine with Apache License 2.0 | 5 votes |
public String getOrderBy() { // For db2 and sqlserver, when there is paging needed, the limitBefore and limitBetween is used. // For those databases, the regular orderBy needs to be empty, // the order will be added in the 'limitBetween' (see mssql/db2.properties). if (firstResult >= 0 && (AbstractEngineConfiguration.DATABASE_TYPE_DB2.equals(databaseType) || AbstractEngineConfiguration.DATABASE_TYPE_MSSQL.equals(databaseType)) ) { return ""; } else { return "order by " + getOrderByColumns(); } }
Example #29
Source File: EventRegistryEngineConfigurator.java From flowable-engine with Apache License 2.0 | 5 votes |
@Override public void configure(AbstractEngineConfiguration engineConfiguration) { if (eventEngineConfiguration == null) { eventEngineConfiguration = new StandaloneEventRegistryEngineConfiguration(); } initialiseEventRegistryEngineConfiguration(eventEngineConfiguration); initialiseCommonProperties(engineConfiguration, eventEngineConfiguration); this.eventRegistryEngine = initEventRegistryEngine(); initServiceConfigurations(engineConfiguration, eventEngineConfiguration); }
Example #30
Source File: EngineServiceUtil.java From flowable-engine with Apache License 2.0 | 5 votes |
public static CmmnManagementService getCmmnManagementService(AbstractEngineConfiguration engineConfiguration) { CmmnManagementService cmmnManagementService = null; CmmnEngineConfigurationApi cmmnEngineConfiguration = getCmmnEngineConfiguration(engineConfiguration); if (cmmnEngineConfiguration != null) { cmmnManagementService = cmmnEngineConfiguration.getCmmnManagementService(); } return cmmnManagementService; }