Assert (Compare file)

Operation Name

Assert (Compare file)

Function overview

Checks whether the input source data match the specified file in the form of XML.

Executed only when the log level is FINFO or below. Not executed when log level is INFO or above. Set the log level to INFO or higher to avoid execution in application.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required/Optional Use of Variables Description Remarks
Name Required Not available Enter the name on the script canvas.  
Input data Required Not available Select the component on the script canvas.  
Required settings
Item name Required/Optional Use of Variables Description Remarks
Assert condition Required Not available Select conditions for performing assertion.
  • [Match with input data]: (default)
    Verifies that the contents of the input source component match the specified file in the form of XML. Assertion exception occurs if the contents of the input source do not match the specified file in the form of XML.
  • [Not match with input data]:
    Verifies that the contents of the input source component do not match the specified file in the form of XML. Assertion exception occurs if the contents of the input source match the specified file in the form of XML.
 
Expected XML file Required Available Enter the path of the file that contains the expected XML data.

Click [Browse] button to activate the file Selectr and Select the file.
Comment
Item name Required/Optional Use of Variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Mass Data Processing

Mass data processing is not supported.

PSP Usage

PSP is not supported.

Available component variables

Component variable name Description Remarks
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version or the client application used.

Specification Limits

None.

Main exceptions

Exception name Cause Solution
InputDataNotFoundException [Input data] is not specified. Specify the [Input data], or draw the data flow.
InvalidPropertyConfigurationException [Expected XML file] is not specified. Specify [Expected XML file].
AssertionException Assertion failed. Check if [Input data] matches with [Expected XML file].
java.io.FileNotFoundException File specified by [Expected XML file] does not exist. Check the specified file.