I wold like to know how to config my spring-boot-app to work with the flowable-form-engine. I have include the following dependencies:
flowable-spring-boot-starter-jpa
flowable-form-engine
flowable-form-engine-configurator
flowable-form-spring
My Java context looks like:
public class VcDataConfig {
@Autowired
private DataSource dataSource;
@Autowired
private PlatformTransactionManager transactionManager;
@Bean
public SpringFormEngineConfiguration formEngineConfiguration() {
SpringFormEngineConfiguration configuration = new SpringFormEngineConfiguration();
configuration.setDataSource(dataSource);
configuration.setTransactionManager(transactionManager);
configuration.setDatabaseSchemaUpdate("true");
configuration.setDeploymentMode("single-resource");
return configuration;
}
@Bean
public FormEngine formEngine() throws Exception {
FormEngineFactoryBean formEngineFactoryBean = new FormEngineFactoryBean();
formEngineFactoryBean.setFormEngineConfiguration(formEngineConfiguration());
return formEngineFactoryBean.getObject();
}
@Bean
public FormManagementService formManagementService() throws Exception {
return formEngine().getFormManagementService();
}
@Bean
public FormRepositoryService formRepositoryService() throws Exception {
return formEngine().getFormRepositoryService();
}
}
When I try to complete a task Iâm getting the exception: org.flowable.engine.common.api.FlowableIllegalArgumentException: Form engine is not initialized
I found the solution. Is just implement the interface ProcessEngineConfigurationConfigurer in a bean and pass a FormEngineConfigurator to the processEngineConfiguration.
Besides the configurators, did you also add the configurationConfigurer bean from above?
If so, the form and dmn engine can be retrieved for example from the DmnEngines lookup class.
I have followed the given instructions , I have added the bean ProcessEngineConfigurationConfigurer as suggested by joram ,
@Configuration
public class ProcessEngineConfig { @Bean
public ProcessEngineConfigurationConfigurer configurationConfigurer() {
return new ProcessEngineConfigurationConfigurer() {
public void configure(SpringProcessEngineConfiguration processEngineConfiguration) {
processEngineConfiguration.addConfigurator(new FormEngineConfigurator());
processEngineConfiguration.addConfigurator(new DmnEngineConfigurator());
}
};
}
}"
Then I added dependencies, but when trying to run the project I got the following error:
" Error creating bean with name âorg.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfigurationâ: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot find changelog location: class path resource [db/changelog/db.changelog-master.yaml] (please add changelog or check your Liquibase configuration)"
this to a file named âdb.changelog-master.xmlâ and put this file into resources/db/changelog. It worked but i am not sure if this is the correct way to do it. I am also exploring things.
If i working on tomcat server, do i need to change any file? and form that i created in âflowable-modelerâ is not reflecting in âflowable-adminâ of Form Engine Deployments