Failed to evaluate expression

I am launching a process instance with variable defined as:

Map<String, Object> variables = Map.of( “transportationId”, “ship123”, “operationType”, “loading” );

In BPMN, I have a decision gateway as:

<bpmn:sequenceFlow id="Flow_SplitToShip" name="Ship Transport" sourceRef="Gateway_TransportType" targetRef="SubProcess_ShipOps"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"> = transportationId.startsWith("ship") </bpmn:conditionExpression> </bpmn:sequenceFlow>

It basically checks that variable transportationId starts with 'ship'.

But I get error on operate ui:

failed to evaluate expression ’ transportationId.startsWith(“ship”)': Expected context but found ‘“ship123”’ The evaluation reported the following warnings:

[INVALID_TYPE] Expected context but found ‘“ship123”’.

What mistake am I making here?

Hi @mghildiy

The FEEL condition should be written as follows

= starts with(transportationId, "ship")

https://docs.camunda.io/docs/components/modeler/feel/builtin-functions/feel-built-in-functions-string/#starts-withstring-match

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