Skip Headers
Oracle® Application Server Integration InterConnect User's Guide
10g Release 2 (10.1.2)
Part No. B14069-01
  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:

5.1 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 (the requesting application is blocking until it receives a reply) or asynchronous (the requesting application gets the reply ansynchronously, it does not block-wait for the response after sending the request). This is a modeling paradigm only, 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, a procedure has 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 only be used if an application supports an outbound synchronous interface. Currently, only the Oracle 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, 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 implementor. The only condition that 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:

5.1.1 Creating a Procedure

To create a procedure:

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

    Description of 5.1.gif follows
    Description of the illustration 5.1.gif

  2. Enter 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 alpha-numeric 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.

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

5.2.1 Invoking a Procedure

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

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

  2. Select and expand the Application node to display the Invoked Procedures leaf.

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

    Description of 5.2.1.gif follows
    Description of the illustration 5.2.1.gif

  4. Enter the following information in the fields:

    • Application: the name of the invoking 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) using the FTP, SMTP, HTTP, MQ Series, or user-defined 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.


        Note:

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

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

  5. Select the procedure to invoke in the Select a Procedure box.

  6. Click Next in the Select a Procedure page. The Define Application View page is displayed. Description of 5.2.1-2.gif follows
    Description of the illustration 5.2.1-2.gif

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

  7. Define the attributes using Add or import the definitions from a database or an API Repository using Import.

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

    Description of 5.2.1-3.gif follows
    Description of the illustration 5.2.1-3.gif

  9. Select the input and output arguments to be returned. Use the left mouse button to select multiple arguments. Only non user-defined input arguments are shown for selection.

  10. Click OK to return to the Define Application View page.

  11. Click Next. The Define Mapping IN Arguments Page is displayed.

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

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

    Description of mappingparameters.gif follows
    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.

  13. Click Next. The Define Mapping OUT Arguments Page is displayed.

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

    Description of 5.2.1-4.gif follows
    Description of the illustration 5.2.1-4.gif

  14. Click New to define mappings.


    See Also:

    Step 6

  15. Click Finish.

5.2.2 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. Select and expand the Application node to display the Implemented Procedures leaf. Right-click Implemented Procedures, and select New. The Implement Wizard is displayed.

    Description of 5.2.2.gif follows
    Description of the illustration 5.2.2.gif

    Use this page to select a procedure to implement.

  2. Select 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 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 DTD using the FTP, SMTP, HTTP, MQ Series, or user-defined adapters.

      • AQ: OracleAS Integration InterConnect communicates with the application through Oracle Advanced Queues 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 using D3L.

  3. Select the procedure to invoke.

  4. Click Next. The Define Application View page is displayed.

    Description of 5.2-2.gif follows
    Description of the illustration 5.2-2.gif

    Initially, this page 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.

  5. Click Cross Reference... to populate cross reference tables.

  6. Click Next. The Define Mapping IN Arguments page is displayed.

    Mapping may involve copying individual fields, or simple shape-change transformations. After clicking next on the Define Application View page, the Define Mapping IN Arguments page is displayed.

    Description of 5.2-3.gif follows
    Description of the illustration 5.2-3.gif

  7. Click New to define IN mappings.


    See Also:

    Step 6

  8. Click Next. The Define Mapping OUT Arguments page is displayed.

  9. Click New to define OUT mappings.


    See Also:

    Step 6

  10. Click Next. The Define Stored Procedure page is displayed. Description of 5.2-4.gif follows
    Description of the illustration 5.2-4.gif

    If the message type selected was database, 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 runtime 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.

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

  12. Click Finish.