Availability of "contains" function

Hi Dear Community.

Using the Expression

<bpmn:sequenceFlow id="SequenceFlow_0sswoeg" name="Нет" sourceRef="ExclusiveGateway_0jc2dhm" targetRef="IntermediateThrowEvent_0pzludv">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!contains(operatorRoles, "gogo")}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>

I get the error

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineFactoryBean': FactoryBean threw exception on object creation; nested exception is org.camunda.bpm.engine.ProcessEngineException: ENGINE-01009 Error while parsing process. Could not resolve function 'contains'.

Could you please suggest if the function has the limited availability (version? cloud only?)? Or am I doing anything wrong (syntax?)? How could I fix it?

Thanks a lot in advance!

Hey @acechanson ,
If you want to check with an expression a certain value of a variable you can write:

${operatorRoles == "gogo"}

I hope this helps
Cheers
Nele

Thank you Nele!

Unfortunately it doesn’t work for this specific case - need to check if the value is included among others possible in the list.

Hi @acechanson,

Did you try below expression?
${operatorRoles.contains("gogo")}

1 Like

In case of not operator

${!operatorRoles.contains("gogo")}

1 Like

Hi @acechanson,

You can also use feel script as condition type with below inline script
list contains(operatorRoles, "gogo")

Kindly find attached a simplified running example
test-col-process.bpmn (5.1 KB)

1 Like