uCosminexus Service Platform, Basic Development Guide

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

9.5.5 Automatic Service Emulation

This subsection explains how to set up and execute automatic service emulations.

Organization of this subsection
(1) Setting up an automatic service emulation
(2) Executing automatic service emulation

(1) Setting up an automatic service emulation

  1. From the Eclipse menu, select Window, Show View, and then Others.
    The Show View dialog box appears.
  2. Select Debug and then HCSC Auto Emulate, and then click OK.
    The HCSC Auto Emulate view appears.
    For details about the HCSC Auto Emulate view, see 1.2.4 Debug Business Process screen in the manual uCosminexus Service Platform Reference Guide.
  3. Click Add in the HCSC Auto Emulate view.
    A row is added to the table in the HCSC Auto Emulate view.
  4. Click the Service name cell, and then select the service to be emulated from the drop-down list.
  5. Click the Operation name cell, and then select the operation of the service to be emulated from the drop-down list.
  6. Click the Response Type cell, and then select Normal Response or Fault Response from the drop-down list.
  7. Click the Response Message cell, and then click the ... button.
    The Select file dialog box appears.
  8. Select an applicable response message file, and then click OK.#
    If you specify a file with the .xsl extension, the result of applying the specified file appears as a response message in the request message for the invoke service activity.
    If you specify a file with an extension other than .xsl, the contents of the file are used directly as response messages.
    #
    You can specify only response messages where UTF-8 is specified for the XML character encoding.
  9. If necessary, select the Condition cell, and then enter conditions in the XPath expression.
    If the result of evaluating the conditional expression against the service request message is true, automatic service emulation is executed. If no condition is entered, the result is always evaluated as true.
  10. Select the check box for the Valid cell.
    Automatic service emulation is set.

To save the settings of the HCSC Auto Emulate view to an external file, click Save in the HCSC Auto Emulate view.

By clicking Load, you can obtain the settings saved in the external file. If settings already exist in the HCSC Auto Emulate view, a dialog box is displayed to confirm whether to overwrite the existing settings of the HCSC Auto Emulate view.

If multiple combinations of the same service and operation are set in the HCSC Auto Emulate view, emulation for the service with the highest priority is executed. To change the priority order of the service, select the row to be changed, and then click Up or Down.

If you right-click the file name of a response message and then select Show file, you can open the target file.

If multiple business processes are debugged, automatic emulation settings (service names and operation names) are enabled for all business processes.

Note that if manual emulation is executed on an invoke service activity that is the target for automatic emulation, manual emulation takes precedence over automatic emulation.

(2) Executing automatic service emulation

As the processing of a process instance proceeds in the invoke service activity specified in the HCSC Auto Emulate view, the specified response message is used automatically instead of the response message for the service.

If you specify an XML format file for a response message, the contents of the file are emulated directly as the response message for the service. If an XSL format file is specified for a response message, the result of applying the contents of the file to the request message for the service is emulated as the response message for the service.

Note that if automatic service emulation is not set, normal service invocation is executed.

Note
If the HCSC Auto Emulate view is closed, automatic service emulation is not executed.