Types
There is a special ModelResult enumeration type (actually, a set of int constants) that specifies the possible outcomes of a call:
- ModelResultReady (=0): model has run. The final document will be returned in the Result file. If the History flag was set, the Infofile will contain all interact data in XML format. This will NOT destroy the session information on the server.
- ModelResultInteract (=1): Info contains an XML with an interact Form (XFoms 1.0). The identification of the replay stage must be included in the interact Form itself. In addition, if Preview has been set, a partial document will be returned in the file indicated by the Preview file. The API user should react to this result by calling Continue with the result of this (or any previous) Form as an argument. Furthermore, the user must ensure that the Session property is maintained (just like host, port etc.).
- ModelResultError (=2): An error has occurred. Info contains error info in XML format. This will NOT destroy the session information on the server: a user is still able to go back to a previous interact, and resubmit other interact data.
- ModelResultDBUnauthorised (=3): ITP/Server was unable to logon to the database due to an authorization error for some "domain" (i.e. environment/did/...etc.). This implies that the Java API itself did not have the corresponding authorization information in its cache for this domain. Info contains an XForm that requests for credentials. The format is specified in this document, in the XML Format chapter. Basically, the format adheres to the interact Form. The user of the API must react by calling Continue with the result of this Form as an argument, similar to an ordinary interact.