Skip Headers
Oracle® Application Server Integration InterConnect User's Guide
10g Release 2 (10.1.2)
B14069-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

5 Using Procedures in iStudio

This chapter describes using iStudio to create, invoke, and implement procedures. It contains the following topics:

Using Procedures

A procedure is an integration point used to model the request/reply paradigm. The request/reply paradigm is used for two-way context-sensitive communication. This communication can be either synchronous or asynchronous. In synchronous communication, the requesting application is blocked until it receives a reply. In asynchronous communication, the requesting application gets the reply asynchronously, it does not block-wait for the response after sending the request. This is a only modeling paradigm. No actual procedures are called. An application can either invoke a procedure to model sending a request and receiving a reply, or implement a procedure to model receiving a request and sending a reply. Similar to events, procedures have associated data. While an event is only associated with one data set, a procedure has two data sets, one for the request, IN data, and one for the reply, OUT data.


Note:

Synchronous request/reply can be used only if an application supports an outbound synchronous interface. Currently, only the OracleAS Integration InterConnect Database adapter qualifies for such support. For all other adapters, only asynchronous request/reply is available. This is a limitation of the protocols exposed by systems to communicate.

For example, if a Get_Address procedure is defined so that the request contains the social security number, SSN, for a person and the reply contains the address in four fields: Street, City, Zip, and State, then the procedure is defined as follows:

get Address Procedure
SSN IN
Street OUT
City OUT
Zip OUT
State OUT

The data structure that should be used for defining the common view is entirely dependent on the integration scenario, and the choice is left to the implementer. The only condition that the data structure should satisfy is that it should be a superset of all the application views for applications that will be publishing or subscribing to this event. The choices for common view data include:

Creating a Procedure

To create a procedure:

  1. From the File menu, select New, and then select Procedure. The Create Procedure dialog box is displayed.

    Create Procedure dialog box
    Description of the illustration 5_1.gif

  2. Enter the required information in the following fields:

    • Business Object Name: The name of the category to which the procedure belongs. Select BO name from the list.

    • Procedure Name: The name of the procedure. Only alphanumeric characters can be used.

    • OAI/V1: The owner and version number of the procedure. This field cannot be edited.

  3. Add or import attributes to the procedure.

  4. Click Save.

Invoking and Implementing a Procedure

Procedures are used to model the request/reply messaging paradigm. The requesting application invokes the procedure. The replying application implements the procedure.

Invoking a Procedure

Use the Invoke Wizard to invoke a procedure in iStudio. To start the Invoke Wizard:

  1. In the Design Navigation list, select expand the Application node.

  2. Right-click Invoke Procedures, and select New. The Invoke Wizard is displayed.

    Invoke Wizard - Select a Procedure dialog box
    Description of the illustration 5_2_1.gif

  3. Specify the information for the following fields:

    • Application: The name of the source application is selected by default.

    • Message Type: The mode of communication between OracleAS Integration InterConnect and the application. Select one of the following message types:

      • Database: OracleAS Integration InterConnect communicates with the application using the database.

      • Generic: OracleAS Integration InterConnect communicates with the application using a user-defined bridge.

      • XML: OracleAS Integration InterConnect communicates with the application using XML data described through a data type definition (DTD) or XML Schema Definitions (XSD) by using the FTP, SMTP, HTTP, and MQSeries adapters.

      • D3L: OracleAS Integration InterConnect communicates with the application using non-XML data formats described through D3L using the FTP, SMTP, HTTP, and MQSeries adapters.

      • AQ: OracleAS Integration InterConnect communicates with the application through Oracle Advanced Queues by using the Advanced Queue adapter. The payload can be RAW XML or Oracle Objects where fields may be XML.

      • JCA: OracleAS Integration InterConnect communicates with the application using the J2CA adapter.


        Note:

        Other choices will be visible if you have purchased and installed additional adapters for Oracle Applications, SAP, Peoplesoft, and Siebel.

  4. Select the procedure to invoke in the Select a Procedure dialog box.

  5. Click Next in the Select a Procedure dialog box. The Define Application View dialog box is displayed. Invoke Wizard - Define Application View dialog box
    Description of the illustration 5_2_1-2.gif

    Once a procedure is selected to invoke, the application view is defined. The application view dialog box is initially an empty table.

  6. Define the attributes by using the Add button, or import the definitions from a database or an API Repository by using the Import button.

  7. Click Returned In Args to specify IN arguments to be returned. The Please Select In Arguments dialog box is displayed.

    Please Select In Arguments dialog box
    Description of the illustration 5_2_1-3.gif

  8. Select the input and output arguments to be returned. Use the left mouse button to select multiple arguments. The input arguments which are not user-defined are displayed for selection.

  9. Click OK to return to the Define Application View dialog box.

  10. Click Next. The Define Mapping IN Arguments dialog box is displayed.

    Mapping arguments involves copying the individual fields or simple shape-change transformations.

  11. Click New to define mappings. The Mapping Parameters dialog box is displayed.

    Mapping Parameters dialog box is
    Description of the illustration mappingparameters.gif

    To map fields in the application view to fields in the common view, use a transform. To use a transform to map fields,

    1. Select fields to map from in the application view. Use the left mouse button to select multiple fields in a view.

    2. Select the transformation, for example, ConcatFields.

    3. Select the fields to map to in the common view. Use the left mouse button to select multiple fields in a view.

    4. Click Apply to confirm selection and continue specifying additional mappings.

    5. When all mappings have been made, click OK.

  12. Click Next. The Define Mapping IN Arguments dialog box is displayed.

    Mapping arguments involves copying the individual fields or simple shape-change transformations. Use this dialog box to map the common view return arguments to the application view return arguments.

    Define Mapping IN Arguments dialog box
    Description of the illustration 5_2_1-4a.gif

  13. Click Next. The Define Mapping OUT Arguments dialog box is displayed.

    Define Mapping OUT Arguments dialog box
    Description of the illustration 5_2_1-4.gif

  14. Click New to define mappings.


    See Also:

    Step 5

  15. Click Finish.

