File adapter polling and getting the file name

I have a requirement where I have to poll a file and dump the data into the DB. But while polling a file for a particular file name, I also need to get the name of the file to do some operations on the file. The file name should be passed from the adapter in order to do some operations based on the file name. Is it possible to get the file name by any chance?

Hi,
its easy to get the file name..by creating the variable for the fileAdapterInboundHeader.wsdl
just follow the below link.
http://abhishek-soablog.blogspot.com/2008/06/bpel-getting-file-name-from-file.html
Edited by: Oraacler on Mar 19, 2010 2:59 AM

Similar Messages

  • File adapter polling and getting the file name 11g Jdeveloper

    I am using JDeveloper 11g. My process is something like;
    A file adapter reads a XML file
    This triggers the BPM process, file content is sent to start activity as message
    I have to get the file name that is read by file adapter.
    How to do that? Any help is appreciated.
    I have seen couple of answers like bellow in forum but did not help me much
    This is a very simple task in JDeveloper 11g, file adapters are linked to the receive activity, here there is a tab called Properties which you can use to extract the file name. Please follow the steps below:
    1. Create a Simple Type variable of string type, call it fileName_var or any name you wish.
    2. Open the Receive activity in your bpel project.
    3. Scroll down to jca.file.FileName and double click on the value column, click on the browse button (...), select Variable, then click the search icon
    4. Locate your recently created variable
    5. Now when your project runs it will assign the file name to this variable, you can use this same approach also to pull the directory, file size, etc.
    *************************/

    hi,
    Like you said.. steps are simple and clearly mentioned in guide.
    1. create a variable of type string
    2. after configuring the file adapter , go to corresponding receive activity , go to properties tab
    3. search for a property with name as jca.file.FileName . This basically keeps track of file name
    4. for this property, give the value as name of variable created in step 1 above
    5. Use this variable anywhere in assign / transform
    HTH,
    Ketan

  • File Adapter - how to get the file count from a folder

    Hi All,
    I have a requirement that have to poll a directory when the file count is reached to number N (ex:number of files avilable in folder is 5) otherwise it should wait and not pick any of the files. Is it possible to get the file count from a folder using file adapter ?? otherwise please suggest me an approach to achieve this requirement.
    Thanks,
    JJ

    Hi Sarath,
    Thank you for your reply.
    Go with the list files operation of file adapter it will gives you the number of files in the specified folder as you given. . - this step is already done.
    When the number of files reaches your count startup your webservice that which can polls the files. . . - how can i acheive this?? Have to poll the directory and process the number files - please let me know, what could be added to the webservice which is being invoked after cheking file count from parent process.
    The reason for the above question is - we cannot use ReadFile operation in second webservice because it will be automatically triggered when the file is avilable. Also SyncRead operation supports reading one file in b/w bpel process. Kindly explain me the implementation steps.
    Thanks,
    JJ

  • HI. I have itunes 10.6.1.7. When I goto movies i am not able to add and when I click on add file to library and select the file and add its not getting added. When i goto Library it says  that movies I add are in library.Which I cant add

    HI. I have itunes 10.6.1.7. When I goto movies i am not able to add and when I click on add file to library and select the file and add its not getting added. When i goto Library it says "feature films and home movies you add to itunes appear in movies in your iTunes library. To play a movie, just double click it". And below are two options for Downloading movies from store and rent movies. Please help.

    I get the exactly the same problem with win 7, i rang apple support who suggested i try another machine/or create another account on my machine???? why should i, stupid ipad 3rd gen is now sitting here un syncable, apple support ....tut tut very poor support, its a shame im out of the 7 day period otherwise this ipad would be going straight back, older versions of itunes worked fine, some one must know a fix for this??

  • Sener file adapter has read/pick the files first in first out method.

    HI
    In my Interface I am Using Sender as File adapter. As per my requirement Sender file adapter has to read the file from file directory. This directory having 1000u2019s of files with some files are same name (time stamp is different) and some files are different name here file adapter has to pick the file with mentioned name   in File sender adapter like ZMPSMSGSTATUSMST-.xml .
    But source file name is like <TABLENAME>-<TIME_STAMP>.XML (ZMPSWRKFLOWHIST-20090527-150522-628) in file directory.
    The file adapter in XI will poll to this directory and picks the file in first- in first-out by sorting according to timestamp.
    To do this configuration what I have to do in sender file adapter please give me your valuable inputs.

    HI Abhi,
    Thank you for your spot replay.
    I tested now but i am geting below error.
    Putting message into send queue failed, due to: com.sap.aii.af.ra.ms.api.DuplicateMessageException: Message ID f4ca4f86-9c5d-4bdd-1fb1-a6bd7cda99a8(OUTBOUND) already exists in database: com.sap.sql.DuplicateKeyException: [NWMss][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK__XI_AF_MSG__491A1D0B'. Cannot insert duplicate key in object 'dbo.XI_AF_MSG'..
    Could not archive file 'E:\file\in\ZMPSMSGSTATUSMST-20090527-150522-628.xml' after processing
    but i am able to see this file in Archive foleder. once file is archivied sucessfully the same file is delted from source directory?
    I given processing parametes queue name is TEST.
    Thanks
    srinivas
    Edited by: srinivasreddy p on May 28, 2009 8:43 AM
    Edited by: srinivasreddy p on May 28, 2009 8:52 AM

  • Mail doesn't attach files through dragging and dropping the files!

    Help please,
    Mail doesn't attach files through dragging and dropping the files on OS X ML, it crashes for a while !!

    Open Disk Utility and Repair disk permissions on the First Aid tab.
    Then, Restart and boot into Recovery Mode by holding down cmd-r on restart until you see a gray screen. When the Mac boots, you will be presented with some options. Choose Disk Utility and select your Hard drive volume (Macintosh HD is the default name). Then, on the First Aid tab, click Repair Disk (not permissions).
    If that doesn't help, you could try installing the 10.8.2 combo updater from the Apple Downloads site:
    http://support.apple.com/kb/DL1581

  • Generate a PDF export and getting the file or the bytestream to modify it

    Hi everybody
    I have a web dynpro application and want to get the bytestream or the PDF file itself.
    Is there a function (RFC, J2EE-Method, ABAP methode/class) where I can say
    "Hey function, generate a PDF export of a BI report and save the PDF file <br>somewhere in the KM or return the bytestream of the PDF"
    I must be able to define following parameters
    -BI template name
    -values for the selection mask (the same as the BEx BI-Commands to prefill a field in the selection mask)
    -KM path + filename (if the function saves the file in the KM)
    What I already tried:
    Broadcast to KM
    I can start the broadcast automatically using the report RSRD_BROADCAST_STARTER. But the problem is that I can't generate a broadcast setting and so I'm not able to define the filename and selectionmask data dynamically.
    Package RSRD
    When you enter the transaction SE80 and look for the package "RSRD" there are a lot of interesting classes and methods. But I couldn't figure out how to call them to generate a PDF export of a BI report.
    FM RSADOB_PDFREPORT_GENERATE
    This function module have all the parameters I wish. The problem is that it does not work anymore. It's just an internal test for the SAP guys themselves.
    So ...
    Have anybody an idea how to solve this?
    How to generate a PDF export of a BI report and fill the selection mask and get the PDF (as bytecode or file in the KM) ?
    Thanks lot
    Klaudio

    hi,
    Like you said.. steps are simple and clearly mentioned in guide.
    1. create a variable of type string
    2. after configuring the file adapter , go to corresponding receive activity , go to properties tab
    3. search for a property with name as jca.file.FileName . This basically keeps track of file name
    4. for this property, give the value as name of variable created in step 1 above
    5. Use this variable anywhere in assign / transform
    HTH,
    Ketan

  • How do I turn off Picture Sharing? I want to send the file as normal and keep the file name.

    As above, recently I can't send images the same way as other files. I want the receiver to get the file directly. Right now Skype uploads the image to some website and also changes the file name, which is a big problem for me. Also it's very impractical for the receiver to have to open the link all the time.

    Hi and welcome to the Skype Community,
    Please ask the recipient of your file to upgrade to the latest version of Skype for their platform. The latest versions of Skype for all supported devices are available at http://www.skype.com/download.
    All current Skype versions show the file within the conversation and do not require to open them in the browser any longer. By default Skype opens a thumbnail for received files. Make sure your pick a location to save the image as a receiver and you will get the original file and not a smaller thumbnail in a different file format.

  • Production issue - Sender File adapter not picking up the files from folder

    Hi Guys,
    Ever since the upgrade from XI 3.0 to PI 7.1, we have come acrossinstances of weird error.
    Thsi time again - now the 3rd time - tandom basis, in our production PI server, we have teh file slying in the source directory folder in the server.
    I can see the files lying there in AL11.
    However, it looks like that the file polling has just stopped and the channel is going blank in channel monitoring.
    I have checked in SXMB_MONI and there are no messages since the morning.
    I have tried craeting a replica of the current channel but it is not working.
    This is teh production server and thsi has alraedy created production issues.
    I ahve checked in the SDN forum but am not able to find the details.
    Plaese help me.
    I am anyway going to raise the issue with SAP now.
    Regards,
    Archana
    <REMOVED BY MODERATOR>
    Edited by: Prateek Raj Srivastava on Jun 8, 2010 4:50 PM

    Hi Prateek,
    I have trying all sorts since the morning and then just checked teh file permissions.
    The file permissions were incorrect as compared ot the other files that were processed successfully today.
    Somehow the permissions were changed on the server and the interface channel was not able to poll the files.
    I got teh permissions changed back to 666 and all the files were pikced up in a minute.
    I got the folder checked and it seems like that the permissions were changed somewhere very early in the morning and we are trying to find out how it happened and who did that.
    However, another question i had - this sender file adapter was polling the source directory and deleting the files from there.
    I would have expected that if the channel had issues with the file permission because of which it was not able to access the file, it would have thrown an error something like the file permissions error.
    But there was not a single error in the channel monitoring.
    How can we configure it in a beter way so that we at least soem kind of error indication?
    Please advice.
    Regards,
    Archana

  • File to proxy dont get the file name from UDF

    Hi Pi gurus,
    when i try to get the name of the file from the mapping by using the code above in a UDF i simply get a null in place of the real name of the file.
    here the code that i used:
    =============================
    String SourceFileName = "";
    String context ="http"+":" +"/" +"/" + "sap.com/xi/XI/System/File";
    try {
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http"+":" + "/" +"/" + "sap.com/xi/XI/System/File","filename");
    SourceFileName = conf.get(key);
    catch(Exception e)
         SourceFileName = context;
    return  SourceFileName; 
    =================================
    thank you

    hey
    In the sender File communication channel,did you check the Checkbox.
    "Set adapter specific message attrbiutes"  and "Filename"
    if not,please do that first and test again.
    Thanks
    Aamir

  • Call File Adapter Externally and Pass on File name

    HI experts,
    We have a requirement where we need to call a file adapter externally to poll for a file.
    The File name needs to be passed on to the called Adapter and the adapter will poll for that particular file.
    Once it polls we will need to stop it -- in other words the the adapter will poll only when we call it externally.
    Any form of inputs / help on this will be greatly appreciated. We will initiate this possibly from a BPM.
    Many Thanks,
    Himadri

    Hey buddy ..
    I agree with Praveen... you cannot dynamically change the filename in the sender File CC..\
    regards,
    arvind R

  • How to rename a flat file concatenating date and time the file name?

    I created a package where I run a first interface that uses a flat file from a server and load into a table in Teradata.
    After using the API OdiFtpPut, I used an FTP file and send to an outfit.
    Since this procedure will operate daily, I need at the time of FTP, get the concatenation destination file name, date and time of execution.
    What is the best practice for this?

    Using OdiFtpPut in the field where it informs the destination file name, instead of putting just the file name (lpn_pln.csv), I put as follows:
    - lp_pln_+<% = odiRef.getSysDate (ddMMyyyyhhmm ")%>+. csv
    For code example, today would record the name lp_pln310120111412.csv
    Anything you can add my msn ---> aluizs @ ig. com. br (no spaces)
    Edited by: andre_l_soares on 31/01/2011 08:16

  • File upload script not getting the file name for larger files

    Hi
    I have the following code (see extract below) and find that
    when the size of the file to upload is larger than about 300kb the
    code does not grab the file name. Consequently the upload fails.
    The code works fine when the file size is smaller.
    The code in the form page is:
    <form
    action="UploadAttachment.asp?SubjectName=<%=Request.QueryString("SubjectName")%>&VersionN umber=<%=Request.QueryString("VersionNumber")%>&QualificationName=<%=Request.QueryString(" QualificationName")%>"
    method="post" enctype="multipart/form-data" name="form1">
    <input name="file" type="file" size="100">
    <input name="Upload" type="submit" id="Upload"
    value="Upload">
    </form>
    The code in the UploadAttachment.asp page is:
    <%
    'Grab the file name
    Dim objUpload, strPath, SQLString
    Set objUpload = New clsUpload
    'there is a problem that this next line doesn't grab the file
    name if file is too large.
    strFileName = objUpload.Fields("file").FileName
    etc.
    %>
    If you have any idea how to resolve this I'd be grateful.
    Neil

    Hi
    I have the following code (see extract below) and find that
    when the size of the file to upload is larger than about 300kb the
    code does not grab the file name. Consequently the upload fails.
    The code works fine when the file size is smaller.
    The code in the form page is:
    <form
    action="UploadAttachment.asp?SubjectName=<%=Request.QueryString("SubjectName")%>&VersionN umber=<%=Request.QueryString("VersionNumber")%>&QualificationName=<%=Request.QueryString(" QualificationName")%>"
    method="post" enctype="multipart/form-data" name="form1">
    <input name="file" type="file" size="100">
    <input name="Upload" type="submit" id="Upload"
    value="Upload">
    </form>
    The code in the UploadAttachment.asp page is:
    <%
    'Grab the file name
    Dim objUpload, strPath, SQLString
    Set objUpload = New clsUpload
    'there is a problem that this next line doesn't grab the file
    name if file is too large.
    strFileName = objUpload.Fields("file").FileName
    etc.
    %>
    If you have any idea how to resolve this I'd be grateful.
    Neil

  • Sender File Adapter not picking up the file

    Hello Experts,
    I have configured a sender file (FTP) adapter. All the configurations are right. The name of the file is given exactly as it is. The processing mode is Delete.
    The scenario was running fine till today. I only made changes to the path from which it has to pick the file. I have checked the path numerously and it is correct.
    But the file is not being picked up.
    Monitoring the communication channel shows no errors. It has the green indicator. No idea what is happening.
    Please Help,
    Regards,
    Merrilly

    Hi
    try to make some changes anf then again save and cativte the adapter. may be the adapter is not being activated.
    also check whether the cache is refreshed or not.
    or u can also check in the communication channel monitoring the channel is start or stop. if stop then start the channel and then try again.
    if u still face the problem please reply me back.
    Thanks
    Rinku

  • File adapter. Only get new files

    Hi there,
    I have a small problem that I'm not able to solve that easily with XI.
    I have some directories that I need to get files from on a remote server. The only problem is i need to get only the new files and I am not allowed to delete the old files. Since we are not the only one getting those files.
    So far I have not found any option to keep the old files and only get the new ones. Does anybody know a neat trick to get only the new ones?
    Regards,
    Wietse

    > Hi again Wietse,
    > After configuring the file adapter the way i
    > mentioned,check for performance, you might need to
    > install remote Adapter engine if you have some FW
    > problems or other security barriers that turn the
    > processing of this file to a hassel over the net.
    >
    > Nimrod
    Problem still is I am not allowed to do anything else then ftp/get on the files. I can't install a remote adapter engine or change anything to the files.
    I hoped that it would be possible to store the filenames somewhere and compare a dir listing to the stored filenames before the real get is done. But even when writing an adapter module, the file will already be in the adapter once the module kicks in. And I don't want to get old files that I've already processed into my system since there is a huge history of files on the machine.
    I think I might end up writing a perl script that searches for the new files and gets them and them sends them through to XI using a SOAP call.

Maybe you are looking for