« Return to Thread: Proposed enhancement to the ExpressionEvaluators

Proposed enhancement to the ExpressionEvaluators

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View in Thread

The current expression evaluators framework is great, but we could push it even further. We're _almost_ at a point where dynamic properties of the endpoints are possible, so e.g. things like this would work:

<file:outbound-endpoint path="#[mule:workingDir]/out" outputPattern="#[foo:dummy]-#[function:count]"/>

However, I faced the limitation of the current evaluator - expressions can't be nested inside a literal string. So, given the #[mule:workingDir]/out expression, the evaluator would get confused, as it expects _only_ #[mule:workingDir]. Just to have another angel, consider a headers evaluator, like #[header:X-Forward]-QA to be added to the http traffic. Still not possible.

So the proposal is to enhance the evaluators to allow such nested exceptions and encapsulate this logic in it. The next natural step would be to allow multiple evaluations in a single expression, for now this is not consistent and scattered throughout the code (e.g. "#[foo:bar]-#[mule:serverId]-data").

Andrew

 « Return to Thread: Proposed enhancement to the ExpressionEvaluators