Query operation in file adapter

Dear All,
we have faced several issues in using polling for production env.
We have to ensure sequential nature of data, which means FIFO order of inserts
is there any alternative to using polling - Receive in file adapter ?
Can we use {query database adapter  - invoke activity } in file adapter ?
Please let me know if any body as any leads.
Appreciate your response.
Regards
Arc

we cant use Invoke activity for Read functionality for File Adapter but there is another way to achive this we can use two recieve activities in one BPEL please find the Sample here $BPEL_HOME\samples\tutorials\109.CorrelationSets
Krishna

Similar Messages

  • 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

  • How to use wildcard in filename , in SyncRead operation in File Adapter.

    Hi All,
    Is this possible to use wildcard character in file name while creating file adapter for SyncRead Operation.
    I used write*.txt as a file name to read. But got below error -->
    file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_notification2_1.0_93d419d1ca67f87872914bf6daf16180.tmp/readfile3.wsdl [ SynchRead_ptt::SynchRead(Empty,Es) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No file to process.
    File d:\temp\temp1\write*.txt to be processed was not found or not available
    ; nested exception is:
         ORABPEL-11007
    No file to process.
    File d:\temp\temp1\write*.txt to be processed was not found or not available
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    Best Regards
    Vikash

    You cannot defined the wildcard for the file names. But you can provide the file name dynamically if you are on soa suite 10.1.3.4 minimum. You can get information about that in this link http://download.oracle.com/docs/cd/E12524_01/relnotes.1013/e12523/adapters.htm#CHDBBFBD

  • How to create a write operation in file adapter dynamically in to a folder.

    Hi all
    i want to explain my scenario...
    i am giving input to file adpter which is having read operation,and i am giving that input to an human work flow.i had two operations reject and resubmit in my task flow...i am editing the task with some changes...and resubmiting the task from the oracle bpm worklist.......now how can i give that task to again my input folder.....
    and another question is,
    if i am using three file adpters with 3 differnt folder structure having read operations.and i am giving only one file to one file adapter.and i am giving it to human work flow and i am editing it and i have to resubmit the file to the input folder.....so i i have to give back to input folder dynamically(with out hard coding the folder structure).....How can i give ?????
    so any one can help me....please...
    Thanks in advance...
    varma.

    ya...its gd....but i had a problem in my scenariou....
    i used this concept as a error handling frame work....that means
    i had so many composites which take purchase order as its input from a file adapter........if the input order differs from my xsd,i populated that input as a error file in another folder using some fault handlers... and i am giving that folder to human work flow and i a m editing that task and i am resubmiting it...so that it should go to the input folder of my composites as a input again...so how to differ ,for which composite i have to give as this task as input again.....dynamically it should vary in ...........
    please help me....
    thanks in advance....
    varma

  • Multiple File Location in Read operation in File Adapter.

    Hi,
    I am using File Adapter for Read operation. Normally we would make a Logical Directory for reading files at that location. But I have come up with a scenario where we need to read file from 6 different File locations.
    Is there any way that the same BPEL process can read file from 6 different locations.
    OR
    Do I need to make 6 BPEL processes to read file from 6 different locations.
    I am using Oracle SOA 10.1.3.4 and JDeveloper 10.1.3.4.
    Will really appreciate if someone can help in this regard.
    Thanks for the needful.
    Cheers,
    Varun

    Hi Oracler,
    Thanks for your reply.
    As suggested, the BPEL process with six different file adapters for six different directories and put them on each of the six branches of the pick activity. Will there be any performance oriented issues if you use six adapters for polling at 6 different locations??
    Also, the other solution that you have provided from this link Re: Can we have dynamic folder for Polling in BPEL works fine. One of a problem that I encounter while using this solution is that everytime you do any chnages in your BPEL process, the entries from bpel.xml are missing.
    Thanks for the needful.
    Cheers,
    Varun

  • File adapter SyncRead Operation adds "???" to first record of csv file

    Hi All,
    One interface is reading one CSV file (containing two fields only) using SyncRead Operation of File Adapter. But I found, when file adapter parsed the data it appends "???" to first field of the first record which cause further data validation in the process.
    Test.csv file
    123456,159357
    147258,987654
    Trace of the FileAdapter:
    <messages>
    <Invoke_FILE_Inbound_InputVariable>
    <part  name="Empty">
    <empty/>  
    </part>
    </Invoke_FILE_Inbound_InputVariable>
    <Invoke_FILE_Inbound_OutputVariable>
    <part  name="body">
    <Root-Element>
    <TestElements>
    <Emplid>���123456</Emplid>  
    <SupId>159357</SupId>
    </TestElements>
    <HRRespIDElements>
    <Emplid>147258</Emplid>  
    <SupId>987654</SupId>
    </TestElements>
    </Root-Element>
    </part>
    </Invoke_FILE_Inbound_OutputVariable>
    </messages>
    Can anyone help me to understand , what is reason? Or I missed anything.
    Thanks & Regards,
    Sharmistha

    Unfortunately, this is documented bahaviour (solution/workaround anyone?!):
    Elapsed Time Exceeds:
    Specify a time which, when exceeded, causes a new outgoing file to be created.
    Note:
    The Elapsed Time Exceeds batching criteria is evaluated and a new outgoing file is created, only when an invocation happens.
    For example, if you specify that elapsed time exceeds 15 seconds, then the first message that is received is not written out, even after 15 seconds, as batching conditions are not valid. If a second message is received, then batching conditions become valid for the first one, and an output file is created when the elapsed time exceeds 15 seconds.

  • File Adapter to read Zip file and send it as input to another webservice

    Hi,
    I have the below requirement:
    1. A service will generate 3 attachments and place it in a particular directory.
    2. SOA service has to pick those 3 files and send those files as input to another custom application which will email.
    Design :
    1. First SOA will create an archive file of those 3 attachements and then file adapter will poll for that zip file in that location and send that file as a whole to the custom application.
    Query:
    Now my question, is the above design feasible? If so, how to configure the file adapter to pass the file as input to that custom application?
    Kindly do the needful
    Thanks,
    Priya

    You can accomplish this via java embedding activity...Create a java embedding, which will create a zip file.. this java code is easy to implement..
    You can also do away with un-necessary polling file adapter.. and you can use "Synchronous File Read" operation of File Adapter.. For Sync Read, you'll have to pass the zip file name, which you can easily fetch from java embedding activity..
    Let me know, if this doesn't work.

  • 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

  • File Adapter read Operation

    I am using File adapter to read files from the given location.
    With this read operation it picks all the files at time.
    I want to configure File Adapters that it should pick one file at time from the given location with given polling interval.
    Can we do this with file Adapters in BPEL.
    I am using SOA Suite 11g.
    Thanks,
    Arun Jadhav

    Hi, in order to achieve that you need to set the "SingleThreadModel" and "MaxRaiseSize" properties for your file adapter.
    Edit the adapter's jca file and add the following properties:
    <property name="SingleThreadModel" value="true"/>
    <property name="MaxRaiseSize" value="1"/>
    You can set these properties also through jdeveloper, by opening composite.xml, selecting the adapter and then changing the properties through the properties panel.

  • File Adapter 7.11 - set operating system command line dynamically

    Hi,
    is there any way to set the "Operating System Command Line" in the file adapter as ASMA / dynamic attribute?
    I need to set  a command line exec depending on some XSL mapping values.
    thx
    holger

    hi,
    >>>is there any way to set the "Operating System Command Line" in the file adapter as ASMA / dynamic attribute?
    >>>I need to set a command line exec depending on some XSL mapping values.
    think about this approach:
    you put the XSL values into the filename after the real name of the file
    in the batch script you use those values in order to execute a dynamic exe command
    after processing you just change the name of the file in the script by removing the xsl values
    simple ? I think so
    Regards,
    Michal Krawczyk

  • Get the filename after an outbound file adapter operation

    Hello,
    I am calling an outbound file adapter operation in BPEL (10.1.3.3) - using a filename mask with a sequence (i.e. po_%SEQ%.xml). I would like to provide the filename created at run-time (i.e. po_123.xml) to my BPEL process so I can send this in an e-mail. Is this possible?
    Thanks in advance!
    Rod
    Message was edited by: Rod - fixed a typo
    Rod Tunnels

    Well, I took a different approach - which looks like it will work. Instead of letting the adapter decide the filename - I'm generating that in BPEL and passing that to the adapter using the header variable. So ... nevermind. ;-)

  • File adapter operating system command exit code

    Hello,
    If you call an operating system command in the file adapter, how is the exit code of the command handled? The documentation says nothing about this.
    If I call 'true', I expect the file adapter to succeed.
    If I call 'false', I expect the file adapter to fail.
    Hope someone can calrify.
    Best regards
    /Otto Frost

    Hi, Yes, you are rigth, it spawns a subprocess, that runs without control.
    In java you use Runtime.exec().
    It returns a process.
    process.exitValue() returns an int.
    The process is already used to terminate the process after timeout I suppose.
    You would like to be able to have the fileadapter succeed or fail depending on this exitValue.
    Depending on the command you execute, the exit code is different. RTFM on unix.
    You would like to define which codes should be treated as success, and which ones that should be treated as failure.
    true typically returns 0 and false not 0
    However, a comparison command could for example return 0 for equal, -1 if the frist argument is smaller and 1 if the first argument is larger.
    For the diff command, Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
    Thanks
    /Otto

  • Need  file adapter polling with read operation to be triggered by a BPEL without using synchronous read

    The scenario is:-
    Web Service Client -->input-->BPEL-->if input valid-->trigger file adapter with read operation--> receive file
    i am not able to stop the polling until it is required to trigger the polling.
    As soon as i deploy the composite the file adapter starts polling without waiting for input.
    Since i am using two receive activities, the second one which is suppose to receive file from file adapter is always showing pending state. (asynchronous callback)

    Hi there,
    IMHO the traditional read is used only as inbound operation, that means
    that it starts polling the input folder as soon as the composite gets
    deployed - which is the same you are experiencing.
    In your case you need an outbound operation that needs to be invoked at
    a certain moment. I don't know what are the reasons not to use sync
    read, but this is the only outbound read operation supported by the
    adapter. If you can not use the sync read, then you would have to design
    some custom solution where you call a web service or EJB for instance
    that reads the desired files.
    Another option I can think of, though have not use personally is using
    the adapters programatically in Java - take a look at this blog post as
    it seems related to this topic -
    https://technology.amis.nl/2012/01/22/using-the-oracle-weblogic-technology-adapters-with-custom-java-message-driven-bean-mdb-triggered-by-file-adapter-part-of-the-story/.
    Hope this helps,
    A.

  • File Adapter Write Operation inserts a new line at the end

    Hi,
    I am using the write operation in the File Adapter from BPEL Process. The data is written successfully to the file and file is also created in the location specified in the adapter wsdl. But in the file created, it creates a new line at the end of the file. This new line has to be avoided when writing data to a file.
    Has anyone faced this and solved this ?
    I am SOA 10.1.3.4.
    Cheers,
    - AR

    It is a bug in 10g and will be resolved in one of the versions of 11g.
    Cheers,
    -AR

  • DB Mutex Error with Outbound operation using Normal File adapter in HA env

    Hi All,
    I Have a simple process which picks data from a weblogic jms queue and writes it to a file. Each day this task is carried out once in a day and it writes approx 30k records to the file. the process is made singleton (singleton property on inbound JMS adapter) and used the HA file adapter to write to the file. This setup gave rise to lot of DB Mutex errors. To avoid the DB mutex issue i pointed the file adapter to use the Normal file adapter connection factory instead of the HA File adapter one used earlier. The surprising thing is even this gave rise to DB mutex errors.
    1. Am i missing something here,according to my understanding using a normal file adapter conn factory even in a HA environment should not be creating multiple locks on the file write.
    2. Can i change the standard DS used in the file adapter to a custom DS? will that solve the problem?
    I hope the scenario is clear. Following is the error extract seen at the process and log level
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'Write' failed due to: Unable to acquire mutex for interaction. Unable to acquire mutex for interaction. Unable to acquire lock on resource for "DatabaseMutex::acquireNoSave". ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    Thanks
    Nikhil

    We are getting the same error in 11.1.1.5 PS4 version also.Can you post the content of your .jca file here?
    Regards,
    Anuj

Maybe you are looking for

  • Please help me how to take the "Spot Color" in illustrator?

    Hi, Please help me how to take the "spot color in illustrator CS" using vb script (or) java script. Regards, Prabudass E.

  • Want to Read the a txt file and put the data into the table colums.

    I have a text file in which data is piped separated and I want to put the data in the table column. Eg. Text File Column First_name|Last_name|address|phone_number Database table: first_name ,last_name,address,phone_number It's very urgent. Thanks For

  • U430 power off while on battery

    Hi, I have had my Lenovo U430 touch for about a month now, and have noticed a problem with it. Sometimes when I leave my Lenovo u430 touch alone (with full battery), and sometimes it will just power off without me doing anything. It even happens occa

  • DNG 4.2 and Canon G9 raw CR2 problem

    I have been unsuccesful getting the 4.2 DNG to convert the CR2 Canon G9 files, getting an error message that the file type is not supported. Running Windows XP Home. Any ideas as to how I can fix this. Thanks, Jeff

  • Deleted Mail on the iPhone does not delete on .Mac

    I've noticed that when I delete mail on my iPone in my .Mac account that it does not show as deleted when going to webmail.mac.com. I see the messages still in my inbox AND in the trash. Any ideas why this is not synching? Thanks.