How can I get the min value in a flow expression

Hi, I’m new in camunda, I’am envolved in a project with many processes for distinct tenants, buy all with the same delegates, looking for execute distinct complex logic with the same java code.So, the goal in this project is to have the less quantity of logic in java and try to put these logic in the bpmn diagram.

The problem I have is that in many cases I find the capacity of flow expressions too limiting. I don’t know what type of code should I use, java, juel, something else. For example, I have a variable that is an ArrayList and I am trying to get the smallest value, without success. I tried:

$ {values.min ()}
$ {values.getMin ()}
$ {Collections.min (values)}

The documentation of camunda in this regard also seems to me quite limited. Is there any more complete documentation?

I couldn’t find what is the difference between the expressions $ {} and the # {}, and I have many other questions that I cannot solve.

I would also like to know the difference between the condition types, expression and Script. What language should i use in script?