I am looking for a method to create a complex Task query using a combination of and/or statements. I realize the REST API cannot support this, so I am looking to do this in a groovy script. The criteria will involve different processvariables at runtime, with a varying number of criteria.
Could you please describe more specifically what you mean? All the methods you called in a chain are just normal java methods which of cause can be called via java reflection. Hence I don’t quite understand what’s your problem.
Thank you, fml2. I am probably revealing my inexperience with java reflection. I am researching a solution and will post the answer here. I think I have the answer for dynamically creating the chain via invoke.
Thanks aravndhrs. I am looking for a solution using the java methods since the REST API does not support the combination of And an Or conditions. I am dealing with large result-sets and manipulating the arrays in code would be slow.
It turned out that no reflection was necessary and groovy allows chaining methods within a loop. In this case Tasks are selected for a User based on processvariables. Users are ‘allowed’ to work on Tasks for which the processvariables match one of the users approved list.