uCosminexus Service Platform, Overview

[Contents][Glossary][Index][Back][Next]

2.1.2 Procedure for invoking service components

The operation procedure for invoking service components from the service requester differs depending on the combination of reception type and HCSC component to be invoked. The possible combinations of reception types and HCSC components to be invoked are as follows:

The flow of messages for each case is described below. For details about the flow of processing if an error occurs, see Chapter 7. Troubleshooting in the Service Platform Setup and Operation Guide.

Organization of this subsection
(1) A service adapter is directly invoked from standard reception to execute service components
(2) A business process is invoked from standard reception to execute service components
(3) A business process is invoked from user-defined reception to execute service components

(1) A service adapter is directly invoked from standard reception to execute service components

If a service adapter is directly invoked from standard reception (to execute a service component), the service name defined in the service adapter is specified in the service requester, and then a request message is sent. When the request message is sent, the service component defined in the service adapter is invoked.

The following figure shows the flow of messages when a service adapter is invoked directly.

Figure 2-3 Flow of messages when a service adapter is invoked directly

[Figure]

  1. For request messages sent from the service requester to standard reception, the message format specified when the service adapter was defined in the development environment (matching the type of the service component) is used. Therefore, in the service requester, create a request message matching the message format defined in the service adapter. Then, specify the created message in the parameters of standard reception (parameters of the user message), and then request execution of a service component.
  2. Invoke the service component from the service adapter. When invoking the service component, use the request message defined in the service adapter. In this way, the request message sent from the service requester and the request message received by the service component will be the same. Even if you use a message format other than the message format of the service component, you can send a request from the service requester if you define data transformation in the service adapter.
  3. Send a response message from the service component to the service adapter. For the response message, use the same message format as the response message defined in the service adapter.
  4. Send a response to the service requester. For the response, use the message format of the response message defined in the service adapter. In this way, the response message returned from the service component and the response message received by the service requester will be the same.

For details about data transformation definitions, see 6.3. Defining data transformation in the Service Platform Basic Development Guide.

(2) A business process is invoked from standard reception to execute service components

If a business process is invoked from standard reception to execute a service component, the service name (business process name) is specified in the service requester, and then a request message is sent. Then, processing is performed according to the process defined in the business process. A process consists of activities. Among those activities, an invoke service activity invokes the defined service adapter and then executes the service component defined in the service adapter. The following figure shows the flow of messages when a business process is invoked.

Figure 2-4 Flow of messages when a business process is invoked

[Figure]

  1. In the service requester, create a request message matching the message format of the request message defined in the receive activity of the business process. Then specify the created message in the parameters of standard reception (parameters of the user message), and then request execution of a service component. For the request message to be specified in the service requester, use the message format defined in the receive activity of the business process.
  2. Invoke the service component from the business process. When invoking the service component, use the request message defined in the invoke service activity. The message format of this request message must be the same as the request message format defined in the service adapter of the service component to be invoked. Even if you use a message format other than the message format of the service component, you can send a request from the invoke service activity if you define data transformation in the service adapter.
  3. Send a response message from the service component to the service adapter. For the response message, define the same message format as the response message defined in the invoke service activity of the business process.
  4. Send a response to the service requester. For the response, use the message format of the response message defined in the reply activity of the business process.

For details about data transformation definitions, see 6.3. Defining data transformation in the Service Platform Basic Development Guide.

(3) A business process is invoked from user-defined reception to execute service components

User-defined reception is the interface that receives a service component execution request in any format defined by the user, and then returns a response.

A business process is invoked from the user-defined reception according to the definitions specified in the development environment, and then processing is performed according to the process defined in the business process. The invoke service activity invokes the defined service adapter, and then executes the service component defined in the service adapter. The following figure shows the flow of messages when the user-defined reception is used.

Note that the following is an example of using the SOAP Communication Infrastructure.

Figure 2-5 Flow of messages when the user-defined reception is used (example of SOAP Communication Infrastructure)

[Figure]

  1. The request message sent from the service requester is the same format as the one defined in the receive activity of the business process. Therefore, a WSDL of the type matching the message format defined in the receive activity of the business process must be specified in the user-defined reception definition of the development environment. When invoking a SOAP reception from the service requester, use the WSDL defined in the SOAP reception in the development environment. To use a service requester that supports SOAP1.1 (SOAP Communication Infrastructure or JAX-WS engine), generate a stub by using the WSDL2Java command from the WSDL, and then implement the service requester to invoke the stub.
    To use a service requester that supports SOAP1.2 (JAX-WS engine), generate a stub by using the cjwsimport command from the WSDL, and then implement the service requester to invoke the service class.
  2. When invoking the service component from the business process, use the request message defined in the invoke service activity. The message format of this request message must be the same as the request message format defined in the service adapter of the service component to be invoked.
  3. For the response message from the service component, also define the same message format as the response message defined in the invoke service activity of the business process. Even if you use a message format other than the message format of the service component, you can send a request from the invoke service activity if you define data transformation in the service adapter.
  4. For the response to the service requester, use the message format of the response message defined in the reply activity of the business process. This message format must be the same as the format of the response message of the WSDL specified in the user-defined reception of the development environment.

For details about data transformation definitions, see 6.3. Defining data transformation in the Service Platform Basic Development Guide.