How to run the example
This SWIFT Exception and Investigation schema validation will use the sample files to demonstrate the generation of validation reports as output from a SWIFT CASE XML message.
About this task
The stopValidation.json file will report the validation failure due to the pre-conversion checks:
If input file is other than any of the supported CASE messages as per schema list indicated above.
Procedure
- Import the swift_case.zip project into the Design Server.
-
Open the swift_case project in Design Server and view the flow
swift_case_validation_flow.
-
The Flow Description
points to all the maps to be executed during the
flow process, which will be called from within
some of the map nodes in the flow. This list has
to be added to the description and ensure all
lines start in column 1. Following is the list of
maps with the description format:
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9501_camt_110_001_01_ccnrcon
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9505_camt_110_001_01_comp
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9506_camt_110_001_01_sanc
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9507_camt_110_001_01_utex
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9510_camt_110_001_01_utap
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9511_camt_111_001_02_ccnrcon
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9515_camt_111_001_02_comp
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9516_camt_111_001_02_sanc
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9517_camt_111_001_02_utex
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9520_camt_111_001_02_utap
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9951_head_camt_110_ccnrconr
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9955_head_camt_110_comp
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9956_head_camt_110_sanc
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9957_head_camt_110_utex
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9960_head_camt_110_utap
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9961_head_camt_111_ccnrconr
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9965_head_camt_111_comp
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9966_head_camt_111_sanc
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9967_head_camt_111_utex
- @packagemap=swift_case/validation/schema_only/maps/swift_case_mx_schema_validation_xsd/swei9970_head_camt_111_utap
-
It utilizes the following nodes:
- Source Nodes:
- mx_input
This node identifies the input data to be validated in the flow. It uses the variable INPUT_FILE to set the location of the data.
- mx_input
- Map Nodes:
- MX
pre-check
Runs map mxut1014_bizsvc_swcase which sets flow variables, checks pre-validation conditions, and creates infoset.json for validation.
- XSD_VAL
Runs map swei9500_val which calls the appropriate map to perform schema validation of a SWIFT CASE message.
Note: The map swei9500_val internally calls all the other maps identified in the above Flow Description step.
- MX
pre-check
- Decision Nodes:
- pre-valid chk
This node checks the flow variable stopValidation to decide if further validation/processing is not required.
- XSD_RESULT_FORMAT
This node checks the value of the flow variable REPORT_FORMAT to determine if the resulting report for schema-only validation should be generated in XML (default) or JSON.
- pre-valid chk
- Log Nodes:
- FAILURE
In case of no validation due to precondition check failures, this node creates a log file specified by the flow variable FAILURE_LOG.
- FAILURE
- Fail Node:
- STOP
It generates error message setup in the node in case of no validation performed.
- STOP
- Passthrough Nodes:
- XSD_XML_CONVERT
This node receives a schema-only validation report in XML format and does not modify the content, thus passing it as is to the appropriate target node.
- XSD_XML_CONVERT
- Format Converter
Nodes:
- XSD_JSON_CONVERT
This node receives a schema-only validation report in XML format and converts it to JSON before passing it to the appropriate target node.
- XSD_JSON_CONVERT
- Target Nodes:
- xsd_xml
This node contains the resulting schema-only validation report in XML format and creates the output as defined by the variable OUTPUT_RESULT_XML.
- xsd_json
This node contains the resulting schema-only validation report in JSON format and creates the output as defined by the variable OUTPUT_RESULT_JSON.
- xsd_xml
- Source Nodes:
-
It utilizes the following variables:
Flow variables:
- VALIDATION_TYPE
The default value is schema. The value extended is not supported at this time. This variable is currently not being used in any node.
- REPORT_FORMAT
The default value is xml. It can be changed to json. This is used in Decision node XSD_RESULT_FORMAT.
- INPUT_FILE
The default value is ../tools/mx_service/data/swei_camt_110_comp.xml. This is the data file to be used for validation and can be customized. It is used in the Source node mx_input.
- OUTPUT_RESULT_XML
The default value is validation_result.xml. This is the location of the validation report file in xml format. It is used in Target node xsd_xml. It can be customized.
- OUTPUT_RESULT_JSON
The default value is validation_result.json. This is the location of the validation report file in json format. It is used in Target node xsd_json. It can be customized.
- FAILURE_LOG
The default value is stopMXValidation.json. This is the location of the failure log. It is used in Log node FAILURE. It can be customized.
- bizSvc
For internal use in the Map node MX pre-check to determine the type of data being read in the input file.
- stopValidation
For internal use in the Map node MX pre-check and is checked in Decision node pre-valid chk to cause a Failure log in case a data file was not recognized as a valid CASE message.
- VALIDATION_TYPE
-
The Flow Description
points to all the maps to be executed during the
flow process, which will be called from within
some of the map nodes in the flow. This list has
to be added to the description and ensure all
lines start in column 1. Following is the list of
maps with the description format:
- Open the main flow swift_case_validation_flow in the Design Server. It utilizes above one Source node, two Map nodes, two Decision nodes, one Log node, one Fail node, one Passthrough node, one Format Converter node, and two Target nodes.
-
In Design Server, create a package that contains the input
files and one flow
swift_case_validation_flow. The
maps will automatically be included during deployment of the
package onto the runtime server.
Note: Not required for running flows on Design Server user interface directly.