Dynamic file naming with File/FTP adapter

Hi all,
I have a requirement for writing files with names of the files based on a customer ID.... a dynamic name based on a value retrieved from the customer DB.
I have already tried using the dynamic file naming suggestion in the bpel dev guide, it does not work. I followed the instructions, the process fails to compile and throws "part" and "undefined variables" errors etc.
Has anyone succesfully used file/ftp adapter to write files with dynamic file names (using a varibale), not %SEQ% or %datetime% formats?
Thanks,
Hasan

You can create a header variable that will allow you to set the outbound file name inside the process. This variable is a message type. From the type chooser select:
Message Types
Partner Links
Outbound Partner Link
Outbound wsdl
Message Types
Imported WSDL
fileAdapterOutboundHeader.wsdl
OutboundHeader_msg
This variable will have a part filename.
Set this part to whatever you wish your file to be named.
Select the invoke to your outbound file/ftp partnerlink. Move to the adapters tab and select the header variable you created as the Input Header Variable.

Similar Messages

  • BPEL Process with multiple file types using one FTP adapter is not working

    i created a bpel process which will fetch the files from remote location using FTP adapter.
    Now the process works for only one format or file type like *.xls.
    How can i use more than one file format in one FTP adapter.
    OR
    is there any other way to do it.
    file type assignation is 5th step in FTP adapter configuration.
    i have tried *.xls,*.csv and *.xls;*.csv and *.xls:*.csv by seperating with comman, colon, space... still not working.
    i read the documentation *.* will not work.. for one file format it's working fine.
    looking forward for reply as soon as possible.

    Are you positive that it is not working? I'm not sure how you can use one FTP adapter for multiple file types unless the underlying data is exactly the same format or you are processing it as opaque data. Sometimes when a FTP adapter chokes on a file with a bad structure it doesn't create a BPEL instance, it simply moves the bad file to a separate folder.
    So I assume you are using opaque as the data type instead of using an XSD element?
    That said, I don't think you can put two separate file types in the filter. Is it possible for you to do something like: CommonFileName*.* or do you have similar files with other extensions?
    I know the above probably isn't of much help, but I had so many problems with the FTP adapter and its lack of features that I am writing my own. Unfortunately that is a large undertaking and there isn't any good documentation of JCA resource adapter / BPEL PM integration.

  • How to find the File name using the FTP Adapter

    hi all,
    how to find the File name using the FTP Adapter with BPEL.
    Regards

    Found the solution for this.
    First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
    In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
    Thanks for the posts

  • FILE NAME WITH FILE EXTENTIONS

    HI EXPERTS!!
    I WANT TO GET THE FULL FILE NAME STRORED IN THE SERVER FOLDER. I USED  FM RZL_READ_DIR_LOCAL BUT I AM GETTING ONLY 32 DIGITS OF NAME NOT FULL NAME AND ALSO SIZE PARAMETER IS CONCATENATING WITH NAME.
    I WANT THE FILE NAME WITH FILE EXTENTIONS(TXT. .PDF ETC)..
    PLZ SUGGEST ME HOW TO GET THE SAME..
    PLZ REPLYE ME..
    MAHESH

    Hi Mahesh,
    Try the below FM in the below code.
      DATA:
        LV_PERMISSION(10),                 " Permission
        LV_H2,                             " H2
        LV_FLNM(13),                       " File name
        LV_USER(10),                       " User
        LV_GROUP(10),                      " Group
        LV_SIZE(15),                       " Size
        LV_MONTH(3),                       " Month
        LV_DAY_C(2),                       " Day
        LV_YEAR(5),                        " Year
        LV_FILE_NAME       TYPE FILE_NAME, " Filename
        LV_JUNK,                           " Junk
        RETURN_CODE      TYPE I.           " Return code
      DATA:
        CMD_PARAMS LIKE SXPGCOLIST-PARAMETERS,
                                           " External prg.parameters
        CMD_OUTPUT TYPE BTCXPM OCCURS 0,   " Log message
        STATUS TYPE EXTCMDEXEX-STATUS.     " Status
      CONSTANTS:
        LC_DIR TYPE C VALUE 'd'.           " Directory
      FIELD-SYMBOLS: <CMD_OUTPUT_LINE> LIKE LINE OF CMD_OUTPUT.
      CMD_PARAMS = PV_DIRECTORY.
      CLEAR CMD_OUTPUT.
      CALL FUNCTION 'SXPG_CALL_SYSTEM'
           EXPORTING
                COMMANDNAME                = 'Y_LS_LN'
                ADDITIONAL_PARAMETERS      = CMD_PARAMS
           IMPORTING
                STATUS                     = STATUS
                EXITCODE                   = RETURN_CODE
           TABLES
                EXEC_PROTOCOL              = CMD_OUTPUT
           EXCEPTIONS
                NO_PERMISSION              = 1
                COMMAND_NOT_FOUND          = 2
                PARAMETERS_TOO_LONG        = 3
                SECURITY_RISK              = 4
                WRONG_CHECK_CALL_INTERFACE = 5
                PROGRAM_START_ERROR        = 6
                PROGRAM_TERMINATION_ERROR  = 7
                X_ERROR                    = 8
                PARAMETER_EXPECTED         = 9
                TOO_MANY_PARAMETERS        = 10
                ILLEGAL_COMMAND            = 11
                OTHERS                     = 12.
    Check Status first then check sy-subrc
      CASE SY-SUBRC.
        WHEN 0.
          CASE STATUS.
            WHEN 'F'.
              MESSAGE I057(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
            WHEN 'E'.
              MESSAGE I058(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
            WHEN 'S'.
              MESSAGE I059(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
            WHEN 'C'.
              MESSAGE I061(YS) WITH 'SXPG_CALL_SYSTEM'(002).
              GF_EXIT = GC_TRUE.
          ENDCASE.                         " CASE STATUS.
        WHEN 1.
          MESSAGE I048(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN 2.
          MESSAGE I049(YS) WITH 'Y_LS_LN'(003).
          GF_EXIT = GC_TRUE.
        WHEN 3.
          MESSAGE I050(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN 9.
          MESSAGE I054(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN 10.
          MESSAGE I055(YS) WITH 'SXPG_CALL_SYSTEM'.
          GF_EXIT = GC_TRUE.
        WHEN 11.
          MESSAGE I056(YS) WITH 'SXPG_CALL_SYSTEM'(002).
          GF_EXIT = GC_TRUE.
        WHEN OTHERS.
          MESSAGE I022(YS) WITH SY-SUBRC.
          GF_EXIT = GC_TRUE.
      ENDCASE.                             " CASE SY-SUBRC.
      IF GF_EXIT = ' '.
        READ TABLE CMD_OUTPUT ASSIGNING <CMD_OUTPUT_LINE> INDEX 1.
        IF SY-SUBRC = 0.
          CONDENSE <CMD_OUTPUT_LINE>-MESSAGE.
          IF <CMD_OUTPUT_LINE>-MESSAGE CS 'total' OR
             <CMD_OUTPUT_LINE>-MESSAGE CS 'TOTAL'.
            DELETE CMD_OUTPUT INDEX 1.
          ENDIF.
        ENDIF.
        LOOP AT CMD_OUTPUT ASSIGNING <CMD_OUTPUT_LINE>.
          CONDENSE <CMD_OUTPUT_LINE>-MESSAGE.
          SPLIT <CMD_OUTPUT_LINE>-MESSAGE AT SPACE INTO
                                          LV_PERMISSION
                                          LV_H2
                                          LV_USER
                                          LV_GROUP
                                          LV_SIZE
                                          LV_MONTH
                                          LV_DAY_C
                                          LV_YEAR
                                          LV_FILE_NAME
                                          LV_JUNK.
          IF LV_PERMISSION(1) = LC_DIR.
            CONTINUE.
          ELSE.
            LV_FLNM = LV_FILE_NAME(13).
            TRANSLATE LV_FLNM TO UPPER CASE.
            IF LV_FLNM = '1W_FIARFUNNEL'.
              PT_FILE-FILE_NAME = LV_FILE_NAME.
              APPEND PT_FILE.
            ENDIF.                         " IF LV_FLNM = '1D_FIARFUNNEL'.
          ENDIF.                           " IF lv_permission(1) = ...
        ENDLOOP.                           " LOOP AT CMD_OUTPUT
      ENDIF.                               " IF GF_EXIT = ' '.

  • Issues with Seeburger FTP adapter

    Can one of you with Seeburger FTP adapter experience share some information on these issues I'm facing
    1. Do I need to setup resource management in Seeburger workbench. If so, do I need to configure, resource, server and reservations. Do you have more information and what parameters I need here.
    2. In the Seebuger FTP adapter, I have
    Module Key - exit
    Parameter Name - JNDIName
    Paramter Valu - deployedAdapters/SeeXIFTP/shareable/SeeXIFTP
    JNDIName, should I be replacing this with some other name. I'm trying to get Seeburger FTP to work and in the messaging monitor, I see the message as passed to Module Processor but it does go anywhere from there.
    Can one you throw some light on this subject...what to expect from this definition.
    Thank you for all your replies,
    Parimala

    I'm resending this since I did not have any luck with it the first time.
    We also have an oss note waiting to be responded on this subject.
    When I send messages using Seebuger FTP adapter, I see the following information in the SAP message monitor -
    "Message entered module processor exit bean and will be transferred to JCA adapter".
    But does not get to IBM VAN mailbox. How do I trace from this point onwards.
    Should I use Seeburger monitoring tool for this? If so, I don't see anything in Seeburger monitoring (used all criteria).
    Please let me know if you have any information on this subject.
    Thanks,
    Parimala

  • Sign on problems within Elements 10; plus cannot backup writing files error with file catalog.pse10db.  No indication what the problem is.  How do I get adobe help with these problems?

    Sign on problems within Elements 10; plus cannot backup, writing files error with file catalog.pse10db.  No indication what the problem is.  How do I get adobe help with these problems?

    Sign on problems within Elements 10; plus cannot backup, writing files error with file catalog.pse10db.  No indication what the problem is.  How do I get adobe help with these problems?

  • Will the current plugins for Sigma DP1/2 RAW files work with files from the DP1/2 Merrill cameras? A

    Will the current plugins for Sigma DP1/2 RAW files work with files from the DP1/2 Merrill cameras? And if not, is Adobe developing plugins for these cameras?

    Not sure what plugins you mean, Hornet - Lr doesn't rely on plugins to read new cameras.
    If you mean the Adobe Camera Raw (ACR) plugin - that's for Photoshop, not Lightroom. Lr has the same functionality as ACR, but it's hard-coded into the program, so if you're looking for support for a new camera, you need to wait for a new version of Lr.
    And nobody here can say when Lr support for a given camera will happen.
    Hopefully someone with a Merrill will be able to chime in about whether its files work with the current Lr.

  • Dynamic file name creation using FTP adapter wired from a mediator

    Hi All,
    My Requirement is as follows....
    Mediator is wired to Three FTP adapters to create three files.
    File names are dynamic.
    In the mediator those three routings, mappings and assignment for the directory and file name are being created.
    But out of 3 files, 2 files are being created with the names mentioned during the FTP adapter configuration and the last one is being created
    with the dynamic value.
    Any help in this regard is highly thankful.
    Thank you.
    Srivatsasa.

    Create a UDF in mapping taking counter from IDoc as input parameter
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String totalFilename = "AAAA_" + counter;
    conf.put(key,totalFilename);
    return  totalFilename; 
    Map output of this UDF to Top node at target.
    you will not be able to see the result in test tab of mapping but it works end to end
    Select Adapter Specific Message Attributes in receiver file adapter..here select filename checkbox

  • Get the File Name received from FTP Adapter

    Hi,
    How to get the File name reived through the FTP Adpater. I have created a variable with the Message type from ftpAdapterinboundheader.wsdl. from there I mapped the filename attribute to a local string variable.
    But I did not receive the file name. The output in the Audit trail is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Invoke_File_Process_FileProcess_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/PIERS/SP_FILE_PROCESS_UPDATE/">
    <AS_DIR xmlns="">I</AS_DIR>
    <AS_FILE_NAME xmlns="" />
    </InputParameters>
    </part>
    </Invoke_File_Process_FileProcess_InputVariable>
    Can any one let me know how to get the recevied file name from FTP adapter.
    Thanks

    you have to define variable of type InboundHeader_msg. Then in receive activity click on Adapter tab and for header variable chose your newly created variable (InboundHeader_msg). Once you receive message from FTP you should see in this variable fileName.

  • Processing a CSV file in batching by FTP Adapter gives translation error

    Hi All,
    I have a CSV with 2000 records.. want to process it in batch of 500.
    When i dont use batching in FTP adapter.. everything goes fine.
    But when i include batching in the adpater.. and try to process the same file. it gives:
    <2009-09-09 12:09:15,997> <ERROR> <VDSTServices.collaxa.cube.translation> <NXSDTranslatorImpl::logError> translateFromNative Failed with exception = 50
    <2009-09-09 12:09:15,997> <INFO> <VDSTServices.collaxa.cube.activation> <FTP Adapter::Inbound> Error while translating inbound file : VDST_CNP_EMR5110026_20090904_000000.csv
    <2009-09-09 12:09:15,997> <INFO> <VDSTServices.collaxa.cube.activation> <FTP Adapter::Inbound>
    ORABPEL-11100
    Translation Failure.
    [Line=27, Col=1] Translation from native failed. 50.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
         at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.doTranslateFromNative(NXSDTranslatorImpl.java:754)
         at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.translateFromNative(NXSDTranslatorImpl.java:489)
         at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:748)
         at oracle.tip.adapter.file.inbound.ProcessWork.processMessages(ProcessWork.java:336)
         at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:218)
         at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
         at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:280)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 50
         at oracle.tip.pc.services.translation.xlators.nxsd.ErrorList.addError(ErrorList.java:108)
         at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.terminateLoop(NXSDTranslatorImpl.java:1688)
         at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.parseNXSD(NXSDTranslatorImpl.java:1307)
         at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.parseNXSD(NXSDTranslatorImpl.java:1216)
         at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.parseNXSD(NXSDTranslatorImpl.java:1084)
         at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.doTranslateFromNative(NXSDTranslatorImpl.java:706)
         ... 7 more
    I tried deleting the rows 24-28 from the CSV and process again.. again got the same error [Line=27, Col=1] .. so its not an issue with CSV.
    Please suggest.
    Thanks

    Can you publish or pass your csv and the native schema you are using. Please also mention your soa version. thx.

  • Garbage name of the Archive File while using the FTP adapter

    Hello All
    I am using Oralcle FTP adapter to poll a file ,after polling I am deleting the file from the current directory and
    archiving it into another directory.
    Problem is after archiving the file into the another dirctory name of the is fine changed as follows :
    d2wXEgGZrfypNsGa15uzOA==_20081015_082233_0015
    I want same name for the archived file as orginal file with timestamp
    Please help to solve this problem.
    Thanks
    Satendra Pare

    You cannot change the file name in the save dialog, it always uses the originally file name of the form.
    But you can use scripting to save a form under another name.
    Sample.
    http://thelivecycle.blogspot.com/search/label/Save

  • How to set file permission using Oracle FTP Adapter

    Hi,
    I am using Oracle SOA Suite 11.1.1.4. I am trying to put a file using Oracle FTP adapter on unix box. The file that gets written to target system has file permission as RW/R/R. But this is a legacy system, and for them to consume this file - they expect the file permission to be RW/RW/R.
    They have set the .profile with the required permissions for the ftp user account that we are using. But still when my BPEL process writes a file to unix box through ftp adapter, the file permission is RW/R/R.
    Is there any way to control file permissions while writing files using ftp adapter? Any help would be highly appreciated.

    907597 wrote:
    But these setting needs to be done on unix server. Yes, that's the way to go... There's no config for that on FtpAdapter as far as I know...
    This setting will enable the same configurations for all other ftp accounts on the server, which doesnt sound correct. Any other way of doing this? Or can this be done only for one ftp account?You have to check if your ftp server is capable of having different umask for different ftp users... I believe most do not...
    http://h30499.www3.hp.com/t5/System-Administration/Setting-FTP-umask-per-user/td-p/2590101#.UMZ0TeEe7ng
    Cheers,
    Vlad

  • Processing files in Sequence using FTP Adapter

    Hi Experts,
    I have searched several forums but i am not clear on  how to process the files using FTP Adapter based on Timestamp.
    To process the files in sequence i.e, FIFO using FTP Adapter
    i have the files with file name customer and timestamp :  customer<yyyyMMddHHmmss>
    there are around 50 files in the FTP server llike this.
    I need to process these files acording to the timestamp and place the files in same processing sequence in the receiver end using the file adapter.
    If i specify the parametes in sender FTP Adapter as
    Qos= EOIO
    Queue name = ACCOUNT
    Whether these parameters would do the processing in sequence according to the Timestamp?
    Suppose if the queue ID for Inbound(SMQ2) is XBTI0_ACCOUNT then whether it will be the same for Outbound(SMQ1)?
    Kindly suggest me how to process the files in sequence according to the Timestamp using FTP Adapter
    Please reply..
    Thanks
    Sai

    Hi Shabarish,
    But this would require one more additional channel to process
    So i think it will take more time to process.
    Let me clarify my question once again.
    I need to Pick the files from FTP server based on their TimeStamp and in sequence.
    the file names are like this Customer<YYYYMMDDHHmmSS>.
    suppose i have 3 files as
    Customer20050413044534
    Customer20050414053430
    Customer20050315034533
    So i need to pick these files in this order and place the files in the same order to the receiver end(File Adapter)
    Customer20050315034533
    Customer20050413044534
    Customer20050414053430.
    As i am using FTP sender adapter i cannot use processing sequence "By Date".
    please suggest me on this.
    Thanks
    Sai.

  • File size restriction on FTP Adapter (GET)

    A customer has deployed a BPEL process that we had created that uses the FTP Adapter to download (GET) files. The customer is reporting that when they try to download a large file (about 800 MB in size), the process does not seem to kick in for more than one hour. At this point I don't know how good or bad the network speed is and how long a FTP download will take for a file of that size. But before looking into that, wanted to know if there is any restriction on how big a file can be for it to be downloaded by the BPEL FTP Adapter. If not, is there some way to find out what is wrong with the downloading or to know to progress of the FTP GET?
    The user guide talks about increasing the value of transaction-config timeout in server.xml for the File Adapter. Is this applicable for FTP Adapter also and will it work if I increase this?
    Thanks in advance for your attention.
    Jay

    Thanks for the pointer. The processes are deployed on a 10.1.3.5 instance.
    Of the info I found in that article, only the following seemed applicable:
    53.2.1 Setting Audit Levels from Oracle Enterprise Manager for Large Payload Processing
    I can ask the customer to turn off auditing if it is on. But I am skeptical that this will resolve this issue.
    The following seem to be applicable only to 11g version and I am not sure if they have any corresponding options in 10.1.3.5 (please let me know if I am mistaken):
    1. 53.2.4 Using Adapter Support for Streaming Large Payloads
    2. 53.2.6 Processing Large Documents in Oracle B2B
    Section 53.3.1 Opaque Schema for Processing Large Payloads says the following:
    There is a limitation when you use an opaque schema for processing large payloads. The entire data for the opaque translator is converted to a single Base64-encoded string. An opaque schema is generally used for smaller data. For large data, use the attachments feature instead of the opaque translator.
    Based on your experience, has the FTP Adapter ever been used to download files of 800MB or larger size on a 10.1.3.5 instance? I would like to know if there is any insurmountable system limitation with this approach or is it just a question of proper configuration or is this a bug that the FTP adapter product team can look at. I assume the attachment feature is not available in 10.1.3.5.
    The remaining sections don't seem applicable to the the customer scenario.
    Can you please explain what ODI is?
    Appreciating your input,
    Jay

  • Changing file content with file adapter in 11g

    Hi,
    This question may not be very clever but I am new here so please bear with me for a second
    My question is - can I change the content of the file with FTP adapter, this is 11.1.1.5.
    If yes what is involved in doing it, any link to a sample or any guidance is greatly appreciated.
    Thank you

    Hi,
    I don't think FTP adapter was designed to change content of files... But it depends what you mean by change...
    There is an append feature...
    http://docs.oracle.com/cd/E28280_01/integration.1111/e10231/adptr_file.htm#BABJEFCJ
    And you can always read the whole file, do the change in memory and rewrite the file again...
    Cheers,
    Vlad

Maybe you are looking for