Skip to Content
author's profile photo Former Member
Former Member

How to set file name from attachment data (payload swap bean)

Hi Experts,

I have a scenario from SOAP proxy to SFTP with attchment. I have used payloadswapbean to consider attachment as main payload.

I can able to successfully send the attachment to Target system. Where as my requirement is, I need to set file name by using 2 fields of data(Country code and payment type) from that attachment.

There is no mapping involved in this. Proxy will trigger only sample data(I wont use this data at all) but attachment is the actual content which I will send to client.

As per my knowledge we can use UDF to set dynamic file name, but I don't know how can I apply in my scenario.

Please suggest me on this.

Thanks,

Gayathri.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 16, 2015 at 11:01 AM

    Hi All,

    Can anyone please respond to this thread.

    Thanks,

    Gayathri.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 16, 2015 at 11:18 AM

    HI Gayathri,

    If you don't have ESR development you should try to avoid to create a UDF. Check this thread

    If your message payload has the name of the file or you can construct the file name with that information, you can use variable substitution to do it.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Gayathri,

      The file should be parsed in PI, only then the value from the attachment can be read and set for the file name. You would have to introduce mapping to achieve the desired file name.

      You can follow threads suggested by Inaki for reading the data from attachment and create file name.

      --

      Sendhil

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.