Using Validate Option

The External Mapping Validation provides a way to validate the rules of the destination elements using REST API that was defined in the REST account during the Template/Transaction creation.

This feature is only visible when:

  • You have selected the Enable External Mapping Validation checkbox and REST account from Template/Transaction Settings page.
  • You open the mapper from the Define Mapping page of Template/Transaction.

This feature is not supported if you open mapping from Manage Mappings page.

Steps to validate REST API

  1. Open the Mapping from Define Mapping page of Template/Transaction.

  2. Click Validate on the toolbar of the Mapper.



    Once the validation completes:

    1. A message is displayed to confirm that the validation is completed without any error.
    2. The validate icon will change into Validated.
    3. In case of any validation error, the errors will be displayed.

Request/Response for the External Mapping Validation

The Request and Response are generated in JSON format when you perform an External Mapping Validation in Web Mapper. 

Request Format for the External Mapping Validation

The following example represents a Request payload in JSON format.

Request Format
{
"destinationDetails": [
{
"fieldName": "Root",
"XSDVersion": "1",
"fieldSeparator": "\\t",
"recordSeparator": "\\n",
"allowLessFields": "false",
"removeInvalidChar": "false",
"enclosedChar": "",
"MinOccurs": "1",
"MaxOccurs": "1",
"leaf": false,
"schemaName": "AC_TextSchema_Traget",
"schemaId": "192168001145138613618814700005",
"entityTypedId": "TextSchema:192168001145138613618814700005",
"index": 0,
"depth": 1,
"expanded": true,
"expandable": true,
"checked": null,
"cls": "",
"iconCls": "",
"icon": "",
"glyph": "",
"root": false,
"isLast": true,
"isFirst": true,
"allowDrop": true,
"allowDrag": true,
"loaded": true,
"loading": false,
"href": "",
"hrefTarget": "",
"qtip": "",
"qtitle": "",
"qshowDelay": 0,
"visible": true,
"text": "",
"isAttributeAndNamespaceProcessed": true,
"targetName": "AC_TextSchema_Traget",
"fieldPath": "/Root"
},
{
"fieldName": "Record",
"MinOccurs": "1",
"MaxOccurs": "unbounded",
"leaf": false,
"index": 0,
"depth": 2,
"expanded": true,
"expandable": true,
"checked": null,
"cls": "",
"iconCls": "",
"icon": "",
"glyph": "",
"root": false,
"isLast": true,
"isFirst": true,
"allowDrop": true,
"allowDrag": true,
"loaded": true,
"loading": false,
"href": "",
"hrefTarget": "",
"qtip": "",
"qtitle": "",
"qshowDelay": 0,
"visible": true,
"text": "",
"isAttributeAndNamespaceProcessed": true,
"schemaName": "AC_TextSchema_Traget",
"targetName": "AC_TextSchema_Traget",
"fieldPath": "/Root/Record"
},
{
"fieldName": "Field1",
"format": "AAAAAAA",
"parent": " ",
"Documentation": "",
"BaseType": "string",
"MinOccurs": "0",
"MaxOccurs": "1",
"leaf": true,
"index": 0,
"depth": 3,
"expanded": false,
"expandable": true,
"checked": null,
"cls": "",
"iconCls": "",
"icon": "",
"glyph": "",
"root": false,
"isLast": false,
"isFirst": true,
"allowDrop": true,
"allowDrag": true,
"loaded": false,
"loading": false,
"href": "",
"hrefTarget": "",
"qtip": "",
"qtitle": "",
"qshowDelay": 0,
"visible": true,
"text": "",
"isAttributeAndNamespaceProcessed": true,
"schemaName": "AC_TextSchema_Traget",
"targetName": "AC_TextSchema_Traget",
"fieldPath": "/Root/Record/Field1"
},
{
"fieldName": "@recordNumber",
"Documentation": "",
"isAttribute": "true",
"leaf": true,
"BaseType": "string",
"index": 1,
"depth": 3,
"expanded": false,
"expandable": true,
"checked": null,
"cls": "",
"iconCls": "",
"icon": "",
"glyph": "",
"root": false,
"isLast": true,
"isFirst": false,
"allowDrop": true,
"allowDrag": true,
"loaded": false,
"loading": false,
"href": "",
"hrefTarget": "",
"qtip": "",
"qtitle": "",
"qshowDelay": 0,
"visible": true,
"text": "",
"isAttributeAndNamespaceProcessed": true,
"schemaName": "AC_TextSchema_Traget",
"targetName": "AC_TextSchema_Traget",
"fieldPath": "/Root/Record/@recordNumber"
}
],
"sourceDetails": [
{
"fieldName": "Root",
"XSDVersion": "1",
"fieldSeparator": "\\t",
"recordSeparator": "\\n",
"allowDiscontinousOrder": "false",
"allowIgnoreCase": "false",
"allowLessFields": "false",
"removeLastNewLineSeperator": "false",
"removeInvalidChar": "false",
"enclosedChar": "",
"startRowNumber": "",
"skippedBottomRows": "",
"allowMoreFields": "false",
"MinOccurs": "1",
"MaxOccurs": "1",
"leaf": false,
"schemaName": "AC_TextSchema_Source",
"schemaId": "192168001145138613617495100003",
"entityTypedId": "TextSchema:192168001145138613617495100003",
"index": 0,
"depth": 1,
"expanded": true,
"expandable": true,
"checked": null,
"cls": "",
"iconCls": "",
"icon": "",
"glyph": "",
"root": false,
"isLast": true,
"isFirst": true,
"allowDrop": true,
"allowDrag": true,
"loaded": true,
"loading": false,
"href": "",
"hrefTarget": "",
"qtip": "",
"qtitle": "",
"qshowDelay": 0,
"visible": true,
"text": "",
"isAttributeAndNamespaceProcessed": true,
"sourceName": "AC_TextSchema_Source",
"fieldPath": "/Root"
},
{
"fieldName": "Record",
"MinOccurs": "1",
"MaxOccurs": "unbounded",
"leaf": false,
"index": 0,
"depth": 2,
"expanded": true,
"expandable": true,
"checked": null,
"cls": "",
"iconCls": "",
"icon": "",
"glyph": "",
"root": false,
"isLast": true,
"isFirst": true,
"allowDrop": true,
"allowDrag": true,
"loaded": true,
"loading": false,
"href": "",
"hrefTarget": "",
"qtip": "",
"qtitle": "",
"qshowDelay": 0,
"visible": true,
"text": "",
"isAttributeAndNamespaceProcessed": true,
"schemaName": "AC_TextSchema_Source",
"sourceName": "AC_TextSchema_Source",
"fieldPath": "/Root/Record"
},
{
"fieldName": "Field1",
"format": "AAAAAAA",
"originalName": "Field",
"parent": " ",
"Documentation": "",
"BaseType": "string",
"MinOccurs": "0",
"MaxOccurs": "1",
"leaf": true,
"index": 0,
"depth": 3,
"expanded": false,
"expandable": true,
"checked": null,
"cls": "",
"iconCls": "",
"icon": "",
"glyph": "",
"root": false,
"isLast": false,
"isFirst": true,
"allowDrop": true,
"allowDrag": true,
"loaded": false,
"loading": false,
"href": "",
"hrefTarget": "",
"qtip": "",
"qtitle": "",
"qshowDelay": 0,
"visible": true,
"text": "",
"isAttributeAndNamespaceProcessed": true,
"schemaName": "AC_TextSchema_Source",
"sourceName": "AC_TextSchema_Source",
"fieldPath": "/Root/Record/Field1"
},
{
"fieldName": "@recordNumber",
"Documentation": "",
"isAttribute": "true",
"leaf": true,
"BaseType": "string",
"index": 1,
"depth": 3,
"expanded": false,
"expandable": true,
"checked": null,
"cls": "",
"iconCls": "",
"icon": "",
"glyph": "",
"root": false,
"isLast": true,
"isFirst": false,
"allowDrop": true,
"allowDrag": true,
"loaded": false,
"loading": false,
"href": "",
"hrefTarget": "",
"qtip": "",
"qtitle": "",
"qshowDelay": 0,
"visible": true,
"text": "",
"isAttributeAndNamespaceProcessed": true,
"schemaName": "AC_TextSchema_Source",
"sourceName": "AC_TextSchema_Source",
"fieldPath": "/Root/Record/@recordNumber"
}
],
"mappingDetails": {
"json": {
"category": "mapping",
"type": "mapping",
"encoding": "UTF-8",
"version": "1.0"
},
"cloneElements": "",
"filters": "",
"variables": {
"variable": []
},
"globalParameters": {
"keys": {
"key": []
},
"contextVariables": {
"contextVariable": []
}
},
"connections": {
"connectionVariable": []
},
"functions": {
"externalFunction": []
},
"filterUnmappedElements": false,
"indentOutputXML": true,
"xslVersion": "1.1",
"enableStreaming": false,
"filterEmptyElements": false,
"xslTransformer": "Saxon",
"characterSetEncoding": "UTF-8",
"DataViewerRecordCount": 50,
"dbQueryCaching": false,
"isQuickSplittingEnabled": false,
"TreeExpandLevelCountForWebService": 5,
"TreeExpandLevelForEasySchemaExtensions": 10,
"SelfRecursionLevel": 0,
"EnableTypesBuffering": true,
"TreeExpandLevelCount": 3,
"onDemandLoadingOfXMLSchemaTree": true,
"settingConfigs": {
"xslVersion": "1.1",
"xslTransformer": "Saxon",
"filterUnmappedElements": false,
"indentOutputXML": true,
"filterEmptyElements": false,
"enableStreaming": false,
"characterSetEncoding": "UTF-8",
"DataViewerRecordCount": 50,
"dbQueryCaching": false,
"isQuickSplittingEnabled": false,
"TreeExpandLevelCountForWebService": 5,
"TreeExpandLevelForEasySchemaExtensions": 10,
"SelfRecursionLevel": 0,
"EnableTypesBuffering": true,
"TreeExpandLevelCount": 3,
"onDemandLoadingOfXMLSchemaTree": true,
"cDataSectionElements": "",
"excludeResultPrefixes": "saxonJavaMappingTransformation saxonJavaMapperQueryExecutor saxonJavaAggregateFunctionHandler str",
"cacheIncludedSchemas": false,
"processElementFormDefault": true,
"isAutoSaveEnable": true
},
"disableOuputNodes": {
"disableOutputNodeProperty": []
},
"isCustomXSLT": false,
"contextSchemaLoadedAtSource": false,
"contextSchemaLoadedAtTarget": false,
"webservice": {
"consumers": {
"consumer": []
}
},
"GlobalPreCustomXSL": "",
"GlobalPostCustomXSL": "",
"xslTemplates": {
"xslTemplateData": []
},
"mappingTempId": null,
"sourceXpath": "",
"targetXpath": "",
"cDataSectionElements": "",
"splittingData": false,
"splitNumberOfRecords": "500",
"parallelProcessing": false,
"maximumConcurrentProcessor": "1",
"CustomAutoMapInUse": "",
"excludeResultPrefixes": "saxonJavaMappingTransformation saxonJavaMapperQueryExecutor saxonJavaAggregateFunctionHandler str",
"cacheIncludedSchemas": false,
"metaData": "",
"processElementFormDefault": true,
"mappingInformation": {
"mappingVersion": "6.1",
"mappingName": "dgdiuw",
"mappingProject": "Default",
"mappingDescription": "ye",
"sourceSchemaID": "TextSchema:192168001145138613617495100003",
"targetSchemaID": "TextSchema:192168001145138613618814700005",
"mappingOwnerGroup": "",
"mappingOwner": "",
"mappingLastModifiedBy": "",
"mappingCreationDate": "",
"mappingModifiedDate": "",
"reusable": null
},
"namespace": "",
"namespaceList": [],
"foreach": "",
"targetRoots": {
"targetRoot": [
{
"name": "Root",
"schemaName": "AC_TextSchema_Traget",
"schemaID": "TextSchema:192168001145138613618814700005",
"stream": "output_1"
}
]
},
"sourceRoots": {
"sourceRoot": [
{
"name": "Root",
"schemaName": "AC_TextSchema_Source",
"schemaID": "TextSchema:192168001145138613617495100003"
}
]
},
"contextSchemaDefinition": "",
"maps": [],
"sourceExpandLevel": 3,
"targetExpandLevel": 3,
"sourceTargetSchemaDetails": {
"sourceSchema": {
"name": "",
"root": false,
"leaf": false,
"schemaName": "Input_undefined",
"schemaType": "",
"xpath": "/",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": false,
"localVariableList": [],
"sortList": [],
"children": [
{
"name": "Root",
"root": true,
"leaf": false,
"schemaName": "Input_AC_TextSchema_Source",
"schemaNameWithoutInput": "AC_TextSchema_Source",
"schemaType": "TextSchema",
"xpath": "/Root",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": false,
"localVariableList": [],
"sortList": [],
"children": [
{
"name": "Record",
"root": false,
"leaf": false,
"schemaName": "Input_AC_TextSchema_Source",
"schemaNameWithoutInput": "AC_TextSchema_Source",
"schemaType": "",
"xpath": "/Root/Record",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": false,
"localVariableList": [],
"sortList": [],
"children": [
{
"name": "Field1",
"root": false,
"leaf": true,
"schemaName": "Input_AC_TextSchema_Source",
"schemaNameWithoutInput": "AC_TextSchema_Source",
"schemaType": "",
"xpath": "/Root/Record/Field1",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": false,
"localVariableList": [],
"sortList": [],
"children": [],
"totalChildMappings": 0
},
{
"name": "@recordNumber",
"root": false,
"leaf": true,
"schemaName": "Input_AC_TextSchema_Source",
"schemaNameWithoutInput": "AC_TextSchema_Source",
"schemaType": "",
"xpath": "/Root/Record/@recordNumber",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": "true",
"localVariableList": [],
"sortList": [],
"children": [],
"totalChildMappings": 0
}
],
"totalChildMappings": 0
}
],
"totalChildMappings": 0
}
],
"totalChildMappings": 0
},
"destinationSchema": {
"name": "",
"root": false,
"leaf": false,
"schemaName": "Input_undefined",
"schemaType": "",
"xpath": "/",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": false,
"localVariableList": [],
"sortList": [],
"children": [
{
"name": "Root",
"root": true,
"leaf": false,
"schemaName": "Input_AC_TextSchema_Traget",
"schemaNameWithoutInput": "AC_TextSchema_Traget",
"schemaType": "TextSchema",
"xpath": "/Root",
"streamName": "output_1",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": false,
"localVariableList": [],
"sortList": [],
"children": [
{
"name": "Record",
"root": false,
"leaf": false,
"schemaName": "Input_AC_TextSchema_Traget",
"schemaNameWithoutInput": "AC_TextSchema_Traget",
"schemaType": "",
"xpath": "/Root/Record",
"streamName": "output_1",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": false,
"localVariableList": [],
"sortList": [],
"children": [
{
"name": "Field1",
"root": false,
"leaf": true,
"schemaName": "Input_AC_TextSchema_Traget",
"schemaNameWithoutInput": "AC_TextSchema_Traget",
"schemaType": "",
"xpath": "/Root/Record/Field1",
"streamName": "output_1",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": false,
"localVariableList": [],
"sortList": [],
"children": [],
"totalChildMappings": 0
},
{
"name": "@recordNumber",
"root": false,
"leaf": true,
"schemaName": "Input_AC_TextSchema_Traget",
"schemaNameWithoutInput": "AC_TextSchema_Traget",
"schemaType": "",
"xpath": "/Root/Record/@recordNumber",
"streamName": "output_1",
"namespacePrefix": "",
"currentForEach": "",
"currentMapping": "",
"currentComment": "",
"preCustomXSL": "",
"postCustomXSL": "",
"disableOutputEscaping": false,
"order": 1,
"filter": false,
"loadedOptimized": false,
"namespaceRemoved": "",
"attribute": "true",
"localVariableList": [],
"sortList": [],
"children": [],
"totalChildMappings": 0
}
],
"totalChildMappings": 0
}
],
"totalChildMappings": 0
}
],
"totalChildMappings": 0
}
}
},
"UserDetails": {
"UserId": "127000000001107055536473900001",
"UserName": "admin",
"FirstName": "Admin",
"LastName": "User",
"Role": {
"id": "1",
"description": "Sys Admin",
"entityName": "Sys Admin",
"aisUserType": "sysadmin",
"baseRole": null,
"policy": "{\"role\":{\"networkAccess\":{\"category\":\"all\"},\"networkListAccess\":{\"category\":\"all\"},\"projectAccess\":{\"category\":\"all\"},\"permissions\":[{\"name\":\"template\",\"permission\":\"LRCEX\"},{\"name\":\"transaction\",\"permission\":\"LRCEX\"},{\"name\":\"network\",\"permission\":\"LRCEX\"},{\"name\":\"partner\",\"permission\":\"LRCEX\"},{\"name\":\"usermanagement\",\"permission\":\"LRCEX\"},{\"name\":\"project\",\"permission\":\"LRCEX\"},{\"name\":\"webform\",\"permission\":\"LRCEX\"},{\"name\":\"aisentities\",\"permission\":\"LRCEX\"},{\"name\":\"secureentities\",\"permission\":\"LRCEX\"},{\"name\":\"dashboardmonitor\",\"permission\":\"LRX\"},{\"name\":\"themesettings\",\"permission\":\"LRCEX\"},{\"name\":\"processflow\",\"permission\":\"LRCEX\"},{\"name\":\"administer\",\"permission\":\"LRCEX\"},{\"name\":\"audittrail\",\"displayName\":\"AuditTrail\",\"permission\":\"LRE\"}],\"aisAccess\":true,\"viewUserData\":true}}",
"customPolicy": null,
"otherPolicies": null,
"modifiedDate": 1657264312377,
"createdUser": null,
"modifiedUser": null,
"type": 3800,
"isUsed": null,
"firstActivityNumber": null,
"firstActivityText": null,
"recentActivityNumber": null,
"recentActivityText": null
}
},
"Authorization": "",
"externalRequestUrl": "https://qamonitorapi.adeptia.com:443/wsapi/success",
"methodName": "POST"
}

Request JSON has these details:

User Details: This show the details of the user who is performing the validation.

Destination Details: This shows the details of each element of destination layout.

Source Details: This shows the details of each element of source layout.

Mapping Details: This shows the mapping details applied on destination layout.

Response Format for the External Mapping Validation

These information must available in Response JSON:

In case the Validation is successful

{"status":"success","errorDetails":{}}

In case the validation is not successful

{ "status":"error",

 "errorDetails":{

"/Root/Record/Field1" :{

"message": "Field1 is mandatory.",

"schemaName" : "AC_TextSchema_Target"

},

"/Root/Record/@recordNumber" :{

"message": "@recordNumber is mandatory.",

"schemaName" : "AC_TextSchema_Target"

}

}

}


Where,

Status: This shows the validation status 'error' or 'success'. If successful, the error details will be blank else it contains the list of field path which are having errors.

Error Details: This contains the field path. 

Field Path: This contains message and schema name.