Thanks for your response, but we dont have a predefined number of properties or predefined logic to be executed.
we will evaluate some business rules and build this expression dynamically and store it in a string property .
for ex:- we have a criteria to validate a set of business rules BR1, BR2, BR3 BR4. user will select the business criteria from front end as ((BR1 and BR2) OR (BR1 and BR3)) OR BR4 ( Note:- User can change this criteria from front end. ) so we will evaluate this business rules and build the resultant criteria like ., (((true and true) OR (true and false) ) OR false) . now, we need to evalute the final boolean outcome of this.
Posted: 4 years ago
Posted: 11 Jul 2016 12:52 EDT
Mike Townsend (MikeTownsend_GCS)
Director, Software Solutions Engineering
So if I understand, you have a list of n boolean values and you basically want to determine if any of them are false, if so return false, otherwise return true? I don't know of a single method that when called would do that for you, especially while parcing a string, but you can definitely write something. If you have a true page/value list, you can use an interator to walk through it and determine if any one value is false. I'm thinking if you initialize the value to whichever you would rather return (i.e. if the list is of length 0, so you never evaluate any, would you rather return true or false?), you could build this in a couple of activity steps.
If you really need the complex logic (I'm not sure I understand how you are building that without knowing ahead of time, but okay?), then you might need to drop into Java and build something that does a lot more complex string maniupulation. Assuming there aren't any available libraries that do the work for you that you might want to make use of.