2 Replies Latest reply on Sep 24, 2014 5:08 AM by Dennis Bohnstedt Hansen

    Resolving Composite Properties in Camel Bean

    Dennis Bohnstedt Hansen Newbie

      Hi

       

      Im having issues with resolving Composite Properties in a bean called from a flow in a Camel Component. If i resolve the property in the flow itself, using this node:

       

      <log message="My property: ${properties:messagelog.flow.name}" />


      Everything works fine. But when i call a bean from a Camel flow using the bean component ( <simple>${bean:MyBean.resolveMyProperty}</simple> ), i can't locate the property anywhere in either Message, Exchange or CamelContext. I've tried several approaches:


      exchange.getContext().getProperties().get("messagelog.flow.name");

      exchange.getContext().resolvePropertyPlaceholders("messagelog.flow.name");

      exchange.getIn().getHeader("messagelog.flow.name");

       

      ... And so on, but the property is nowhere to be found. How do i get to my property? :-)

       

      On a side note, what i really wanted to do, was get some way to get to the composites name (sca:composite name="My Composite Name"...), but haven't found any way to get to that. Is that possible?


      Regards

      Dennis