Few tasks in CMMN stage doesn't open, With Flowable 6.4.1 spring-boot container

I have a large CMMN case model, in which the stage gets activated but on random basis few of the tasks doesn’t get activated.

Editing the same variable from admin app, makes the task activated.

Please find the Engine attached Debug logs. If you notice below, ZCM Global Underwitting task is not moving from available state to start state where asd List task is being moved.

2021-10-27 11:14:33.108 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.DefaultCmmnEngineAgenda [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Planned [Change PlanItem state] List (id: planItem649), new state: [available] with transition [create]

2021-10-27 11:14:33.108 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.DefaultCmmnEngineAgenda [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Planned [Change PlanItem state] ZCM Global Underwitting (id: planItem650), new state: [available] with transition [create]


2021-10-27 11:14:33.132 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Executing agenda operation [Change PlanItem state] List (id: planItem649), new state: [available] with transition [create]

2021-10-27 11:14:33.132 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.DefaultCmmnEngineAgenda [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Planned [Evaluate Criteria] case instance e33d8023-3707-11ec-9e59-024213cb0268 with transition 'create' having fired for plan item planItem649 (List)

2021-10-27 11:14:33.132 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Executing agenda operation [Change PlanItem state] ZCM Global Underwitting (id: planItem650), new state: [available] with transition [create]

2021-10-27 11:14:33.132 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.DefaultCmmnEngineAgenda [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Planned [Evaluate Criteria] case instance e33d8023-3707-11ec-9e59-024213cb0268 with transition 'create' having fired for plan item planItem650 (ZCM Global Underwitting)




2021-10-27 11:14:33.192 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.DefaultCmmnEngineAgenda [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Planned [Activate PlanItem] List (planItem649) via entry criterion zcmlistentry




2021-10-27 11:14:33.206 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Executing agenda operation [Activate PlanItem] Loan Summary (planItem524) via entry criterion sid-E0D020F2-3085-468F-82E8-A69BFA5182B1



2021-10-27 11:14:33.208 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Executing agenda operation [Activate PlanItem] List (planItem649) via entry criterion zcmlistentry


2021-10-27 11:14:33.208 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.DefaultCmmnEngineAgenda [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Planned [Change PlanItem state] List (id: planItem649), new state: [active] with transition [start]


2021-10-27 11:14:33.215 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Executing agenda operation [Change PlanItem state] List (id: planItem649), new state: [active] with transition [start]
2021-10-27 11:14:33.215 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.DefaultCmmnEngineAgenda [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Planned [Evaluate Criteria] case instance e33d8023-3707-11ec-9e59-024213cb0268 with transition 'start' having fired for plan item planItem649 (List)



2021-10-27 11:14:45.557 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Executing agenda operation [Evaluate Criteria] case instance e33d8023-3707-11ec-9e59-024213cb0268 with transition 'create' having fired for plan item planItem649 (List)


2021-10-27 11:14:45.599 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Executing agenda operation [Evaluate Criteria] case instance e33d8023-3707-11ec-9e59-024213cb0268 with transition 'create' having fired for plan item planItem650 (ZCM Global Underwitting)


2021-10-27 11:14:46.679 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [7e57f015-974b-4fad-aac4-f2ebc9afcc8e] [] [abc@bbc.com] [] [] []: Executing agenda operation [Evaluate Criteria] case instance e33d8023-3707-11ec-9e59-024213cb0268 with transition 'start' having fired for plan item planItem649 (List)

Further Debugging:

On further debugging,

When i edit variable from same spring-boot controller through CMMN runtime service, its not working, where editing same through admin app, its working as expected.

Can it be possible that spring-boot transaction getting hanged or may mey getting blocked to execute runnable?

Adding further logs

2021-10-29 13:18:57.266  INFO ip-172-31-20-191 com.kuliza.lending.wf_implementation.services.LeadGenerationService [ba69dce1-c599-4211-ac2b-2fd6dde012df] [] [abc.bbc.com] [] [30cb1176-38a0-11ec-9a74-02425740459c] [ApiResponse CMMNService.submitOrGetCaseVariables(String,String,Map,String,String)]: -------- Inside /get-lead-variables API --------- 
 {"caseInstanceId":"30cb1176-38a0-11ec-9a74-02425740459c","processInstanceId":"","varName":"ZCMStatus","varValue":"underwriting","operation":"update-var"} 
2021-10-29 13:18:57.268 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [ba69dce1-c599-4211-ac2b-2fd6dde012df] [] [abc.bbc.com] [] [30cb1176-38a0-11ec-9a74-02425740459c] [ApiResponse CMMNService.submitOrGetCaseVariables(String,String,Map,String,String)]: Executing agenda operation org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker$1@7cf1a161 with command org.flowable.cmmn.engine.impl.cmd.GetVariablesCmd@11069c5d
2021-10-29 13:18:57.280 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [ba69dce1-c599-4211-ac2b-2fd6dde012df] [] [abc.bbc.com] [] [30cb1176-38a0-11ec-9a74-02425740459c] [ApiResponse CMMNService.submitOrGetCaseVariables(String,String,Map,String,String)]: Executing agenda operation org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker$1@6c9b5a36 with command org.flowable.cmmn.engine.impl.cmd.SetVariableCmd@60c30895
2021-10-29 13:18:57.302 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.DefaultCmmnEngineAgenda [ba69dce1-c599-4211-ac2b-2fd6dde012df] [] [abc.bbc.com] [] [30cb1176-38a0-11ec-9a74-02425740459c] [ApiResponse CMMNService.submitOrGetCaseVariables(String,String,Map,String,String)]: Planned [Evaluate Criteria] case instance 30cb1176-38a0-11ec-9a74-02425740459c
2021-10-29 13:18:57.302 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [ba69dce1-c599-4211-ac2b-2fd6dde012df] [] [abc.bbc.com] [] [30cb1176-38a0-11ec-9a74-02425740459c] [ApiResponse CMMNService.submitOrGetCaseVariables(String,String,Map,String,String)]: Executing agenda operation [Evaluate Criteria] case instance 30cb1176-38a0-11ec-9a74-02425740459c with command org.flowable.cmmn.engine.impl.cmd.SetVariableCmd@60c30895
2021-10-29 13:18:57.387 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [] [] [] [] [] []: Executing agenda operation org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker$1@3d7377cf with command org.flowable.job.service.impl.cmd.AcquireJobsCmd@60e13663
2021-10-29 13:18:57.447 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.DefaultCmmnEngineAgenda [ba69dce1-c599-4211-ac2b-2fd6dde012df] [] [abc.bbc.com] [] [30cb1176-38a0-11ec-9a74-02425740459c] [ApiResponse CMMNService.submitOrGetCaseVariables(String,String,Map,String,String)]: Planned [Evaluate Criteria] case instance 30cb1176-38a0-11ec-9a74-02425740459c
2021-10-29 13:18:57.447 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker [ba69dce1-c599-4211-ac2b-2fd6dde012df] [] [abc.bbc.com] [] [30cb1176-38a0-11ec-9a74-02425740459c] [ApiResponse CMMNService.submitOrGetCaseVariables(String,String,Map,String,String)]: Executing agenda operation [Evaluate Criteria] case instance 30cb1176-38a0-11ec-9a74-02425740459c with command org.flowable.cmmn.engine.impl.cmd.SetVariableCmd@60c30895

Further updates here: Seems like spring boot expression validations is causing some issue

2021-10-29 18:23:46.541 DEBUG ip-172-31-20-191 org.flowable.cmmn.engine.impl.agenda.operation.EvaluateCriteriaOperation [89c3999c-9f39-43b1-bb96-0a975b14cc3c] [] [] [] [] []: Elevating sentry with id sentry1329 with result as ="history")} for variable value underwriting

If you notice above expression returned a non boolean value.

Here is my sentry condition

${(var:get(ZCMStatus)==“underwriting”) || (var:get(ZCMStatus)==“pdBucket”) || (var:get(ZCMStatus)==“propertyVisit”) || (var:get(ZCMStatus)==“recommendation”) || || (var:get(ZCMStatus)==“history”)}

What is surprising is, this conditions sometime works through spring-boot container application and always works when I update variable through rest api/admin application.

@joram : After further investigation, I found out that the issue is actually converting XML to CMMN model.

I have verified XML(Case model) which is fine with proper Sentry condition but while reading parser only reading partial data.

After further study I found this link java - XmlStreamReader not reading complete text value - Stack Overflow

So after setting **javax.xml.stream.isCoalescing= true**, everything worked as expected.

should’nt evaluateSentryIfPart method, thrown an exception, when expression result is of type other then Boolean?

Wow, that’s quite special that was the solution. That was not a direction I would go looking at first.

Currently, the evaluateSentryIfPart logs a debug message: flowable-engine/AbstractEvaluationCriteriaOperation.java at main · flowable/flowable-engine · GitHub

So it’s weird you didn’t have that log line in your logging.

Changing that logic now would be a big backwards incompatible change and might break existing installations, so not something we can or should do.