4 Replies Latest reply: May 16, 2013 1:27 PM by JuniorLopes RSS

    Bpel 11g File Adapter Get File Name

    JuniorLopes
      Hi,

      I am using Soa Suite 11g 11.1.1.1.5. So my code have a BPEL 2.0 and a File Adapter.
      the problem is, i want to get the file name generated automatically. i do not want to set the name just get the name.

      I have already tried to get the proprieties of invoke jca.File.FileName and nothing happens.

      Tks
        • 1. Re: Bpel 11g File Adapter Get File Name
          BK574
          1. Do you want to read the file name from a location with out giving exact file name?

          If so please go to the .jca file of file adapter and include the following property

          <property name="IncludeFiles" value=''*.*''/>

          2. If you want to pass the file name dynamically to file adapter, choose listfiles operation from File adapter.

          and include the following property inside your invoke activity

          <bpelx:toProperty name="jca.file.FileName"
          variable="FileName"/> where filename will be passed dynamically to file adapter.

          Hope, this helps you.

          Edited by: BK574 on May 15, 2013 2:14 PM

          Edited by: BK574 on May 15, 2013 2:14 PM

          Edited by: BK574 on May 15, 2013 2:15 PM

          Edited by: BK574 on May 15, 2013 2:15 PM
          • 2. Re: Bpel 11g File Adapter Get File Name
            JuniorLopes
            I am using File Adapter to Write a file.
            So i can not get the file name generated automatically.

            how can i get this file name ?
            • 3. Re: Bpel 11g File Adapter Get File Name
              veejai24
              Here is an example with file adapter and bpel 2.0

              http://yuanmengblog.blogspot.co.uk/2012/09/file-and-ftp-adatper.html

              Thanks,
              Vijay
              • 4. Re: Bpel 11g File Adapter Get File Name
                JuniorLopes
                I did a workaround.

                i set the filename in the propriety of invoke partner link (file adapter write)

                i put the datetime with the composite instance id

                concat('DW_',xp20:format-dateTime(xp20:current-dateTime(), '[Y0001][M01][D01][H01][m01][s01]') ,'_' , ora:getCompositeInstanceId() ,'.txt')