2008jul17 Steve Culver
There are two issues relating to "batches" that I'd like to discuss.
First, how will we handle errors? It is inevitable that at some point
two different products will be mixed in one dyer, or goods from two
different customers will be in a basket waiting to go thru a folder.
In both cases only one value should be present, so what do we do? We
could arbitrarily assign the combined batches to one of the
customers. We could assign these goods to the productCode that sorts
first alphabetically. We could report nothing more than "error". We
could insert some kind of flag indicating that an error was made and
append the codes for someone else to sort out later. Something along
the lines of
...
<customerCode>
error<customerCode>F4R77</customerCode><customerCode>PG34F</
customerCode>
</customerCode>
...
The other issue is how will we store and transmit combined
batchCodes? Suppose <batchCode>1234</batchCode> is dumped into a
dryer, followed by <batchCode>5678</batchCode>. When that dryer is
emptied into a cart, I propose that the XML record that describes
those combined batches include the following:
...
<batches>
<batchCode>1234</batchCode><batchCode>5678</batchCode>
</batches>
...