Parsing JUEL expressions calling Spring Bean method results in "connection closed" error

I want to read the approver on the process when the process has not started yet.

bpm xml

<bpmn:multiInstanceLoopCharacteristics camunda:collection="${processUserService.getUserByNo(10380,09979)}" camunda:elementVariable="assignee">
        <bpmn:completionCondition xsi:type="bpmn:tFormalExpression">${nrOfCompletedInstances == 1}</bpmn:completionCondition>
      </bpmn:multiInstanceLoopCharacteristics>

java code

I can parse the XML using the above method and read the approver. However, after calling the method processUserService.getUserByNo(), it leads to a ‘connection closed’ error when other users call Camunda.

cmaunda version 7.15

I have solved this problem and need to add the following code

   Context.removeProcessEngineConfiguration();
   Context.removeCommandContext();

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.