Synchronous Read in File Adapter

Hi,
Could you please explain one example scenario for Synchronous Read in File Adapter?
Thanks,
kpr

This is end to end case
Assume u have file coming from 2 differnt source in 2 differet inbound file adapter you can read this at a same time and do assign,transform etc in bpel and send one file to next process for further processing. in this type of scenario we use a Sync file read
Note: the 2 files come at same time to inbound file adapter.

Similar Messages

  • How to get the name of file was read from file adapter ?

    Hello!
    I make a pooling into one directory to read all *.fat files in this directory, and I want the name of this file
    is it possible ?
    God bless all!

    it is mentioned in the sample code.. look at the pdf guide inthe sample code document for file adapter.
    you need to define a variable of message type of the file adapter inbound header message type and assign the variable to the apapters tab in the receive activity..
    the variable will have file name now

  • Counting number of files read by File adapter

    I have configured a file adapter in a BPEL prcs to read files from a location. The adapter is polling files with a specific file ext(say txt). Is it possible to know the number of files read by the BPEL prcs at the end of the day??? i,e.
    is it possible that a BPEL instance after reading a file updates the count in a variable and this variable value is seen by other BPEL instances and the other instances can also update the value....
    Any pointers will be helpful...
    Thanks

    You could make use of some logtable and log it inhere.
    In the bpel after a file is pickup up, read this value from the table, add 1 to it, and write it back.
    Or try this approach from Lucas :
    http://technology.amis.nl/blog/?p=2781

  • Synchronous Read of files within FlowN structure

    Hello again,
    I was wondering whether it would be possible to do a number of synchronous reads within a FlowN structure. Essentially, I have a list of file names which I want to loop through. For each file name, I then want to invoke a synchronous file read on that file, and then extract some data to put into my results structure.
    Is this possible?
    Thanks in advance.
    Adam

    Hi giovanni,
    Instead of trying to read the file read use an input stream. Something like this;
    URL theURL = classLoader.getResource(myConfig.xml);
    InputStream is = theURL.openStream();
    // read the streamalternatively you could use getResourceAsStream on the class loader.
    Hope this helps.
    -bd-
    http://bill.dudney.net/roller/page/bill

  • How synchronous read operation is outbound operation?

    Hello,
    1. what is the difference between read and synchronous read in file adapter?
    2. how synchronous read operation is outbound operation? Read must be an Inbound operation.
    Please clarify.
    Thanks in adv,
    kpr
    Edited by: 975937 on Dec 13, 2012 8:44 PM

    1. what is the difference between read and synchronous read in file adapter? Read is use for polling. Read option will initiate a new instance(and you will use a receive activity - inbound).
    2. how synchronous read operation is outbound operation? Read must be an Inbound operation. Synchronous read is being used from an existing instance (process). You will use an invoke activity for that - you are sending a request to read a file (file/directory name etc..). You are then getting back the result (file content etc....).
    Hope that answered your question.
    Arik

  • File Adapter Best Effort...how come?

    Hi !
    While reading the File Adapter online documentation, it says that it supports Best Effort as QoS...?? I though that QoS = BE is for synchronous interfaces...in what case the File Adapter could work in sync mode?
    Tnx,
    Matias

    Matias,
    A classical use case of when you can use a QOS of BE in the file adapter is,
    https://forums.sdn.sap.com/click.jspa?searchID=3084724&messageID=3075228
    If you look into my response in this thread, the RequestResponseBean is used to change the QOS of file adapter from EO to BE . If you select the QOS as BE in the File Adapter you need not use this module.
    Have not given this a shot though!
    Regards
    Bhavesh

  • 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

  • XI30 File Adapter - check for (NOT) incoming file

    Hi!
    We use XI30 SPS15 and have the following challenge: We expect every
    week on a certain day a file coming from a customer. So far so good.
    But now we want to check whether such a file has really come within a
    given period of time and if not, we want to take some action (e.g.
    trigger Alert or s.th. like that).
    Business Background is: If the customer does not send the file or he
    sends it too late, we cannot bill him in time, thus increasing our DSO.
    Is there any mechanism within the XI to check things like these and to
    trigger an alert? I've read the File Adapter Documentation as well as
    the BPM documentation but I could not find any hint.
    Any help would be great. Thanx!
    Regards,
    Volker kolberg

    hi volker,
    this is not supported in standard but...
    you can do it very easily with standard ABAP job scheduling
    - you schedule a job (every week, day etc.)
    which starts a raport that send a RFC (or abap proxy call to the XI)
    - then the RFC starts a BPM and inside it triggers a
    java proxy that checks for a file
    - if the proxy finds the file then if copies it to some other folder (which is monitored by another flow)
    - if it doesn't find the file it triggers an error - sends mail or anything
    the only thing you need to code is a few lines in java
    to check the existance of a file + copying nothing else:)
    this is the easiest way I believe till now <= Sp15
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • File Adapter to EJB  in BPEL

    Hi,
    I have one XML file that i am reading using File Adapter in BPEL process. after reading i want to pass those values to EJB Adapter.
    I used Trasform to mapp output variables of File Adapter to Input parameter of EJB service.
    But the Invoke process is not happening.
    How to Pass values from File Adapter to EJB ?
    Thanks

    Hi Sonia
    It is not possible to achieve this using debatching. In fact, the use of the Debatching technique is appropriate when your requirement is exactly the opposed: When you need to run instances simultaneously.
    If you need to process each record sequentially, you should consider using just one instace (not using debatching and let the process reads the entire file), using a while and considering your XML as an array, processing each record as a single unit.
    If the CSV file is too big, you should consider using a process A that breaks the file into smaller files and copy sequentially the small pieces to a directory where process B is reading the entire file.
    []´s
    Marcelo

  • OracleSOA - File Adapter - Correct mechanism to get the line number from the file

    We are using Oracle SOA process to read data from a file, process the data and write it to the database. SOA process is created using Oracle File Adapter to read the data, Oracle BPEL to transform & process the data and Oracle DB Adapter to write the data into the database.
    Oracle File Adapter uses native schema to process the fixed length data in the file. The number of rows in the file may exceed more than 500,000, to support processing of large files we use chunk size in the file adapter as 4000 rows. In each read operation, file adapter reads the data that matches to the schema, there might be few rejected rows as well.
    Oracle File Adapter property - jca.file.LineNumber gives me only the line number till what line the data is read. Is there any way to get the line number in the xml message, which exactly matches to the line number in the file.?
    Flat File Format: (Every file has one header, trailer and multiple data lines),
    HEADER02 -
    L01
    L01
    L01
    TRAILER02
    Line number is one of the crucial requirement in the development of the SOA service, this is used to back trace the information from which source and line the data has come.

    Hi Anshul,
    Thanks for sharing your thoughts.
    I am using DB adapter to insert the data into db.
    While doing the xsl transformation I can get the index of the message using position(), but that is not the correct way as there can be rejected lines by the file adapter.
    Even if I maintain a local counter variable, it will not consider rejected lines and increment that, which is not correct.
    Thanks,
    Ravindra

  • File Adapte picking up XML if XSD valid without verifing the XSD in adapter

    hi',
    I am facing one issue
    I have a sample XML file which I want to read through BPEL process
    for this I have configured the file adapter with the schema and reading the file adapter with the receive activity
    next I have created one XSD file (which file adapter referes to) and one XML file,
    File adapter reads it after the XML file gets validated with the XSD which is kept in a location *'/test/xsd/emp.xsd'*,
    now the issue is that the file adapter is picking up and initiating the process without verifying the XSD mentioned in the adapter
    it is only checking the XML file with the XSD mentioned in the XML,
    for example if I have a xml file which is refering to some other schema it also gets read by file adapter without worring about what schema is mentioned in file adapter
    please advice me is this the way File adapter works in Oracle BPEL or I am doing some thing wrong
    I am using SOA suite 10.1.3.3.0 which is deployed in UNIX enviornment.
    thanks
    Yatan

    thanks Ketan ,
    as you suggested, after adding validateXML to true, the XML is getting validated to the XSD in the adapter,
    the process is getting invoked and the receive activity is throwing error of 'Invalid XML', this is perfect as I expected
    however now the issue is, the file which is invalid in terms of XSD present in the file adapter is still being archived to 'success dir' i.e. 'LogicalArchiveDirectory', ideally it should have moved to fail directory,
    but if the XML file is not complete or having some error in terms of the XSD it is refering to 'target namespace' and 'target location'
    then it will move to the fail directory and the receive activity is also showing the error,
    see this is how I have configured my bpel.xml file for the file adapter.
    <activationAgents>
    <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="Read_Tph_ProdTrans_File">
    <property name=*"prod_trans_success_file" type="LogicalArchiveDirectory"*>/aaa/bb/ccc/wis/tph/bpl_inbound/adjust/success</property>
    <property name=*"prod_trans_incoming_file" type="LogicalDirectory"*>/aaa/bb/ccc/wis/tph/bpl_inbound/adjust/new</property>
    <property name="portType">Read_ptt</property>
    <property name="rejectedMessageHandlers">file:///aaa/bb/ccc/wis/tph/bpl_inbound/adjust/fail</property>
    </activationAgent>
    please advice how to bring this adapter to proper behaviour.
    thanks
    Yatan

  • File Adapter Directory Path

    Hi,
    I have hot coded the directory path.
    I want to read the input directory path for fileadapter from a file(i will have a configuration file where i will set values for parameters).
    Regards
    Vishnu

    Thanks Ashish, it is helpful.
    Just one more question, I am not sure what value do I add from making physical to logical. Let's say if I have file polling read operation (not sync read), then if I configure physical path it will be hardcoded in jca wsdl file, if I configure logical it is hard coded in bpel.xml file.
    Unlike other preferences I am not able to update my logical directory in bpel.xml at run time in descripter tab. So if my input directory changes for some reason, I have to replace it (via ANT) and redeploy the process no matter what.
    Let me know if I understand it correctly.
    Vishnu,
    Please clarify which operation you are using, if you are using sync read or write, you can read your directory and file name from parameter file and pass it to adapter for reading that file. Adapter will give you content and also the name file/directory as header variable.
    If you are using polling operation, "after reading" the file adapter will provide file name and directory in header. But if you want pass the name of directory to adapter for reading the file, then I have asked similar question to Ashish.
    Regards,
    Chintan

  • File adapter -sync

    Can we apply Synchronous to a file adapter?

    Hi Sunil,
    When we use any adapter in XI , it will post the message to the corresponding target system/service. If it is a synchronous call, then it will carry the response given by the target system to the source system.
    For exmpale a if we call any webservice in synchronous mode using SOAP adapter, the SOAP adapter will ping the given URL with the sournce message and will get back the reponse given by the webservice.
    So when using a synchornous mode, one has to design according to target system design, whether it can able to give the response or not.
    Considering the file adapter in XI , A file adapter is used to place/pick a file on remote (FTP/VAN) system . i.e when we place a file on a FTP server, it just stores the file on that specified system folder and the system can not able to give any response to that activity. It is something similer copying a file from one folder to another folder. so that is the reason , why we can not use a file adapter for Synchronous service.
    Regards
    Vijayanand Poreddy

  • Read uniquely named file. Sender File Adapter unsuitable for synchronous

    Hi All,
    We have a requirement to read a specific file that has a unique name based on a transaction ID. The transaction ID will be passed from the source application.
    The communication is required to be synchronous. There could be multiple requests/files generated and present at the directory at any given time but each corresponding to a specific transaction ID. If the file is not yet generated for that transaction ID we return back an error to the calling system.
    I think we can not use Sender File Adapter - because of the dynamic naming and also because we have to return a synchronous response back depending on the file availability. i.e. We can not have a defined pattern in the file name nor can we specify a wild card as there could be more than one files in the location.
    In theory we could use the File Sender adapter to read all the files in the directory and a BPM with correlation set based on the transaction ID and let the process wait for the request. But as far as possible I want to avoid this unnecessary wait or extra demand on the system. More so because the files could get big.
    If I were using a tool like SAP Business Connector or webMethods then I would I used a readFile Java service and given it a filename to return the required bytes in a synchronous read.
    Is something like this possible in XI? If someone has written a synchronous Java to read file can they share the code? Or do you suggest I write a ABAP server proxy to read the file?  The problem however will be how do we map the data to a XML within the code.
    All suggestions welcome. There has to be a simple and effective solution to this mundane requirement !
    Wishing all SDNers a bright start to this new year,
    Thanks,
    Charu
    Message was edited by:
            Charu Kulkarni
    "The transaction ID will be passed from the source application so we know what file to pick"

    Hi,
    You could make the scenario a little simple and avoid custom development if the logic can be put into scripts(out of XI).
    Say all the files are coming into a directory called D1.
    Here, you could use a script to arrange all these in an order (say ascending) and move the first file into another directory D2.
    The sender file adapter would poll this directory D2. The adapter can have a wild card character for the filename field now.
    Once the file is in XI, you could check this against the transactionId present(I am not sure how you get this though!), and determine whether to send a mail, or to send a file back.
    Here, I have assumed that there is somekind of order present in the files placed in the directory D1.
    Again, this is just a suggestion.. I might be wrong with all the assumptions.
    Regards,
    Smitha.

  • Synchronous Read operation in File Adapter

    Hi All,
    Can anyone explain me on 'Synchronous Read' operation in File Adapter.
    Thanks,
    Rakes

    There are 3 options for the file adapter.
    - Read used for polling files to invoke a BPEL process
    - Write used writing out a file, generaly used to finish a process
    - Sync Read is used to read a file in the middle of a BPEL process.
    What I mean by middle of a process is, a BPEL process can be invoked using a WSDL. The BPEL process can perform some operations and may need to read a file as part of that process as a file provides some information important to the process.
    A real life example would be having a java progaram that invokes a BPEL process via a WSDL. This application asks to process a file xyz in directory abc. You would get this variables from WSDL and read the file approprately.
    This is also an example of processing a file based on business rules in your BPEL process.
    cheers
    James

Maybe you are looking for

  • How do I add an Ouput Channel in LOGIC X

    how do I add an Ouput Channel in LOGIC X?

  • Iphone 4s turning on only until the apple logo

    My iphone 4s, just after the blue i found it off, i assumed it was without battery until i reach home and plug it to the wall charger, it did start but showed signs of searching for network. After sometime i noticed the sign of the battery was a bit

  • Visual internet connection, but cannot get on the internet? Help:(

    Hi people. My wife bought me an Ipod touch. This is a long time ago, because I cannot use it with my wi-fi connection home. I took it with me to my parents, and it worked without any problems there. I took it with me to my place, and I got the same p

  • Netra T1 AC200 Install of Sol 7

    Solaris 8 installs just fine, but Solaris 7 will not boot from cdrom. Have done everything from "boot cdrom" to changing the boot device "setenv boot-device cdrom disk net" Any suggestions? Thanks Chris

  • Question about stacked canvas disappearing

    Hi, I have a block which has some database items and non-database items. Since there are many items in the block, I use a stacked canvas with horizontal bar to display the less important items. In the trigger of new-block-instance, show_view('stacked