# Failed to evaluate expression

**URL:** <https://forum.camunda.io/t/failed-to-evaluate-expression/65178>\
**Category:** Camunda 8 Topics\
**Tags:** dmn-engine-feel\
**Created:** [October 13, 2025, 4:12am UTC](https://forum.camunda.io/t/failed-to-evaluate-expression/65178 "2025-10-13T04:12:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mghildiy](https://forum.camunda.io/user_avatar/forum.camunda.io/mghildiy/32/31691_2.png) [@mghildiy](https://forum.camunda.io/u/mghildiy)\
**Post date:** [October 13, 2025, 4:12am UTC](https://forum.camunda.io/t/failed-to-evaluate-expression/65178/1 "2025-10-13T04:12:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hassang](https://forum.camunda.io/user_avatar/forum.camunda.io/hassang/32/16498_2.png) [@hassang](https://forum.camunda.io/u/hassang)\
**Post date:** [October 13, 2025, 5:01am UTC](https://forum.camunda.io/t/failed-to-evaluate-expression/65178/2 "2025-10-13T05:01:46Z")

</div>

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](https://docs.camunda.io/docs/components/modeler/feel/builtin-functions/feel-built-in-functions-string/#starts-withstring-match)

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [October 20, 2025, 5:02am UTC](https://forum.camunda.io/t/failed-to-evaluate-expression/65178/3 "2025-10-20T05:02:07Z")

</div>

Closed on October 20, 2025, 5:02am UTC

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