Having a JEXL expression, How can I parse it in order to dynamically add to JEXL context all the involved variables?
Example : Initial Expression:
Initial Expression = $VAR1 + $VAR2
VAR1 and VAR2 are other expressions
$VAR1 = 123 + 45
$VAR2 = 67 + 89
Even more VAR1 can have another depth level :
$VAR1 = 123 + 45 + $VAR3
So, before evaluate Initial expression , I need to add into the context VAR1 and VAR2 and VAR3, How can I do it in a dynamic way?
It is possible to use a JEXL parser? Or by catching the JEXL exception? Can you provide an example?
Regards