8.2.9 Creating a service requester that sends a request for business process re-execution (Web Services and SOAP communication infrastructure)

You can create a service requester that sends a request for business process re-execution to the standard synchronous reception (Web Services).

The flow for creating a service requester that sends a request to the standard synchronous reception (Web Services) for business process re-execution is the same as that for creating an ordinary service requester that sends requests to the standard synchronous reception (Web Services). For details about the creation flow, see 8.2.1 Procedure for Creating a Service Requester (Standard Synchronous Reception (Web Services)) (SOAP communication infrastructure).

The tasks in the individual process are as follows:

Organization of this subsection
(1) WSDL acquisition
(2) Stub creation
(3) Object generation
(4) Parameter specification
(5) Response message acquisition
(6) Error information acquisition

(1) WSDL acquisition

The WSDL acquisition method is the same as that used for creating an ordinary service requester that sends requests to the standard synchronous reception (Web Services).

For details about the WSDL acquisition method, 8.2.2 Acquiring the WSDL.

(2) Stub creation

The stub creation method is the same as the one used for creating an ordinary service requester that sends requests to the standard synchronous reception (Web Services). That is, to create a stub, you use the WSDL2Java command provided by Cosminexus as a development support command.

For details about stub creation, see 8.2.3 Creating Stubs.

(3) Object generation

The object generation method is the same as that used for creating an ordinary service requester that sends requests to the standard synchronous reception (Web Services).

For details about object generation, see 8.2.4 Generating Objects.

To invoke a method that sends a request for business process re-execution, use invokeBPXML().

An example of a method that sends a request for business process re-execution is shown below.

Example: Requesting business process re-execution

String result = ws.invokeBPXML(             // method invocation
                      serviceName,         // service name
                      bpRequestType,       // request type for business process
                      bpProcessId,         // process ID for business process
                      clientID,            // client correlation ID
                      requestFormatID,     // request format ID
                      responseFormatID,    // response format ID
                      operationName,       // operation name
                      userData);           // user message

(4) Parameter specification

The parameters that become the arguments of the method are different from those used in creating an ordinary service requester that sends requests to the standard synchronous reception (Web Services). The following table shows the details of the parameters that are specified for a service requester that sends a request to a synchronous reception (Web Services) for business process re-execution.

Table 8-6 Parameter details (standard synchronous reception (Web Services)/business process re-execution request)

Parameter nameData typeParameter (invokeBPXML)Explanation
Service name
(serviceName)
java.lang.Stringin0(type="xsd:string")This is the service name of the request destination.
This parameter is required.
For the service name of the request destination, specify the business process defined in the development environment.
Request type for business process
(bpRequestType)
java.lang.Stringin1(type="xsd:string")Indicates a request message type.
To request business process re-execution, specify a RECOVER string.#1
Process ID for business process
(bpProcessId)
java.lang.Stringin2(type="xsd:string")This is a business process instance ID.
Specify either a value acquired from error information or the value that is output to the message log.
Client correlation ID
(clientID)
java.lang.Stringin3(type="xsd:string")This is a correlation identifier for uniquely identifying the request message from the service requester.
Specify NULL for this parameter.#1
Request format ID
(requestFormatID)
java.lang.Stringin4(type="xsd:string")This is an ID for uniquely identifying the request message format from the service requester.
Specify NULL or an empty character ("") for this parameter.#1
Response format ID
(responseFormatID)
java.lang.Stringin5(type="xsd:string")This is an ID for uniquely identifying the response message from the HCSC server.
Specify NULL or an empty character ("") for this parameter.#1
Operation name
(operationName)
java.lang.Stringin6(type="xsd:string")This is an operation name corresponding to the service name at the request destination. #2
Specify NULL or an empty character ("") for this parameter.#1
User message
(userData)
java.lang.Stringin7(type="xsd:string")This is the request message from the service requester.#2
Specify NULL or an empty character ("") for this parameter.#1
Legend:
inX (X=1 to 7): Parameter for each method indicated by a stub
#1
A fixed value (RECOVER, NULL, or an empty character ("")) is set as the specification value for these parameters. If you specify a value other than these fixed values, correct operation cannot be guaranteed.
#2
When the service component protocol of request destination is SOAP, decide an operation to be invoked from the name of a root element of user message (in the case of data transformation, it is the name of root element of the message after data transformation). Therefore, take note that if you specify an invalid name in the root element of user message, an unintended operation may be invoked.

(5) Response message acquisition

The response message acquisition method is the same as that used for creating an ordinary service requester that sends requests to the standard synchronous reception (Web Services).

For details about response message acquisition, see 8.2.7 Acquiring Response Messages.

(6) Error information acquisition

The method of installing a service requester for acquiring error information is the same as that used for creating an ordinary service requester that sends requests to the standard synchronous reception (Web Services).

For details about error information acquisition, see 8.2.8 Acquiring Error Information.