Sun Adapter for Batch Tutorial

Creating a Java Collaboration Definition

The next step in the sample is to create a Java Collaboration using the Java Collaboration Definition Wizard. Once a Collaboration Definition has been created, the Business Rules of the Collaboration are written using the Collaboration Editor.

ProcedureTo Create the jcdBatch_Record Collaboration

  1. From the Project Explorer, right-click the prjBatch_Record Project and select New ⇒ Collaboration Definition (Java) from the context menu.

    The Collaboration Definition Wizard (Java) appears.

  2. Enter a Collaboration Definition name (for this Project, use jcdBatch_Record) and click Next.

  3. For Step 2 of the Wizard, from the Web Services Interfaces selection window, double-click CAPS Components Library⇒Adapters⇒File⇒FileClient⇒receive.

    The Name field now displays receive.

  4. Click Next.

  5. For Step 3 of the Wizard, from the Select OTDs selection window, double-click CAPS Components Library⇒Adapters⇒BatchAdapter⇒BatchRecord.

    The BatchAdapter.BatchRecord OTD is added to the Selected OTDs field.

  6. Double-click the BatchRecord_1 Instance Name and rename the instance to BatchRecord_Create.

  7. From the Select OTDs selection window, double-click CAPS Components Library⇒Adapters⇒BatchAdapter⇒BatchRecord again.

    Another BatchAdapter.BatchRecord OTD is added to the Selected OTDs field.

  8. Double-click the BatchRecord_2 Instance Name and rename the instance to BatchRecord_Parse.

  9. Click the Up One Level button to return to the Repository directory.

  10. Double-click CAPS Components Library⇒Adapters⇒File⇒FileClient.

    The FileClient OTD is added to the Selected OTDs field.

  11. Click Finish.

    The Java Collaboration Editor opens to the new Collaboration in the right pane of the NetBeans IDE.