Model Class

This section describes the properties and methods of the Model class as well as error handling. The Model class offers properties and methods for running an interactive KCM Template.

Run an interactive CM Template

With the Model class, it is possible to run KCM Template that can be interactive. Running such a Template is split in two methods:

  1. "Start" method for the initial call
  2. "Continue" method for continuing the Template after an interact is answered

Running an interactive KCM Template is always done by calling the Start method to start running the KCM Template, and one or more Continue calls, depending on the number of INTERACT statements in the KCM Template. Every time the KCM Template comes across an INTERACT, KCM sends out an XML Form with the INTERACT questions. A reference to this XML data is returned in the file mentioned in the Info property of the Master Template object. The questions of the INTERACT can be extracted from this XML and presented to the user, such as with an XSLT. The answers are passed back to the KCM Template in the response parameter of the Continue call.

If the XML Connection is used and no XML data file is passed in the Data property of the Template, KCM Core sends out an XML Form with an INTERACT as well. In this INTERACT the user is asked to select the XML data file that should be used to run the KCM Template.

Also, for every Continue call, the KCM Template is actually rerun completely. This could have possible side effects if the KCM Template or one of the parameters of the Start call updates, such as the database. We recommend, that the developer makes sure that such side effects cannot take place or do not influence the outcome.