Document integrity
Even though the document hierarchy defines the required structure of the batch, Datacap might encounter a batch that does not conform to the required structure.
For example, a batch in the TravelDocs application might include a rental agreement page that is followed by two optional insurance pages. Similarly, a batch might include an optional insurance page that is not preceded by a rental agreement page.
The following runtime batch has two structural integrity issues.

- In the first case, the CreateDocuments action grouped the first optional insurance page with the preceding rental agreement page. The action also placed the second insurance page in a separate document of a unidentified type.
- In the second case, the CreateDocuments action again placed the orphaned insurance page in a document of a unidentified type.
In both cases, the batch does not comply with the document integrity rules that are defined in the document hierarchy. However, the CreateDocuments action sets the document status to 0 (OK) and the page status to 49 (ScanOK).
<D id="20100322.007.03">
<V n="TYPE"></V>
<V n="STATUS">0</V> <-- Document status is "OK" (0)
<P id="TM000003">
<V n="TYPE">Optional_Insurance</V>
<V n="STATUS">49</V> <-- Page status is "ScanOK" (49)
etc.
</P>
</D>
etc.
<D id="20100322.007.07">
<V n="TYPE"></V>
<V n="STATUS">0</V> <-- Document status is "OK" (0)
<P id="TM000007">
<V n="TYPE">Optional_Insurance</V>
<V n="STATUS">49</V> <-- Page status is "ScanOK" (49)
etc.
</P>
</D>