6 Replies Latest reply: Sep 23, 2013 7:30 AM by 1041314 RSS

    Reading file and dump data into database using BPEL process

    1041314

      I have to read CSV files and insert data into database.. To achieve this, I have created asynchronous bpel process. Added Filed Adapter and associated it with Receive activity.. Added DB adapter and associated with Invoke activity. Total two receive activity are available in  process, when tried to Test through EM, only first receive activity is completed, and waiting on second receive activity. Please suggest how to proceed with..

       

      Thanks, Manoj.

        • 1. Re: Reading file and dump data into database using BPEL process
          DeepakDabbiru

          Hi Manoj,

           

          There is no need of two assign activities in this case.

          Rather than using the Asynchronous bpel process, please select the option of 'Define Service Later' (from the drop down list) while creating the BPEL process .

          Then, create the Read File adapter on the Exposed Services of the composite and then read the file into BPEL using the receive activity.

          Ofcorse you need to manually wire the services in the composite.

          Then, create the DB adapter on the External references of the composite and then using the Invoke activity send the data to the DB.

           

          This should resolve the issue.

           

          Thanks,

          Deepak.

          • 2. Re: Reading file and dump data into database using BPEL process
            1041314

            Deepak, thank for your reply.. As per your suggestion I created BPEL composite with

            template "Define Service Later". I followed below steps, please correct me if I am wrong/missing anything. Your help is highly appreciated...

            Step 1-

             

            Created File adapter and corresponding Receive Activity (checkbox create instance is checked) with input variable.

            Step 2 - Then in composite.xml, dragged the

             

            web service under "Exposed Services" and linked the web service with Bpel process.

            Step 3 - Opened .bpel file and added the DB adapter with corresponding Invoke activity, created input variable. Web service is created of Type "Service" with existing WSDL(first option aginst WSDL URL).

             

            and added Assign activity between receive and invoke activities.

             

            Deployed the composite to server, when triedTest it

             

            manually through EM, it is promting for input like "subElmArray Size", then I entered value as 1 with corresponding values for two elements and click on Test We Service button.. Ptocess is completing in error. The error is

            Error Message:

             

            service:80020
            Sep 20, 2013 11:09:49 AM

             

            Non Recoverable System Fault :


            Correlation definition not registered. The correlation set definition for operation Read, process default/FileUpload18!1.0*soa_3feb622a-f47e-4a53-8051-855f0bf93715/FileUpload18, is not registered with the server. The correlation set was not defined in the process. Redeploy the process to the containe

            • 3. Re: Reading file and dump data into database using BPEL process
              DeepakDabbiru

              Hi Manoj,

               

              There is no need of Step 2 which u mentioned above.I donot find any need for webservice again?

              The process will get initiated by the CSV file and then using the transformation activity you can put that into the DB.

              There should be no way where you can manually test this by giving an input. All you can do to test is by placing the file in the folder which you mentioned while configuring the file adapter.

               

              You just need to have the composite as below:

              ReadCSVFile ---> BPEL --> DB adapter

               

              And in your BPEL process:

              Recieve Activity --> Transformation --> Invoke Activity

               

              Try to work out on few samples mentioned at oracle site and go through the below URL:

              Using the File Adapter's Read Functionality

               

              Thanks,

              Deepak.

              • 4. Re: Reading file and dump data into database using BPEL process
                1041314

                thanks Deepak, I am going through the tutorials, will update you my test results...

                 

                Thanks,

                Manoj

                • 5. Re: Reading file and dump data into database using BPEL process
                  1041314

                  Deepak, thanks for all your help... I am able to to develop BPEL process which read csv files and dump into database.. The only issue is this is working fine only for single record in csv file, for multiple record it's not working...

                   

                   

                  Thanks,

                  Manoj

                  • 6. Re: Reading file and dump data into database using BPEL process
                    1041314

                    When tried by adding For Each Activity, it's working fine.. Thanks Deepak for helping me during my initial kick up..

                     

                    Thanks,

                    Manoj