Hi,
i’m trying to create a bpmn:conditionExpression with contains/includes expression, for example
<bpmn:conditionExpression xsi:type=“bpmn:tFormalExpression”>${(persons.includes(person))}</bpmn:conditionExpression>
is it possible to create such a condition?
Hi @Elia_Rohana,
It really depends how and where you use expressions. If you’re using the Spring Framework, you can check this docs page. You can also have a look at this docs page to get a better understanding of how Camunda uses expressions.
Otherwise, can you provide more context to your problem? Ex. what is your setup/environment, how is the persons
entity created, etc.
Best,
Nikola
Hi,
we are developing kind of tree decision applicaiton using BPMN, the user builds the bpmn process(tree) dynamically and create a condition using a componenet we developed in our company, then we translate it into a bpmn expression.
thus all our expression are part of the xml, and are using process variables (e.g. persons is a process variables)
till now we used simple condition, something like
whenwe had only on person as process variable, it was working ok with the following:
<sequenceFlow>
<conditionExpression xsi:type="tFormalExpression">
${person.age > '50'}
</conditionExpression>
</sequenceFlow>
but for more complicated expression i couldn’t find any reference on what are the capabilities of the expression language. it would be helpful if you give me some guide on what i can i acheive using the expression language.
so when i say i want to create an expression of persons.search(criteria)
where persons is a proces variable, and criteria
is created by the user, e.g. person.age > 50 and gender == male, i don’t see how i’m able to do it.
does that provide my context to the problem ?
Hi @Elia_Rohana,
at the top of this page https://docs.camunda.org/manual/7.10/user-guide/process-engine/expression-language/#usage-of-expression-language you can find some links to external references about the specification, examples and the implementaion of JUEL embedded in the Camunda engine.
I always find it helpful to create a JUnit test to get immediate feedback about the evaluation: https://docs.camunda.org/manual/7.10/user-guide/process-engine/process-instance-modification/#process-instance-modification-in-junit-tests
Hope this helps, Ingo