JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Adapter for SQL Server Tutorials     Java CAPS Documentation
search filter icon
search icon

Document Information

Java CAPS Adapter for SQL Server Tutorials

About the Adapter for SQL Server Sample Projects

Sample Input Trigger Files and Output Files

Sample Project Data

Operations Used in the SQL Server Sample Projects

About the Java CAPS Business Process Manager Project

Associating Business Process Manager Operators

Deploying JCD- Based Operations in the Business Process Manager

About the Java Collaboration Definition Sample Project

Importing the Sample Projects

To Import the Sample Project

Running the SQL Script

Creating the Java Collaboration Definition Project for the Java CAPS Adapter for SQL Server

Creating a New Project

Create a Project

Creating the OTDs

Create the SQL Server Database OTD

Create the Inbound and Outbound DTD OTDs

Creating the Collaboration Definitions (Java)

Create the jcdDelete Collaboration Definition

Using the Java Collaboration Editor to Create Business Rules

Creating the Business Rules for the jcdDelete Collaboration

Create the jcdDelete Collaboration Business Rules

jcdDelete Collaboration Java Code

Creating the Business Rules for the jcdInsert Collaboration

Create the jcdInsert Collaboration Business Rules

jcdInsert Collaboration Java Code

Creating the Business Rules for the jcdPsSelect Collaboration

Using the Collaboration Editor's Java Source Editor

Create the jcdPsSelect Collaboration Business Rules

Creating the Business Rules for the jcdTableSelect Collaboration

Create the jcdTableSelect Collaboration Business Rules

jcdTableSelect Collaboration Java Code

Creating the Business Rules for the jcdUpdate Collaboration

Create the jcdUpdate Collaboration Business Rules

jcdUpdate Collaboration Java Code

Next Steps

Creating the Connectivity Maps

Adding Connectivity Maps to a Project

Add the Connectivity Maps to the Project

Populating and Binding the Connectivity Maps Using the Connectivity Map Generator

Populate the Connectivity Maps Using the Connectivity Map Generator.

Creating an Environment

Create the Environment

Configuring the Adapter Properties

Configuring the Connectivity Map Properties

Configure the Connectivity Map Properties

File1 Inbound Adapter Properties

File2 Outbound Adapter Properties

SQL1 Outbound Adapter Properties

Configuring the Environment Properties

Configure the Environment Properties

File Adapter Environment Properties

SQL Server Adapter Environment Properties

What's the Next Step?

Creating the Deployment Profile

Create the Deployment Profile

Building and Deploying the Project

Building the Project

Build the Project

Deploying the Project from NetBeans

Deploy the Project

Running the Project

Run the Project

Creating the BPEL-Based Project for the Adapter for SQL Server

Creating the Business Processes

Create the bpDelete Business Process

Create the bpInsert Business Process

Create the bpPsSelect Business Process

Create the bpTableSelect Business Process

Create the bpUpdate Business Process

Using Business Process Designer to Create Business Rules

Creating the bpDelete Business Rules

Create the bpDelete Business Rules

Creating the bpInsert Business Rules

Create the bpInsert Business Rules

Creating the bpPsSelect Business Rules

Create the bpPsSelect Business Rules

Creating the bpTableSelect Business Rules

Create the bpTableSelect Business Rules

Creating the bpUpdate Business Rules

Create the bpUpdate Business Rules

Creating the OTDs

The Database OTD Wizard generates Object Type Definitions (OTDs) by connecting to external data sources and creating corresponding OTDs. The sample project requires three OTDs to interact with the SQL Server Adapter.

These OTDs are:

The sample project ZIP file includes DTDs used to create the inbound and outbound DTD OTDs.

Create the SQL Server Database OTD

  1. Right-click the new Project in the Projects window, point to New, and then select Object Type Definition.

    The New Object Type Definition Wizard appears.

  2. In Step 1 of the wizard, select the wizard type. In this case, select SQL Database as the wizard type. Click Next.
  3. In Step 2 of the wizard, specify the database connection information.

    The connection information fields are:

    • Host name

    • Port

    • Database

    • User name

    • Password

  4. Once you have entered the correct information in the connection fields, click Next.
  5. In Step 3 of the wizard, select the types of database object you want to include in your project

    For this example, select the following:

    • Tables/Views/Aliases

    • Prepared Statements

  6. Click Next.
  7. In Step 4 of the wizard, select the table for the project. Click Add.

    The Add Tables dialog box appears.

  8. From the Add Tables dialog box, search for or enter the name of the database.

    For this example, use the db_employee table.


    image:Graphic shows the OTD Wizard's Add Tables dialog box, as described in context.
  9. When the database appears in the Results selection frame, click Select, and click OK to close the Add Table dialog box.
  10. Click Next.

    The Add Prepared Statements window appears.

  11. Click Add.

    The Add Prepared Statement dialog box appears.

  12. In the Add Prepared Statements dialog box, enter Select_ps as the Prepared Statement Name, and enter the following as the SQL Statement:
    select * from db_employee where emp_no > ? order by emp_no

    image:Graphic shows the OTD Wizard's Add Prepared Statement dialog box containing the SQL Statement, as described in context.

    Note - In this example, the SQL statement includes the ? placeholder for input. This placeholder represents the Where Clause.


  13. Click OK to close the Add Prepared Statement dialog box, and then click Next.
  14. In Step 7 of the wizard, enter a name for the OTD. In this example, use otdSQLServer.
  15. Click Next.
  16. In Step 8 of the wizard, review your settings, then click Finish to create the OTD.

Create the Inbound and Outbound DTD OTDs

  1. To create the inbound DTD OTD, right-click the project in the NetBeans Projects window, point to New, and then select Object Type Definition.

    The New Object Type Definition Wizard appears.

  2. Select DTD as the wizard type, and click Next.
  3. Browse to and select the otdInputDTD.dtd file that was extracted with the sample project. Click Select, and click Next.
  4. In Step 3 of the wizard, select the otdInputDTD_DBemployees document element, and click Next.
  5. In Step 4 of the wizard, accept the default option settings, and click Finish.

    The new OTD, otdInputDTD_DBemployees, now appears under the project's otdALL node, in the Projects window.

  6. To create the otdOutputDTD_DBemployees OTD, repeat steps 1–5 above, substituting otdOutputDTD.dtd for the DTD in step 3.

    When you are finished, the project's otdALL folder now contains three OTDs: otdSQLServer, otdInputDTD_DBemployees, and otdOutputDTD_DBemployees.

Next Steps

For your next step, see: