Mule ESB 3.2 Splitter destroys Enricher results
- by Eddie
Here is the snippet of my flow:
<logger message="PRODUCT_ID = #[header:productID]" level="INFO" doc:name="Logger"/>
<splitter evaluator="jxpath" expression="//*/BisacHeaderCodes" doc:name="Splitter"/>
<logger message="PRODUCT_ID_POST_SPLITTER = #[header:productID]" level="INFO" doc:name="Logger"/>
#[header:productID] was set up prior to Logger call. I tried #[variable:productID] and got the same result.
When I run it, this is the out put I get:
INFO 2012-04-05 23:12:47,865 [[bookinista_order_management].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: PRODUCT_ID = 72
ERROR 2012-04-05 23:12:47,871 [[bookinista_order_management].connector.http.mule.default.receiver.02] org.mule.exception.DefaultSystemExceptionStrategy: Caught exception in Exception Strategy: Expression Evaluator "header" with expression "outbound:productID" returned null but a value was required.
org.mule.api.expression.RequiredValueException: Expression Evaluator "header" with expression "outbound:productID" returned null but a value was required.
So, right before Splitter, I have a perfect value in my header, and right after Splitter, that value disappears! I understand that Splitter propagates only part of payloda, but shouldn't it leave headers and variables alone?
Any ideas for a workaround?