The class Aia.ITP.OnLine.Model makes it possible to run ITP Models that interact with a user. Running such a model always follows the following procedure:
Start to perform an initial run of the model.Continue to send responses to the interaction and re-run the model.Finish to allow ITP/OnLine Server to clean up after the model run.So, running an interactive ITP Model is always done by calling the method Start to start running the ITP Model, and one or more calls to the method Continue. The number of calls depends on the number of FORM statements and other interaction requests in the ITP Model.
Every time the ITP Model comes across a FORM statement or other interaction request, ITP will send out an XForms XML document that contains the Form questions. This XML data will be stored into the file specified by the property InfoFile of the object Aia.ITP.OnLine.Model. The Form questions can be extracted from this XML e.g., by using an XSLT transformation, and presented to the user. The answers have to be passed back to the ITP/OnLine Server through the parameter response of the call Continue.
Note:
Interaction requests do not result only from FORM statements in the ITP Model. There are several other situations in which XML forms are generated by ITP/Server. For instance, if the ITP XML File Connection is used and no XML data file using the property DataFile is specified, ITP/Server will send out an XML form. In this Form, the user is asked to select the XML data file that will be used to run the ITP Model.
Note:
For every Continue call, the ITP Model is actually re-run completely. This could possibly have adverse side effects if the ITP Model or one of the parameters of the call Start is changed, for instance, the database. The developer must ensure that such side effects either cannot take place, or cannot influence the outcome.