ValidateModel.dss

This script is called when a user selects a model from a prepared model list. The purpose of this script is to validate that the model that is selected by the user is actually one of the models that were part of the prepared model list. If this is indeed the case, the script should write the path to the model in a session variable with the key defined by the parameter KeyModel of the script and a human readable representation of the model in a session variable with the key defined by the parameter KeyLabel of the script. If the model is not valid, the script should throw an error.

There is a strict correspondence between the exit point ListModels.dss, which produces an xml file, and the exit point ValidateModel.dss, which validates a model reference against this xml file. Modifying one of these exit points often requires a corresponding modification in the other.

The default behavior implemented in the script is that it validates the parameter ModelRef against the provided XMLFile. If it is valid, it will set some session variables. Other forms of authorization can be implemented by adapting the script.

Parameters

The script is called with the following parameters: