Gateway Expression for a collection of values

Hi, i have built a job where

  1. In the first form, the user insert a collection of data
  • Name (text)
  • Last Name (Text)
  • Flag field (boolean)
  1. i would like to insert a gateway after the first step, where the condition should check if all of the flag field that belong to the collection have “true” value or not.

I tried something like that as expression for gateway:

myprocessvariablename.mycomplexfieldname.mybooleanfieldname == true

but it does not work…

I think you have to explicitly read the data from the BDM in script via DAO and then return the value true or false to the condition. Use the pencil on the condition and select script to write the necessary code to get the BDM.

regards
Seán

PS: While this may not be the complete answer you’re hoping for, it does indicate a possible solution, please mark as resolved.

unfortunally it does not work, and i can see lot of errors sin the script :frowning:

Do u have some code as starting point?

Really? :wink:

  • you have your gateway with two lines.
  • One must be set as default
  • for the other line Use Expression
  • Click the pencil and select script

add the following (you must find your own BDM):

import com.company.model.exempleDmande;

exempleDmande tf = exempleDmandeDAO.findByPersistenceId(0);

if(tf.getSolde() == true){
return true
}
else{
return false
}

NOT Tested so not totally sure it will work, post back your solution if you find it is different.

regards
Seán

  1. please don’t add an answer as a comment, it screws thing up.
  2. there are lots of errors? what are they? Why didn’t you say what they were?
  3. it works on my system…what errors are you getting…