Inbound Connector Starts Process Instance Successfully but Variables Don’t Appear in Operate

Hi team,
I am building a custom inbound connector using the Connector SDK (8.8.x).
The connector receives an external event, converts it into a POJO (Event object), and triggers:

CorrelationResult result = connectorContext.correlateWithResult(event);

The process instance successfully starts in Camunda 8 SaaS.
The connector runtime logs confirm this:

Received message, correlating with Camunda. body=…, headers=…
Created a process instance with key 225179982…

Everything works except one issue:

:red_exclamation_mark:No variables appear in Operate, even though mapping is configured.

What I have tried

1. Created a clean Element Template

The template adds these properties on the Start Event:

<zeebe:property
name=“inbound.variableMapping”
value=“={ body: event.body, headers: event.headers }” />

This produces BPMN like:

<bpmn:startEvent id=“StartEvent_1” …>
<bpmn:extensionElements>
<zeebe:properties>
<zeebe:property name=“inbound.type” value=“com.example:custom-inbound:1”/>
<zeebe:property name=“inbound.variableMapping” value=“={ body: event.body, headers: event.headers }”/>
</zeebe:properties>
</bpmn:extensionElements>
</bpmn:startEvent>

The mapping looks correct and matches the webhook inbound example.

2. Validated that the inbound event object is correct

Before calling correlate, I log:

LOG.info(“Event BEFORE correlation: body=‘{}’, headers={}”,
event.getBody(), event.getHeaders());

Log output shows the fields perfectly:

Event BEFORE correlation: body=‘This is test’,
headers={MessageType=, MessageID=ID:…, Destination=queue://TEST.QUEUE}

So the event object has the correct content.

3. Tried multiple mapping options

Tried mapping through variableMapping

<zeebe:property name=“inbound.variableMapping”
value=“={ body: event.body, headers: event.headers }”/>

Tried mapping through resultExpression:

<zeebe:property name=“inbound.resultExpression”
value=“={ body: event.body, headers: event.headers }”/>

Tried ultra-simple constant mapping:

<zeebe:property name=“inbound.variableMapping”
value=“={ testVar: “hello” }”/>

Tried bypassing FEEL entirely by sending a Map<String,Object>:

Map<String, Object> payload = Map.of(
“body”, event.getBody(),
“headers”, event.getHeaders()
);

CorrelationResult result = connectorContext.correlateWithResult(payload);

→ Instance still starts
→ Still 0 variables in Operate

4. Tried updating the runtime version

Tested with:

  • camunda/connectors-bundle:8.7.9

  • camunda/connectors-bundle:8.8.2

Same behavior in both.

What IS working

  • Connector runtime starts properly

  • It discovers and activates the inbound connector

  • It listens to incoming events

  • It triggers the correct Start Event

  • Process instance is created in SaaS

  • Event object contains all fields correctly

  • No correlation errors

  • No FEEL evaluation errors in logs

  • Just no variables in Operate

:red_question_mark: Question:

Is there a known change or requirement in connectors-bundle 8.7.x / 8.8.x regarding:

  • Which property the inbound connector should use (inbound.variableMapping, inbound.resultExpression, something else)?

  • How the inbound event object is exposed to FEEL?

  • Whether correlateWithResult(event) is still expected to produce process variables?

  • Whether a special interface / wrapper is required for custom inbound events?

Right now the connector starts the process instance correctly, but variables never show up, regardless of mapping configuration.

Any guidance on the correct way to pass variables from a custom inbound connector into the process instance (for 8.8.x) would be greatly appreciated.

Best Regards,

Jignesh Pithava

Hi @pithvajignesh I’m here to help!

You’re using the variableMapping property; it has been deprecated for a while and will no longer work. You need to use the resultExpression and/or resultVariable properties. For example, this is what it looks like in our element templates: RabbitMQ connector template

Side note: I recommend using the element template generator tool for custom connectors - this way you will always get a compliant element template based on your Java code. You can find plenty of examples among our connector implementations, e.g., here’s how it is configured for the RabbitMQ connector. To use it, you need to annotate your executable, possibly your input class model too, and add the corresponding plugin to your pom.xml.

Back to your question. You’ve already tried to do that by setting resultExpression to:

={ body: event.body, headers: event.headers }

Note that event is not a valid keyword you can use in your expression. The object you pass while calling correlateWithResult will be used as context for the result expression, and you should be able to access its fields directly like this:

={ body: body, headers: headers }

You can use the resultVariable property - it works like this: you provide a variable name, and your whole output payload is stored in that variable. More on result variable and expression here.

If you want to access your payload fields with an event prefix, your connector result must be additionally wrapped:

public record ConnectorResult(Event event) // this gets passed to correlate()

Also please note that correlateWithResult is a deprecated method, and it has been replaced with a new correlate method in 8.8.

To reiterate, here are my suggestions:

  1. Use resultVariable and/or resultExpression, not the deprecated variableMapping
  2. Reference your payload fields in the resultExpression directly, unless additionally wrapped
  3. Avoid using deprecated correlation API.
  4. Optional: Use the element template generator, if possible

Let me know if that worked or if you have any further questions!

1 Like

This worked :clap: Thank you very much @chillleader for the support and excellent guidance :slight_smile: :folded_hands:

1 Like

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