Synchronous read capability FileAdapter

I need a way to read a file by invoking from a process, I can't have a FileAdapter poll a directory for a file, as I have several other process that I need to coordinate. The client needs to start the instance and then invoke.
I was posted to a thread earlier with a workaround but I have not been able to get it to work correctly. If anyone has done this and can post a simple .wsdl that I can learn from that would be great.

This feature is now part of the product patch 1. You can download it from OTN website.
Hope this will help.
- Rakesh

Similar Messages

  • 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.

  • Synchronous read file and status update

    Hi,
    CSV file to be loaded into the database table. ASP used as front end and ESB should be used for backend processing!
    A csv file is placed in a fileshare by an asp page. After that a button is clicked on the asp page which inserts a record into a database table(A) with the file details. There is a flag field in the table which will be set to 'F' initially.
    Now there should be an esb service which will be polling for any new records inserted into the database table(A).
    Once it finds any new record, the esb service should update the flag status to 'RF' from 'F' and read the records in the csv file(I think synchronous read file should be used inthe file adapter) and insert them into a database table(B). The flag field is updated to 'RF' so that the asp page informs the user that the csv file is being inserted into the table(B).
    After all the records are inserted, the esb service should once again update the flag in table(A) to 'Y' from 'RF' so that the asp page will indicate the user that the csv file is loaded into the data base table.
    The challenges that I have here are:
    1) I need to have the ESB service with such a sequence of execution that updates the table(A) at each stage so that the asp page can display the status to the USER.
    2) The csv file size can be huge. It can contain as many as 100 thousand records with over 50 fields in each record. I will have to probably debatch the file. Once we debatch, seperate instance would be created for each batch. Now we should see to that flag in table(A) is updated to 'Y' only when the last batch of the records are processed.
    I am using jdev10134 and oracle SOA suite ESB10134
    Someone please advice on how to go ahead.
    Cheers,
    RV

    Hi,
    CSV file to be loaded into the database table. ASP used as front end and ESB should be used for backend processing!
    A csv file is placed in a fileshare by an asp page. After that a button is clicked on the asp page which inserts a record into a database table(A) with the file details. There is a flag field in the table which will be set to 'F' initially.
    Now there should be an esb service which will be polling for any new records inserted into the database table(A).
    Once it finds any new record, the esb service should update the flag status to 'RF' from 'F' and read the records in the csv file(I think synchronous read file should be used inthe file adapter) and insert them into a database table(B). The flag field is updated to 'RF' so that the asp page informs the user that the csv file is being inserted into the table(B).
    After all the records are inserted, the esb service should once again update the flag in table(A) to 'Y' from 'RF' so that the asp page will indicate the user that the csv file is loaded into the data base table.
    The challenges that I have here are:
    1) I need to have the ESB service with such a sequence of execution that updates the table(A) at each stage so that the asp page can display the status to the USER.
    2) The csv file size can be huge. It can contain as many as 100 thousand records with over 50 fields in each record. I will have to probably debatch the file. Once we debatch, seperate instance would be created for each batch. Now we should see to that flag in table(A) is updated to 'Y' only when the last batch of the records are processed.
    I am using jdev10134 and oracle SOA suite ESB10134
    Someone please advice on how to go ahead.
    Cheers,
    RV

  • Passing file name dynamically in Synchronous read operation of FTP adapter in OSB

    Hi,
    We are implementing the integration in OSB 11g and using FTP JCA adapters to check if the file exists in the FTP location or not. We are using Synchronous read operation of FTP adapters. We need to pass the file name dynamically at run time. In the JCA file we can hard code the file name. How that file name can be taken dynamically using OSB.
    Regards,
    Sharmistha

    Hi Sandeep,
    This is possible.
    For creating filenames dynamically for your sender, you will have to crate a variable name ( eg: %VAR%) as you file name and then you will have to give the name of your file under variable substitution. Just check this link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    In the case of receiver file adapaters, you have 5 options for file creation like,
    1.Create
    2.Append
    3. Add time stamp
    4.Add Counter
    5. Add Message ID
    You can choose any of these options or you can do it dynamically from you payload. Just check out this help link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Hope this helps

  • 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

  • Waiting for read from 'fileAdapter'. Asynchronous callback.

    I am trying to implement a mid process receive activity for receiving from a file adapter.
    I have used correlation set for the first receive activity which receives input from a web client and second receive activity receives from adapter.
    the problem is that in the Flow Trace when the second receive activity keeps showing pending and waiting for read from 'fileAdapter'. Aynchronous callback.
    Any help would be appreciated

    Hello,
    I have got the same problem. I tried set-up CorrelatonSet, but I could not find solution ... Receive activity is still waiting for dequeue from AQ (and what's more - message is removed from queue by AQ adapter immediately after BPEL process is deployed. Receive acitivity hasn't information about this dequeue - it's still waiting).
    Could you pls. write more information???
    Many thanks,
    martin

  • 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 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

  • Read/Write Adobe Reader Capability for iPad

    In my work, I need to be able to write, (make changes) to a PDF file. I use Adobe Reader for this. Does the iPad support use of a read/write version of Adobe Reader? Thank you.

    The capability you are referring to is a function of Adobe Acrobat, not Adobe Reader. On a laptop/desktop Acrobat to convert any file in any native application on that machine (Web, Word, Excel, etc.) into PDF format by "printing" to the Adobe PDF "printer".
    There is no such on the iPad. Previously created PDF documents may be transferred from your laptop to the iPad and viewed on it, and you can also annotate that transferred PDF document (using an app called iAnnotate), but in general you cannot CREATE a PDF document the way you did on your laptop. The only exceptions I can think of are the Apple apps (Pages, Numbers, and Keynote) which allow you to export their files in PDF format. But, as an example, if you want to view a web page and "print" it to a PDF file, no can do.

  • How to synchronously read (Not pooling) the messages from the queue

    Hi,
    I want to read all the messages synchronously, how do do this?
    Thanks,
    --Khaleel                                                                                                                                                                                       

    This is not possible. SOA technology is based on services that are loosely coupled and run on their own.
    If you want to implement this is to create one monolithic process that retrieves each time a message and process that.
    Or create a singleton process, a process that runs on the server but can only exists as a single instance. This process gets a message, calls the process to perfrorm the action, wait on result, and process the next message.
    Marc

  • Synchronous writes using FileAdapter

    Hi all,
    I'm new to this SOA and BPEL stuff so I'm probably missing something obvious.
    I'm writing out a file using a File adapter. This works fine.
    The problem is when calling the invoke it invokes the FileAdapter as an async process. After the file is written there is a second(non soa/bpel) background process that is run to do some other processing on the file. However, with it being asynchronous we run into a situation where the second process can begin processing a file without it being completely written out yet.
    How do we go about preventing this situation or at the very least is there a way to make the file adapter invoke synchronous?
    Thanks!

    there is a way to activate the processing of a file using a trigger file;
    you should create the trigger file only after completion of the creation of the main file
    consumption of the main file is activated by the trigger file
    hope it helps

  • 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.

  • FTP Adapter -- synchronous read -- native format

    You would think an FTP connection would be simple. While I have done a bunch of "puts" without difficulty; I can't get a sync read to work AT ALL.
    What the heck is wrong with this mess anyway? This should be simple.
    Here is my WSDL .. what is wrong here?
    <wsdl:definitions
         name="getRawFile"
         targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/caseList/caseList/getRawFile"
         xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/caseList/caseList/getRawFile"
         xmlns:imp1="http://TargetNamespace.com/getRawFile"
         xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
        >
      <plt:partnerLinkType name="SynchRead_plt" >
        <plt:role name="SynchRead_role" >
          <plt:portType name="tns:SynchRead_ptt" />
        </plt:role>
      </plt:partnerLinkType>
        <wsdl:types>
          <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/caseList/caseList/getRawFile"
                  xmlns="http://www.w3.org/2001/XMLSchema" >
            <import namespace="http://TargetNamespace.com/getRawFile" schemaLocation="xsd/F17QBA1_1.xsd" />
          <element name="empty"><complexType/></element>
          </schema>
        </wsdl:types>
        <wsdl:message name="Empty_msg">
            <wsdl:part name="Empty" element="tns:empty"/>
        </wsdl:message>
        <wsdl:message name="SynchRead_msg">
            <wsdl:part name="body" element="imp1:HUDCaseList"/>
        </wsdl:message>
        <wsdl:portType name="SynchRead_ptt">
            <wsdl:operation name="SynchRead">
                <wsdl:input message="tns:Empty_msg"/>
                <wsdl:output message="tns:SynchRead_msg"/>
            </wsdl:operation>
        </wsdl:portType>
    </wsdl:definitions>
    Here is my jca
    <adapter-config name="getRawFile" adapter="FTP Adapter" wsdlLocation="getRawFile.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
        <connection-factory location="eis/Ftp/FtpAdapterP011"/>
      <endpoint-interaction portType="SynchRead_ptt" operation="SynchRead">
        <interaction-spec className="oracle.tip.adapter.ftp.outbound.FTPReadInteractionSpec">
          <property name="DeleteFile" value="true"/>
          <property name="PhysicalDirectory" value="/opt/oracle/work/domains/dev_total_vr_domain/TOTAL"/>
          <property name="FileName" value="F17QBA1"/>
          <property name="FileType" value="ascii"/>
        </interaction-spec>
      </endpoint-interaction>
    </adapter-config>

    The answer is -- PhysicalDirectory refers to the directory where you get the file, not where it is stored.

  • Synchrone read file interface ?

    Hi Guys,
    I need to build a webservice that returns a .jpg picture as an attachment to the SOAP messgae.
    I have build a webservice to java proxy interface. But i*m stuck, because the MessageAttachment is not working on PI 7.11 yet.
    Any of you have a good idea of how to implement a webservice that returns a binary file on PI ? it should be done as a syncrhon interface.
    I would hate to ask our microsoft gyus to make the webservice for me  .-)
    Thanks
          Jens

    Hi, you can return the image as base64 binary in the message payload. Define a field of type xsd:base64Binary and a field for filename. The receiver can decode the content and save the file, or as in your case attach to a SOAP message.
    Martin

  • Synchronous File Read on Invoke Problem

    I am trying to invoke file adapter to read the file once(Synchronous File Read) as described in Bpeltechadapter guide.
    Read about Synchronous File Reading Capability here download.oracle.com/otndocs/products/bpel/bpeltechadp.pdf
    Also read this: Re: Help! Three questions about FileAdapater. .
    I get this process generation failed when i try to build it. The Empty_msg in inputvariable of invoke works but problem is with Charges_msg in output variable.
    I am sure its something to do with ns but not getting it to work.
    PL_FileInbound.WSDL code*********************
    <definitions
    name="PL_FileInbound"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/file/PL_FileInbound/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/file/PL_FileInbound/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:imp1="http://TargetNamespace.com/FA_ReadFile"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/file/"
    >
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/file/" location="fileAdapterOutboundHeader.wsdl"/>
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/file/PL_FileInbound/">
    <import namespace="http://TargetNamespace.com/FA_ReadFile" schemaLocation="PipeDelimitedNIX_Charges.xsd" />
    <element name="empty"><complexType/></element>
    </schema>
    </types>
    <message name="Chargesheet_msg">
    <part name="Chargesheet" element="impl:Chargesheet"/>
    </message>
    <message name="Empty_msg">
    <part name="Empty" element="tns:empty"/>
    </message>
    <portType name="SynchronousRead_ptt">
    <operation name="SynchronousRead">
    <input message="tns:Empty_msg"/>
    <output message="tns:Chargesheet_msg"/>
    </operation>
    </portType>
    <binding name="SynchronousRead_binding" type="tns:SynchronousRead_ptt">
    <jca:binding />
    <operation name="SynchronousRead">
    <jca:operation
    PhysicalDirectory="C:\Incoming"
    InteractionSpec="oracle.tip.adapter.file.outbound.FileReadInteractionSpec"
    FileName="abcl.txt"
    DeleteFile="false"
    OpaqueSchema="false">
    </jca:operation>
    <input>
    <jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
    </input>
    </operation>
    </binding>
    <service name="PL_FileInbound">
    <port name="SynchronousRead_pt" binding="tns:SynchronousRead_binding">
    <jca:address location="eis/FileAdapter" />
    </port>
    </service>
    <plt:partnerLinkType name="Read_plt" >
    <plt:role name="Read_role" >
    <plt:portType name="tns:SynchronousRead_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    BPEL Source ******************************************
    <!--
    // Oracle JDeveloper BPEL Designer
    // Created: Sat Apr 29 16:52:43 CDT 2006
    // Author: dpatel
    // Purpose: Synchronous BPEL Process
    -->
    <process name="SynchronousFileRead"
    targetNamespace="http://xmlns.oracle.com/SynchronousFileRead"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/PL_FileInbound/"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:client="http://xmlns.oracle.com/SynchronousFileRead"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <!-- ================================================================= -->
    <!-- PARTNERLINKS -->
    <!-- List of services participating in this BPEL process -->
    <!-- ================================================================= -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:SynchronousFileRead"
    myRole="SynchronousFileReadProvider"/>
    <partnerLink myRole="Read_role" name="PL_FileInbound"
    partnerRole="Read_role" partnerLinkType="ns1:Read_plt"/>
    </partnerLinks>
    <!-- ================================================================= -->
    <!-- VARIABLES -->
    <!-- List of messages and XML documents used within this BPEL process -->
    <!-- ================================================================= -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable"
    messageType="client:SynchronousFileReadRequestMessage"/>
    <!--
    Reference to the message that will be returned to the requester
    -->
    <variable name="outputVariable"
    messageType="client:SynchronousFileReadResponseMessage"/>
    <variable name="Invoke_1_SynchronousRead_InputVariable"
    messageType="ns1:Empty_msg"/>
    <variable name="Invoke_1_SynchronousRead_OutputVariable"
    messageType="ns1:Chargesheet_msg"/>
    </variables>
    <!-- ================================================================= -->
    <!-- ORCHESTRATION LOGIC -->
    <!-- Set of activities coordinating the flow of messages across the -->
    <!-- services integrated within this business process -->
    <!-- ================================================================= -->
    <sequence name="main">
    <!-- Receive input from requestor.
    Note: This maps to operation defined in SynchronousFileRead.wsdl
    -->
    <receive name="receiveInput" partnerLink="client"
    portType="client:SynchronousFileRead" operation="process"
    variable="inputVariable" createInstance="yes"/>
    <!-- Generate reply to synchronous request -->
    <invoke name="Invoke_1" partnerLink="PL_FileInbound"
    portType="ns1:SynchronousRead_ptt" operation="SynchronousRead"
    inputVariable="Invoke_1_SynchronousRead_InputVariable"
    outputVariable="Invoke_1_SynchronousRead_OutputVariable"/>
    <!--outputVariable="Invoke_1_SynchronousRead_OutputVariable"-->
    <reply name="replyOutput" partnerLink="client"
    portType="client:SynchronousFileRead" operation="process"
    variable="outputVariable"/>
    </sequence>
    </process>
    I would really appreciate your help here.

    I face the same issue and I have given all permissions to the folder for OS user.
    Because of this error my server is not starting up . Is there any way I can undeploy this composite to get my server running.
    I cant do this from EM because SOA server is failing to start up.
    I have tried removing it from $DOMAIN_HOME/deployed-composites but still when i try restarting the soa server the composite comes up there. Do we need to delete the entry some where else too. Kindly help.
    Thanks,
    Sri.

Maybe you are looking for

  • How to get the namae of the month given its respective number

    Hi,     I am Asia and am a new member to this site. Please let me know if any function module to get the name of the month given its respective number. Thanks & Regards, Asia

  • Upgraded to 10.6.7 and now having various issues with Appleworks Drawing program.

    HELP...I just upgraded to 10.6.7 and now my Appleworks drawing program is slow - beach balls all the time, I can not copy into other programs, copy and paste messes with the formatting, fills and lines disappear, Fonts are messed up when copied...ON

  • Urgent : Workflow with two steps

    Hi All, i am doin a workflow in which i am using a activity step first to display the PO/SO and then a user decision step for either approving or rejecting it. bt once the activity step (work item in SAP inbox) is executed, the workflow is terminated

  • Sign applet problem

    Hi, I am following the 10 steps by irene to sign the applet. When I go to number 10, if I want to use self-signed certificate, then i need to import self-signed certificate into the cacerts keystore. However, I don't want my clients to do this thing

  • IPod touch w/2.0.1 update-keyboard and system slow to respond after update

    The keyboard is slow to open and lags severely when typing inside the notes app. Overall system performance is now slower since update to 2.0.1. namely lag when an app is touched to open it.