Closed piacenti closed 6 months ago
The syntax that you're attempting to use is indeed not supported, but you can achieve exactly the same result with a single oopath expression like for example
$var: /a/b/c/d[ $middle : this ]/e/f/g/h[type == "XYZ", $cov: cov]
I have a deep model to work with that can be considered static for navigation and I can do some of the checks I need through OOPath $var: /a/b/c/d/e/f/g/h[type == "XYZ", $cov: cov] I would like to bind to one of the elements along the way like this $middle: /a/b/c/d $var: $middle/e/f/g/h[type == "XYZ", $cov: cov]
However, it appears that DRL doesn't support the OOPath navigation from a variable and that instead you need to use the
from
keyword while using dot navigation from bound variables. This path would require many manual from iterations which seem rather painful and breaks the flow. I know deep models like this are not generally what seems to be recommended but I'm working on a migration from a previous solution while minimizing logic or model changes. I also know that Drools rewrites the/
separated expressions into "from" statements anyways so wondering why wouldn't it also handle the same when navigating from a bound variable.