Development tools : Transaction editor : Defining services in transaction editor
  
Defining services in transaction editor
UNICOM® Digital Transformation Toolkit (UDTT™) provides a set of service objects that enable an application to complete an operation. These services include host communications, journaling, store-and-forward for offline operations, financial devices for input and output operations, and more. You can use the Transaction editor to add the services that will be required during the transaction execution.
To define data for a new service
1 In the Transaction editor, click the Service tab.
2 Right-click in a blank area of the Service panel, and then click New Child. You can then select between service or Web service.
3 If you select the service option, the Service Creation Dialog appears. You can then choose an existing service definition either from the global UDTT definition or from the local class path, or you can create a new service, as shown in the figure below:
This graphic is described in the surrounding text.
4 If you want to create a fully new service, in the Service Creation Dialog window, select Create new class, and then click Create. The Java Class page displays.
5 In the Java Class page, select the package in which you want to store the Java file.
6 In the Name field of the Java Class page, enter a name for the Java file. Click Finish.
7 In the Service Creation Dialog window, click OK.
8 If you want to choose a service from the global UDTT definition, you need to define the global services in the btt.xml file > service > classTable.
9 If you want to choose a service from local classpath, you need to define the Java classes for the service. Then it will load all the Java classes implementing a service that are accessible from the current UDTT project.
Result
In all cases, the implementation class field is prefilled with either the selected class or with the new implementation class.
This graphic is described in the surrounding text.
If you are creating a new service, you can start adding your service code to the Java template generated by default by clicking in the ImplClass label. The defaulted Java code for a ‘SampleService’ service is the following:
package definitions.common_service;
import com.ibm.btt.base.Service;

public class SampleService extends Service {
}
If you select the Web service option, the New Web services Connector wizard opens. See Creating a Web services connector.
See also
Transaction editor