Creating a service

When creating a service, you can either create a global service or a local service. Do the following steps to create a new service:
  1. Create the service classes:
    • To create a global service class, do the following:
      1. Create a new class extending com.ibm.btt.base.Service, which is located in bttcore.jar.
      2. Open btt.xml file, and find the service section and add the following code to the classtable configuration:
        field id="newService" value="package.NewService" /
      3. If your Transaction Editor is opened before you define the extensions, right-click any blank space in the editor and select Reload BTT Global Settings in the pop-up menu so that your changes can be applied.
    • To create a local service class, you can create a new class extending com.ibm.btt.base.Service, which is located in bttcore.jar.
  2. Create service:
    After you created the service classes, double-click the transaction to open the Transaction Editor, and in the Service tab, right-click anywhere in the Service Editor area, and select New Child > Service. The Service Creation Dialog opens, there are three options:
    • Choose Service from Global BTT definition:
      1. Click Browse to select the global Servce you created.
      2. Click OK, the Tag Name and Class Name are automatically displayed in the Service Creation Dialog.
      3. Click OK, the global service is created.

        You can modify the properties of the service in the Detailed Information section.

    • Choose Service class from local class path
      1. Click Browse to select the local service class.
      2. Click OK, the Tag Name and Class Name are automatically displayed in the Service Creation Dialog.
      3. Click OK, the local service is created.

        You can modify the properties of the service in the Detailed Information section.

    • Create New Class

      The Create New Class option is provided in case you have no service class created before or you want to create a new service class. By default the service class created by this wizard is local service.

      1. Click Create, a dialog box pops up asking you to create a new Java™ class. Enter the fields as appropriate.
      2. Click Finish, the Tag Name and Class Name are automatically displayed in the Service Creation Dialog.
      3. Click OK, the new service is created.

        You can modify the properties of the service in the Detailed Information section.