7.10 Configuring Oracle Reports to Communicate with Oracle BPEL Process Manager

Oracle Reports exposes web service named RWWebService. For more information about this web service, see Chapter 18, "Using the Oracle Reports Web Service". Oracle Reports web services, which are synchronous in nature, can be used in a BPEL process as a Partner link.

To invoke an Oracle Reports web service asynchronously in a BPEL process, do the following:

  • Create an intermediate asynchronous BPEL process that uses the synchronous Oracle Reports web service and provides an interface to the caller for making a callback.

  • Deploy this intermediate asynchronous BPEL process as a service in the SOA suite, which can be used as a Partner link.

You can access the WSDL of the Oracle Reports web service at the following location:

http://yourwebserver:port/reports/rwwebservice?

WSDL contains information about the different ways of invoking RWWebservice. You can access the XSD file at the following location: http://yourwebserver:port/reports/rwwebservice?xsd=1

You can save the XSD file on your local machine and use it when creating a BPEL process.

7.10.1 Using RWWebservice to Submit Jobs to the Reports Server

To submit jobs to the Oracle Reports server using RWWebService,do the following:

  1. Install Oracle JDeveloper. For more information, see Oracle Fusion Middleware Installation Guide for Oracle JDeveloper.

  2. Install OracleAS SOA.

  3. Start the SOA suite.

  4. Create a connection from Oracle JDeveloper to the SOA suite.

  5. Create a new application.

  6. Create a new asynchronous BPEL process project and use the RWWebservice.xsd file to define the input and output parameters of the BPEL process.

  7. Create a Partner link that refers to the RWWebService WSDL:

    • When prompted by Oracle JDeveloper, click Yes to create Partner link types.

    • Select Partner Role.

  8. Create a scope in your process.

  9. Within the scope, create an Invoke activity and use it to invoke the runJob operation on the RWWebService Partner link.

  10. Create input and output variables automatically. The input parameter provides input to the runJob operation of RWWebService, and the output parameter contains the output of the runJob operation.

  11. Within the scope, before the Invoke activity, create an Assign activity:

    • In this Assign activity, map the user input parameters to the parameters that RWWebService requires.

    • Set Param0 = reports job command (string).

    • Set Param1 = true (boolean, specifying that the job submission must be synchronous).

  12. Within the scope, after the Invoke activity, create an Assign activity. In this Assign activity, map the output variable of the Invoke activity to the result variable that is written back to the client.

  13. Compile and deploy the BPEL process on the SOA suite.

  14. Use the Oracle BPEL Process Manager console to run the BPEL process.

You can use this BPEL process in another BPEL process and submit jobs to the reports server asynchronously from a BPEL process.

7.10.2 Submitting Jobs to the Reports Server from a BPEL Process Asynchronously

To submit jobs to the Oracle Reports server from a BPEL process asynchronously, do the following:

  1. Create a new asynchronous BPEL process project and use the RWWebservice.xsd file to define the input and output parameters of the BPEL process.

  2. Create a Partner link that refers to the WSDL of the newly created BPEL process:

    • When prompted by Oracle JDeveloper, click Yes to create Partner link types.

    • Select Partner Role.

  3. Create a scope in your process.

  4. Within the scope, create an Invoke activity and use it to invoke the runJob operation on the intermediate process Partner link.

  5. Create input variables automatically. The input parameter provides input to the runJob operation of the intermediate BPEL process.

  6. Create a Receive activity to receive the callback from the intermediate process.

  7. Within the scope, before the Invoke activity, create an Assign activity:

    • In this Assign activity, map the user input parameters to the parameters that the intermediate BPEL process requires.

    • Set Param0 = reports job command (string).

    • Set Param1 = true (boolean, specifying that the job submission must be synchronous).

  8. Within the scope, after the Invoke activity, create a Receive activity.

  9. Create input variables automatically. The input parameter receives a response from the runJobresponse operation of the intermediate BPEL process.

  10. Within the scope, after the Invoke activity, create an Assign activity. In this Assign activity, map the input variable of the Receive activity to the result variable that is written back to the client.

  11. Compile and deploy the BPEL process on the SOA suite.

  12. Use the Oracle BPEL Process Manager console to run the BPEL process.