Hi,
I tried to use decision tables in my simple workflow, but I faced some issues. I created a basic workflow with a decision task, which is linked to a decision table.
When I validate the model it returns with the message “No decision table reference key is defined…”, but as I read it on this forum, that’s fine.
Then I deployed the workflow, it went OK.
But when I tried to use it, I got a NullPointerException.
The relevant stacktrace can be found below.
Since I don’t initiate the workflow via the official Flowable API, but through a custom Spring application I wrote, I might have configured something incorrectly.
The application is deployed to a tomcat, v9.0.2, it uses Spring boot 2.0.3.RELEASE
The Flowable dependency is imported like that (so all the libraries should be on the classpath):
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter</artifactId>
<version>6.3.1</version>
</dependency>
As you can see below the exception is thrown in line DmnActivityBehavior.java:99
, where the ruleService
is null. That’s because the CommandContextUtil.java:267
returns with null, which is this line:
return (DmnEngineConfigurationApi) commandContext.getEngineConfigurations().get(EngineConfigurationConstants.KEY_DMN_ENGINE_CONFIG);
The commandContext.getEngineConfigurations()
has only 3 configurations:
0 = {HashMap$Node@20712} "cfg.formEngine" ->
1 = {HashMap$Node@20713} "cfg.processEngine" ->
2 = {HashMap$Node@20714} "cfg.idmEngine" ->
For some reason the cfg.dmnEngine
is not there.
Does anybody know what am I doing wrong?
Edit: If I take out the decision table, then the process initiation works just fine.
The exception:
java.lang.NullPointerException: null
at org.flowable.engine.impl.bpmn.behavior.DmnActivityBehavior.execute(DmnActivityBehavior.java:99) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeActivityBehavior(ContinueProcessOperation.java:258) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeSynchronous(ContinueProcessOperation.java:155) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.continueThroughFlowNode(ContinueProcessOperation.java:112) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.continueThroughSequenceFlow(ContinueProcessOperation.java:305) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.run(ContinueProcessOperation.java:78) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:88) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:72) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:56) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:25) ~[flowable-engine-6.3.1.jar:6.3.1]
at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.3.1.jar:6.3.1]
at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:71) ~[flowable-engine-common-6.3.1.jar:6.3.1]
at org.flowable.idm.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:49) ~[flowable-idm-spring-6.3.1.jar:6.3.1]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.0.7.RELEASE.jar:5.0.7.RELEASE]
at org.flowable.idm.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:46) ~[flowable-idm-spring-6.3.1.jar:6.3.1]
at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) ~[flowable-engine-common-6.3.1.jar:6.3.1]
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) ~[flowable-engine-common-6.3.1.jar:6.3.1]
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51) ~[flowable-engine-common-6.3.1.jar:6.3.1]
at org.flowable.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:208) ~[flowable-engine-6.3.1.jar:6.3.1]