Syntax list FEEL

Hi,

I’m using the scala feel plugin and I’m wondering what syntax is used to describe a list/array im getting from an application? What expression do I use, something other than FEEL is also appreciated, in the output so I can use the information in my process?

kind regards,

T

Hi @kingspallett,

in FEEL, a list can be expressed as [1,2,3] .
See the documentation: https://camunda.github.io/feel-scala/feel-data-types

Best regards,
Philipp

@Philipp_Ossler Thanks for your reply, I read the page and also the Camunda documentation but syntax isn’t my strongest suit. I’ve got an array of addresses which I want to acces and also apply some conditions on an exclusive gateway. What representation do I use? I tried using addresses [1] et cetera but it didn’t work.

Example: I want to find some addresses but I don’t know how many will get returned to my process. If I have 2 I’d like to go one way in the process. If I have 0 or more than than 2 I’d like to go the other way. Have you got a decent FEEL expression for me? Or JUEL.

kind regards,

K

I’m sorry but I don’t understand your example. Do you want to use the FEEL expression in a decision table or on a gateway?

Please share your example (i.e. the BPMN) including some demo data.

Hi, I attached an example, does addressexample.bpmn (5.8 KB)
this clarify the situation?

Ok, the expression is on the gateway. To check if the array contains exactly one entry, you can use the expression:

count(myArray) = 1

Does this help you?

Excellent, yes this helped. Maybe you could help me out with another question related to the topic. I’m trying to acces a specific part of the address array.

Example: Suppose I have a different process which returns an array of two addresses. How do I use the data of the first address that is returned? addresses.adress (1) or something similar? Thanks for any help you can provide.

Kind regards,

K

Never mind, managed to do it, thanks a lot for your help and the plugin!

2 Likes