uCosminexus Service Platform, Basic Development Guide

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

5.6.11 Validate activity

This is the activity for validating the correctness of message sent and received in business processes. It is used to validate whether the message sent and received with external by receive activity or invoke service activity match with the schema of corresponding allocation variable.

Describe the details on validate activity, in the validation activity dialog.

Organization of this subsection
(1) Definition procedure
(2) Process in case of error occurrence in validation
(3) Notes at the time of definition

(1) Definition procedure

Definition procedure is as follows:

  1. Schedule the validate activity to a canvas.
    For details on how to schedule the activity, see "5.4.1 Deploying Activities".
  2. Display Validate activity dialog by either of the following methods:
    • Double click the validate activity of canvas.
    • Select and right click the validate activity of canvas and select Settings.
    Validate activity dialog is displayed.
  3. Enter the required information in Validate activity dialog.
    For details on the Validate activity dialog, see "1.4.17 Validate activity dialog" in the manual "service Platform Reference Guide".
    Click Edit button to edit the contents of variables to be set in Variables. You can edit the contents of variable, in the displayed Variable/correlation set list dialog. In Variables, you can set the variable of message type (XML), but you cannot set the variable of message type (non-XML or any). For details on Variable/correlation set list dialog, see "1.4.1 Variable/correlation set list dialog" in the manual "Service Platform Reference Guide".
  4. Click [OK] button.

(2) Process in case of error occurrence in validation

If validation result is invalid, you can send following types of faults.

For details on how to select the fault to be sent, see "4.7.1 Overview of general fault to transform the system exception to fault" in the manual "Service Platform Function Guide".

Reference note
If multiple variables have been set in the validate activity, a fault message is created with information of first variable for which error occurred during validation.

Settings required for fault process are as follows:

(a) Definition in case of executing fault process

When fault occurs in the validate activity, process is switched depending on the allocation of fault process, which has been set in the scope activity to which the validate activity belongs. If fault process allocation has not been set, fault exception occurs.

Fault process allocation
You cannot allocate fault process directly from the validate activity. Allocate the process by using the scope activity to which validate activity belongs.

Fault process switching
Use the switch activity to switch the process corresponding to the validation result.
Define such that the fault information is acquired by the variable part specification, from the variable allocated to fault message and the process is switched depending on the acquired information.

Optional fault occurrence
Use throw activity to generate the optional fault.
Define such that when fault occurs, a fault of optional variable value is generated by the throw activity.
(b) Schema file for defining the fault message to be used in fault process definition

Storage destination of the schema file for defining the validate activity specific fault message is as follows:

<Service Platform installation directory>\CSC\system\msg\cscvalidatefault.xsd

Schema file for defining the validate activity specific fault message to be used in allocation of fault process of the scope activity to which validate activity belongs, is shown in the following snippet. For details on schema file of general fault, see "7.12.1 Schema file that defines the general fault message" in the manual "Service Platform System Setup and Operation Guide".

<?xml version="1.0" encoding="UTF-8"?>
<!--
 DO NOT EDIT THIS FILE.
 -->
<xs:schema
    elementFormDefault="qualified"
    targetNamespace="http://www.msg.csc.soft.Hitachi.co.jp/cscBpValidate"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="fault">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="exception-name"    type="xs:string"/>
        <xs:element name="exception-message" type="xs:string"/>
        <xs:element name="scope-name"        type="xs:string"/>
        <xs:element name="activity-name"     type="xs:string"/>
        <xs:element name="variable-name"     type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
 

Configurable elements are as follows:

exception-name
Set the exception name. In exception name, set the value of Class.getName().

exception-message
Set the exception information. In exception information, set the value of Exception.toString().

scope-name
Set the scope name to which the validate activity belongs.

activity-name
Set the name of validate activity.

variable-name
Set the name of variable to be validated.

(3) Notes at the time of definition