Home| Printable Version
A common requirement is to check for the validity of the incoming data. For example if you have not received the required request parameters there is often no point in continuing the processing in a given agent (node). There are three main approaches that can be used for this validation: Schema Validation, Rule Complex Conditions, and XSLT Transforms Schema Validation can be used when a W3C Schema definition of the full incoming request structure is available, and it is known that the request will always conform to this structure. In this approach the Validate action is used and the presence of any errors checked for. The following screenshot shows the example rules for this type of validation. screenshot showing example schema validation rules   Rule Complex Conditions. This type of approach can be used if there are only a few incoming values that need to be checked. Rules should be created with condition elements to check that each incoming value is valid. For example, the following image shows a rule that checks for an error in an incoming logon request. An error is taken as either the username or password fields being empty. screenshot showing example complex condition validation rules   XSLT Transform. This approach offers the most flexibility, as the full power of XSLT is available to you, however it is an advanced option that should only be used if the others are not suitable. If using this option, a custom XSLT transform would need to be written that checked the incoming data for errors. You would then need to define an output format for the transform that details any errors. The second rule would be set up to check for the presence of these errors. The advantage of this approach is that more complex cross validation can be achieved, and it also offers more flexibility in how the errors are reported. The disadvantages lie in the complexity of the approach and the effort required in order to create the needed XSLT transform. screenshot showing example XSL transform validation rules
How To... Implement Data Caching