Document Handler Flow Chart in Microsoft Dynamics AX
This topic describes the order in which the specific methods are called on your document handlers when a request document arrives in the document queue.
All document handlers must extend MobDocumentHandler, so your document handler may not have overridden all methods. In this case, the parent methods are called.
Method Call Sequence
At run time, Mobile Development Tools – Server Components calls a number of methods on your document handler. The following diagram illustrates the sequence in which they are called:
The following list provides details for each step in the diagram. For more information, see each method in the See Also section.
-
newDocumentType
Looks up the requested document type and finds out which document handler to use.
-
setMessageId
Gets the GUID for the request from the incoming request document and assigns the value to the messageId property. The document handler can then look up the record in the document queue, if needed.
-
setRequestXml
Fills the requestXml property with the exact XML that makes up the request document.
-
In the case of direct processing, the following steps are carried out:
-
unpack
Makes any packed parameters available for further processing.
-
run
A wrapper method that calls validateRequestXml and then calls process, which typically carries out the actual work of processing the request.
-
getResultStr
Returns the content of the resultStr property.
-
getResult
Returns the XML contained in the resultXml property as a string.
-
-
In the case of enqueued processing, the following step is carried out:
-
enqueuedAnswer
Gets the answer to send back to the mobile client.
-
-
getDocumentContentSubject
Gets a subject string to save with the request, which shows up in the document queue.
When an enqueued request is processed manually later in the Document queue form in Microsoft Dynamics AX, step four and its sub steps are carried out.