« Return to Thread: Use a message property in an endpoint

Re: Use a message property in an endpoint

by Daniel Feist :: Rate this Message:

Reply to Author | View in Thread

Hi,

I have a feeling this won't work because I don't think you can use  
expressions with header in here because the file hasn't yet been read  
from the file system so there is no message yet.

You will need to pick up all the files using the file inbound endpoint  
and then use a selective consumer router with a message property or  
expression filter or similar to only continue processing the ones you  
are interest in.

Dan

On Sep 30, 2008, at 8:56 AM, Travis Carlson wrote:

> Yes, this is supported in Mule 2.x.  I believe the syntax would be as
> follows, search the documentation for expression evaluators.
>
> <inbound>
>   <file:inbound-endpoint path="${header:path}">
>      <file:filename-wildcard-filter pattern="${header:fileName}"/>
>   </file:inbound-endpoint>
> </inbound>
>
> Travis
>
> On Sat, 2008-09-27 at 20:56 -0400, Jamie Johnson wrote:
>> That works great if I know the file names before hand, but the file
>> name is actually in the header of the msg so i would need something
>> like
>>
>> <inbound>
>>  <file:inbound-endpoint path="${message/path}">
>>     <file:filename-wildcard-filter pattern="${message/fileName"/>
>>  </file:inbound-endpoint>
>> </inbound>
>>
>> is this supported in Mule?
>>
>> On Sat, Sep 27, 2008 at 12:25 PM, Jackie Wheeler
>> <jackie.wheeler@...> wrote:
>>
>>        You use the <filename-wildcard-filter> on the inbound endpoint
>>        to filter the
>>        files you want to process by their file name.
>>
>>        For example:
>>        <inbound>
>>          <file:inbound-endpoint path="C:/blah/">
>>                <file:filename-wildcard-filter pattern="test.txt" />
>>          </file:inbound-endpoint>
>>        </inbound>
>>
>>        This filter is described on the File Transport page. You can
>>        also search
>>        this forum for "filename-wildcard-filter" to see some other
>>        examples users
>>        have posted.
>>
>>        Cheers,
>>        Jackie
>>
>>
>>        That looks like it would support what I am talking about for
>>        the
>>        outputPattern but I do not see something similar for the
>>        readFromDirectory.
>>        But even if there was something for the readFromDirectory I
>>        don't see any
>>        way to say from a message with this property (file name=c:
>>        \blah\test.txt)
>>        read this file.  Am I missing it?
>>
>>
>>        --
>>        View this message in context:
>>        http://www.nabble.com/Use-a-message-property-in-an-endpoint-tp19698869p19704159.html
>>
>>        Sent from the Mule - User mailing list archive at Nabble.com.
>>
>>
>>        
>> ---------------------------------------------------------------------
>>        To unsubscribe from this list, please visit:
>>
>>           http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Use a message property in an endpoint