PropertyNotFoundException: Cannot resolve identifier 'vacationRequestProcessor' in flowfest-2018 example

I’m trying to get the ‘flowfest-2018’ example from https://github.com/flowable/flowable-examples running.

So far I get a PropertyNotFoundException: Cannot resolve identifier 'vacationRequestProcessor' when I start the ‘Vacation request’ process from the Flowable Task Client.

The DemoFlowfestApplication is running as a Spring Boot application with the following configuration:

server.port=31080
server.servlet.context-path=/flowable-rest

spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/mydb?currentSchema=bpm
spring.datasource.username=dbuser
spring.datasource.password=dbpassword

flowable.idm.password-encoder=spring_delegating

I’ve deployed the web applications ‘flowable-task’, ‘flowable-admin’, ‘flowable-idm’ and ‘flowable-modeler’ in a standalone Tomcat server. They are configured as follows (for simplicity, they share the same application.properties file:

server.port=31081

spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/mydb?currentSchema=bpm
spring.datasource.username=dbuser
spring.datasource.password=dbpassword

spring.liquibase.enabled=false

flowable.admin.app.server-config.process.port=31080
flowable.admin.app.server-config.cmmn.port=31080
flowable.admin.app.server-config.app.port=31080
flowable.admin.app.server-config.dmn.port=31080
flowable.admin.app.server-config.form.port=31080
flowable.admin.app.server-config.content.port=31080

flowable.admin.app.server-config.process.context-root=flowable-rest
flowable.admin.app.server-config.cmmn.context-root=flowable-rest
flowable.admin.app.server-config.app.context-root=flowable-rest
flowable.admin.app.server-config.dmn.context-root=flowable-rest
flowable.admin.app.server-config.form.context-root=flowable-rest
flowable.admin.app.server-config.content.context-root=flowable-rest

flowable.common.app.idm-url=http://localhost:31081/flowable-idm
flowable.common.app.idm-admin.user=idm-admin
flowable.common.app.idm-admin.password=test

flowable.idm.app.admin.user-id=idm-admin
flowable.idm.app.admin.password=test
flowable.idm.app.admin.first-name=IDM
flowable.idm.app.admin.last-name=Administrator
flowable.idm.app.admin.email=admin@flowable.org

flowable.idm.password-encoder=spring_delegating

flowable.modeler.app.deployment-api-url=http://localhost:31080/flowable-rest/app-api

flowable.task.app.rest-enabled=false

All other settings are set by the WEB-INF\classes\flowable-default.properties.

  • The Spring Boot application exposes the REST APIs of the Flowable engines (dependency flowable-spring-boot-starter-rest).
  • The Web applications and the DemoFlowfestApplication Spring Boot application share the same DB.
  • The DemoFlowfestApplication and the REST controllers are listening on port 31080, all the web applications are on port 31081.

The Flowable admin UI client is able to access the REST APIs under localhost:31080/flowable-rest/process-api for example.

The task client lists the ‘Vacation request’ process, but when started, I get the following exception in Tomcat:

Caused by: org.flowable.common.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'vacationRequestProcessor'
        at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstIdentifier.eval(AstIdentifier.java:97) ~[flowable-engine-common-6.5.0.jar:6.5.0]
        at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstEval.eval(AstEval.java:53) ~[flowable-engine-common-6.5.0.jar:6.5.0]
        at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstNode.getValue(AstNode.java:31) ~[flowable-engine-common-6.5.0.jar:6.5.0]
        at org.flowable.common.engine.impl.de.odysseus.el.TreeValueExpression.getValue(TreeValueExpression.java:122) ~[flowable-engine-common-6.5.0.jar:6.5.0]
        at org.flowable.engine.impl.delegate.invocation.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:34) ~[flowable-engine-6.5.0.jar:6.5.0]
        ...

What’s wrong with my configuration? :thinking:

It looks like the ‘vacationRequestProcessor’ Spring bean is not visible in the task client. However, localhost:31080/actuator/beans lists the ‘vacationRequestProcessor’ along all the others. It looks like the task client is talking to itself - as I learned from Make Task UI a REST client rather than server?, the task client runs its own engines and deploys all the REST APIs again, that causes confusion to me as well :slight_smile:

Hey @phlox,

You can’t mix the flowable-task application with custom embedded applications. Especially if the custom embedded applications have custom code.

The reason why you see the ‘Vacation request’ process is because they share the same DB. However, when you try to run it it fails because the task application does not have the vacationRequestProcessor bean. If you start the process via the DemoFlowfestApplication then it will work

Hi @filiphr

thanks for your answer. I see the point why this doesn’t work, the Task client is actually running on its own engine.

What I’m trying to achieve is:

  • running the DemoFlowfestApplication as a Spring Boot application, also running the Flowable engines and exposing the REST APIs
  • using the Task client in order to launch the ‘Vacation request’ process and complete the user tasks

My goal isn’t too exotic, is it? :wink:

But how could this be achieved?

  • Would it be possible (and solve my issue) to deploy the Task client into the same Spring Boot application? That’s actually what I originally attempted to do, but I didn’t find a flowable-spring-boot-starter-webapp or similar.
  • Or vice versa, would I have to deploy the DemoFlowfestApplication somehow to the Tasks client?

Or how do other users use the Tasks client in a Spring Boot application?