ResequenceDefinition probably should not take a List<ExpressionDefinition> for
easier operation among the various DSLs (Java + XML etc) since expressions in
most languages can easily do composites
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: CAMEL-3696
URL: https://issues.apache.org/jira/browse/CAMEL-3696
Project: Camel
Issue Type: Improvement
Reporter: james strachan
An expression language is usually fairly powerful & can be used to create a
collection of expressions. (e.g. in XPath: /foo + /bar). We use expressions
extensively throughout Camel and all expressions may need to be a 'composite'
of different expressions which really is just a single Expression object.
If folks find there are times when an Expression cannot be easily created from
a composite within a language (e.g. a language that doesn't support +) then we
could always have a composite language which is a collection of expression
objects - which itself is an Expression, so that we then have consistency
across the model.
To say this another way; if one pattern takes a List<ExpressionDefinition> then
why don't they all? We might want to Resequence or Aggregate using a composite
expression etc.
So a simpler solution is just to say that an Expression is exactly that - an
arbitrary expression (which may be implemented using a concatenation of
multiple expressions) but then from the EIP model and DSL, its simply a single
Expression instance so its then easy to keep all the DSLs in sync and the model
consistent.
In the specific case of the Resequence, the expression is simply used to create
a value which can then be used to sort messages; so its an expression returning
a single object; which sounds like a single Expression to me.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira