StackStorm / orquestaconvert

Converts Mistral workflows into Orchestra workflows
Apache License 2.0
13 stars 7 forks source link

Don't convert local variable references in dict.where(), dict.select(), and dict.selectMany() for YAQL expressions #29

Open blag opened 4 years ago

blag commented 4 years ago

In YAQL expressions, the dict.where(), dict.select(), and dict.selectMany() methods accept a selector predicate, where the input to the predicate is $, and global variable references are not allowed in those predicates (you have to use let() to assign them to other variables). This means that any references aren't global context variable references and should not be converted to ctx() automatically.

We do a lot of "parsing" with regular expressions, so this might not be 100% possible, but it would be nice to see if we can avoid converting $ that shouldn't be converted.