With the Model class, it is possible to run ITP Models that can be interactive. Running such a Model is split in two methods:
Running an interactive ITP Model is always done by calling the Start method to start running the ITP Model, and one or more (dependent on the number of INTERACT statements in the ITP Model) Continue calls. Every time the ITP Model comes across an INTERACT, ITP will send out an XML Form with the INTERACT questions. A reference to this XML data will be returned in the file mentioned in the Info property of the Model object. The questions of the INTERACT can be extracted from this XML (for example with an XSLT) and presented to the user. The answers have to be passed back to the Model in the response parameter of the Continue call.
Note:
If the XML Connection is used and no XML data file is passed in the Data property of the Model, ITP/Server will send out an XML Form with an INTERACT as well. In this INTERACT 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 rerun completely. This could have possible side effects if the ITP Model or one of the parameters of the Start call updates, for instance, the database. The developer must make sure that such side effects cannot take place or do not influence the outcome.