0.3.0 Milestone 8
Pre-releaseThis release patches issues #115, #49 and wraps up #43
The biggest change:
Changing the way HL issues are handled
In order to enable users to easily generate an 824 error message when there are looping errors a significant change was made to the GenericTransactionSetParser
and the DefaultAsn856TransactionSetParser
. Neither of these parsers will throw an X12ParserException
when the looping structure of a document is broken (see the X12LoopUtil
and #115 ).
Instead the GenericTransactionSet
and the AsnTransactionSet
will have new attributes:
- boolean loopingValid
- List loopingErrors
When an error in looping occurs then loopingValid will be set to false and all of the issues will be added to the loopingErrors list.
It is expected that after parsing, the code should verify how looping was handled.
StandardX12Document x12 = asnParser.parse(new String(asnBytes));
List<X12TransactionSet> txForGroupOne = x12.getGroups().get(0).getTransactions();
AsnTransactionSet asnTx = (AsnTransactionSet) txForGroupOne.get(0);
if (!asnTx.isLoopingValid()) {
// handle looping errors
} else {
// looping ok
}