Testing a simple process with a REST outbound connector

Hello,

I’m trying to test a simple process in a Camunda 8 Zeebe client Spring Boot application. The process has just a REST outbound connector task. At the startup of the test I’m getting the error:

2024-02-22T09:10:35.990+01:00 ERROR 13400 — [ zb-actors-0] io.camunda.zeebe.broker.process : Unexpected error while processing resource ‘Test_w_Camunda_API.bpmn’

java.lang.IllegalStateException: Failed to build variable mapping expression: failed to parse expression ‘{authentication:{type:“noAuth”},method:“POST”,url:“https://XXXXXXXX:8860/engine-rest/process-definition/key/XXXXXXXXXX/start",connectionTimeoutInSeconds:“20”,body:"{
“withVariablesInReturn” : “true”
}”}’: Expected (start-of-input | ifOp | forOp | quantifiedOp | disjunction):1:1, found “{authentic”

But when I’m starting the application: no issue and I can start it from the tasklist.

Are there resources to add for unit testing and process with connectors? like element template…
It is my first encounter of the Zeebe in memory engine…

BR
Pascal

Hi @lugon - can you share a screenshot of how you configured the outbound Connector, or attach your BPMN file?

Nathan,
My BPMN is quiet simple and run smoothly on my Camunda 8 SM. It is only complaining with the Zeebe in memory. The purpose was to simply check the call of Camunda 7 processes from a Camunda 8 one.

Test_w_Camunda_API.bpmn (4.8 KB)

Hi @lugon - I was able to recreate the issue with your BPMN, and it took me several minutes of reading then re-reading the task configuration before I found the problem! The payload request body needs to be a FEEL expression. Otherwise it is interpreting the body as a string rather than an object.

Nathan,

Thanks for the solution! I could start my unitary test.

But the trap is also the different behaviors between the deployed Zeebe (8.4.3) and the in-memory Zeebe (8.4.1).

BR
Pascal

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