Implementing a Procedure

Implement a procedure in iStudio using the Implement Wizard. To start the Implement Wizard:

  1. In the Design navigation list, expand the Application node.

  2. Right-click Implemented Procedures, and select New. The Implement Wizard is displayed.

    Implement Wizard - Select a Procedure dialog box
    Description of the illustration 5_2_2.gif

    Use this dialog box to select a procedure to implement.

  3. Specify information for the following fields:

    • Application: The name of the application selected in the navigation list, which invokes the procedure, appears selected by default. Select an application from the list.

    • Message Type: This field specifies the mode of communication between OracleAS Integration InterConnect and the application. Select from the following message types:

      • Database: OracleAS Integration InterConnect communicates with the application by using the database.

      • Generic: OracleAS Integration InterConnect communicates with the application by using a user-defined bridge.

      • XML: OracleAS Integration InterConnect communicates with the application using XML data described through a DTD or XSD by using the FTP, SMTP, HTTP, and MQSeries adapters.

      • AQ: OracleAS Integration InterConnect communicates with the application through Oracle Advanced Queues by using the Advanced Queue adapter. The payload can be Oracle Objects where fields may be XML or RAW XML.

      • D3L: The adapter communicates with the application by using D3L.

      • JCA: OracleAS Integration InterConnect communicates with the application by using the J2CA adapter.

  4. Select the procedure to invoke.

  5. Click Next. The Define Application View dialog box is displayed.

    Implement Wizard - Define Application View dialog box
    Description of the illustration 5_2-2.gif

    Initially, this dialog box is an empty table. Attributes can be defined by using Add. Attribute definitions can be imported from a database or an API Repository by using Import.

  6. Click Cross Reference to populate cross-reference tables.

  7. Click Next. The Define Mapping IN Arguments dialog box is displayed.

    Mapping may involve copying individual fields, or simple shape-change transformations.

    Implement Wizard - Define Mapping IN Arguments dialog box
    Description of the illustration 5_2-3.gif

  8. Click New to define IN mappings.


    See Also:

    Step 5

  9. Click Next. The Define Mapping OUT Arguments dialog box is displayed.

  10. Click New to define OUT mappings.


    See Also:

    Step 5

  11. Click Next. The Define Stored Procedure dialog box is displayed. Invoke Wizard - Define Stored Procedure dialog box
    Description of the illustration 5_2-4.gif

    If the message type selected was database, then the data is received by a stored procedure. In this stored procedure, the action performed when the values are returned to the application can be specified. The adapter invokes the stored procedure at run time with the corresponding data.

    The following arguments will be returned:

    • All OUT arguments.

    • All IN arguments specified to be returned as part of the reply.

  12. Select a generated procedure from the SQL Code For list.

  13. Click Finish.