The Other Charges page includes calculation
errors to trigger validation failures. When you run the batch through
the workflow, you can see the validation failures.
- Click the Datacap Studio Test tab.
- In the Workflow pane, select the VScan task
profile under Main Job.
- Click New to start a new batch.
- Click Process rules for target object and Advance to
move the batch through to the Verify task (do
not run the Verify task).
- Open the application's most recent batch folderC:\Datacap\TravelDocs\batches\batch_id. Then,
open the file Ruleruner.xml and scroll down to
the data for page TM0000013.
<P id="TM000013">
<V n="TYPE">Other_Charges</V>
<V n="STATUS">1</V> <-- Page status is 1
etc.
<V n="MESSAGE">Failed Calculation:FormatNumber(138.75 ,8,0,0) <--Calc failure
FormatNumber( 238.75,8,0,0)</V>
<V n="DATAFILE">tm000013.xml</V>
</P>
The page status is 1' (indicating a problem)
and the message indicates that the calculation for the Total_Charges field
failed.
- Open the file tm000013.xml. Notice
that there is a calculation failure in the first line item and that
Taskmaster flags all the fields that are involved in the calculation.
<F id="Other_Charges_Line_Item0">
<V n="TYPE">Other_Charges_Line_Item</V>
etc.
<F id="Quantity">
etc.
<V n="STATUS">1</V>
<V n="MESSAGE">Failed By Calculate Action On Field <-- Quantity field
'Validation'.</V>
etc.
</F>
<F id="Unit_Cost">
etc.
<V n="STATUS">1</V>
<V n="MESSAGE">Failed By Calculate Action On Field <-- Unit_Cost field
'Validation'.</V>
etc.
</F>
<F id="Total">
etc.
<V n="STATUS">1</V>
<V n="MESSAGE">Failed By Calculate Action On Field <-- Total field
'Validation'.</V>
etc.
</F>
<F id="Validation">
etc.
<V n="STATUS">1</V>
<V n="MESSAGE">Failed Calculation:FormatNumber <-- Validation field
(1 * 4.95 ,8,0,0)=FormatNumber( 9.9,8,0,0)</V>
</F>
</F>
- In Datacap Studio, cancel the batch when you are done.