AppEngine programmatic linking to ProcessEngine

I have a spring application (not boot) that uses java config for the process engine, but also hosts the rest api for the modeler webapp to deploy app definitions. Now with the new AppEngine I needed to deploy the app engine rest services in my application. This works fine, but it only deploys to the act_app tables if not linked to the process engine, which I don’t know how to do.

    public ProcessEngineConfiguration processEngineConfiguration(DataSource dataSource, PlatformTransactionManager transactionManager) {
        SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
        ... some more config

        // configurators
        ArrayList<EngineConfigurator> configurators = new ArrayList<>(2);
        configurators.add(new SpringFormEngineConfigurator());
        configurators.add(new SpringContentEngineConfigurator());
        ... some more config like parse handlers
        return config;

    public ProcessEngine processEngine(ProcessEngineConfiguration config) {
        return config.buildProcessEngine();

So the above configures the process engine, and adding the configurators also hooks up the Form and Content engines.

There is however no SpringAppEngineConfigurator to add to the configurators.

    public AppEngineConfiguration appEngineConfiguration(ProcessEngine processEngine, ProcessEngineConfiguration processEngineConfiguration, DataSource dataSource, PlatformTransactionManager transactionManager) {
        SpringAppEngineConfiguration appEngineConfiguration = new SpringAppEngineConfiguration();

        return appEngineConfiguration;

    public AppEngineFactoryBean appEngineFactoryBean(AppEngineConfiguration appEngineConfiguration) {
        AppEngineFactoryBean factoryBean = new AppEngineFactoryBean();
        return factoryBean;

    public AppEngine appEngine(AppEngineFactoryBean appEngineFactoryBean) {
        try {
            return appEngineFactoryBean.getObject();
        } catch (Exception e) {
            throw new RuntimeException(e);

So while I can grab the other configurators from the processEngineConfiguration and it does deploy to the form engine, I can’t get deployment of processes working.

I have also tried: appEngineConfiguration.setCustomPostDeployers(Arrays.asList(new BpmnDeployer()));
But gets NullPointer here: CommandContextUtil.getProcessEngineConfiguration().getRepositoryService();

I don’t understand enough of the guts here to know where to plug it in.

I would advise you to look at the ProcessEngineAutoConfiguration to see how this is done with Spring Boot. More precisely the ProcessEngineAppConfiguration within the auto configuration.

You should not build the process engine like you are doing it when it is standalone. There is a ProcessEngineConfigurator and you need to add that to the AppEngine.

Then in order to expose the ProcessEngine you need to do something like in the ProcessEngineServicesAutoConfiguration more precisely the AlreadyInitializedAppEngineConfiguration.

Thanks. I had a brief look at those classes before I posted, but it will take me a bit of time to understand all the inter-relationships.

Let me phrase it differently…

How would you connect the app engine to a non-spring standalone process engine as here?

<beans xmlns=""

  <bean id="processEngineConfiguration" class="org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration">

    <property name="jdbcUrl" value="jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000" />
    <property name="jdbcDriver" value="org.h2.Driver" />
    <property name="jdbcUsername" value="sa" />
    <property name="jdbcPassword" value="" />

    <property name="databaseSchemaUpdate" value="true" />

    <property name="asyncExecutorActivate" value="false" />

    <property name="mailServerHost" value="" />
    <property name="mailServerPort" value="5025" />


Taken from here:

Thanks. I had a brief look at those classes before I posted, but it will take me a bit of time to understand all the inter-relationships.

The Spring Boot auto configuration would be the same way I would do a non Spring Boot application and a non spring application.

In that XML you will need to create an additional appEngineConfiguration, add a processEngineConfigurator and add it to the appEngineConfiguration. and then use AppEngines to get the AppEngine. This would trigger an initialisation of the ProcessEngine as well


Hi Filip

Apologies. I should have just read your first answer more carefully as there was enough information to resolve my issue. Took a few minutes to rearrange my configuration.

The AppEngine should be driving the configuration and other configurators added to it.

Thanks a lot!

No problem @ruzkant. I should have been clearer as well. Glad that you resolved your problem.

Yes in this case the AppEngine is the one leading the configurations.


By the way I found a problem with the app deployment code where version numbers were not increased…

See here:

Thanks for the PR @ruzkant. Tijs already merged it

1 Like