ENGINE-16004 Exception while closing command context: Unable to evaluate script:

Hi All,

We are using connectors (we kept Asynchronous before on connectors) in our project and in the execution time when it tried to connect external component with the connector it got below exception instead of proper response (able to send the request but in response got below exception).

<soap:Envelope xmlns:so
ap=“http://schemas.xmlsoap.org/soap/envelope/”>soap:Bodysoap:Faultsoap:ServerException</soap:Fault></so
ap:Body></soap:Envelope>

After getting this exception response to camunda that particular instance went into failure with below error message (in logs).

INFO 2023-09-01 07:56:31.553 [camundaTaskExecutor-5215] com.bt.hqn.bpm.pom.common.LoggerUtil -
Start
INFO 2023-09-01 07:56:31.553 [camundaTaskExecutor-5215] com.bt.hqn.bpm.pom.common.LoggerUtil -
Http ResponseDetails
INFO 2023-09-01 07:56:31.553 [camundaTaskExecutor-5215] com.bt.hqn.bpm.pom.common.LoggerUtil -
statusCode : 500
INFO 2023-09-01 07:56:31.553 [camundaTaskExecutor-5215] com.bt.hqn.bpm.pom.common.LoggerUtil -
headers : [Transfer-Encoding:chunked, Connection:close, Date:Fri, 01 Sep 2023 06:56:31 GMT, Content-Type:text/xml;charset=UT
F-8]
INFO 2023-09-01 07:56:31.553 [camundaTaskExecutor-5215] com.bt.hqn.bpm.pom.common.LoggerUtil -
response : <soap:Envelope xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”>soap:Bodysoap:Faultsoap:Serv
erException</soap:Fault></soap:Body></soap:Envelope>
INFO 2023-09-01 07:56:31.553 [camundaTaskExecutor-5215] com.bt.hqn.bpm.pom.common.LoggerUtil -
parentScope : ProcessInstance[d598617a-2f95-11ee-95d7-005056ba3a6a]
ERROR 2023-09-01 07:56:31.555 [camundaTaskExecutor-5215] org.camunda.bpm.engine.context -
ENGINE-16004 Exception while closing command context: Unable to evaluate script: java.lang.Exception: <soap:Envelope xmlns:so
ap=“http://schemas.xmlsoap.org/soap/envelope/”>soap:Bodysoap:Faultsoap:ServerException</soap:Fault></so
ap:Body></soap:Envelope>
org.camunda.bpm.engine.ScriptEvaluationException: Unable to evaluate script: java.lang.Exception: <soap:Envelope xmlns:soap=“http://schemas.xmlsoap.org/soap/
envelope/”>soap:Bodysoap:Faultsoap:ServerException</soap:Fault></soap:Body></soap:Envelope>
at org.camunda.bpm.engine.impl.scripting.CompiledExecutableScript.evaluate(CompiledExecutableScript.java:61)
at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluate(SourceExecutableScript.java:61)

Now after this exception it is fetching and executing the connector activity with other same BPMN process instances details even those instances are waiting in different locations (for same process other active instances this connector activity is getting executed).

If we get this failure only the respective instance should go into failure and it should not execute with other active instances details, is this could be because of any configuration issue at this connector, please help me on this. Thank you.

Below are the configurations done for camunda connector activity (when it failed with above error message it executed with other active instances details also):

Found details in this document like below : Advanced Asynchronous Continuations in camunda BPM | Camunda

  • Async also comes in handy if you have longer-running computations and do not want to block the calling thread (eg. HTTP Thread) but instead want to delegate the heavy lifting to a background thread.

so if we don’t want to run other background threads then for this connector we should not keep Asynchronous Before for this connector activity.

Please help us on this issue. Thank you in advance.

Thanks,
Venkaiah.