IfInstruction ifInst = new IfInstruction();
// if an exception should be thrown as the default choice, then add a sub program to that
if (choice.throwExceptionOnDefault()) {
Program subProgram = new Program();
subProgram.addInstruction(new AbortProcessingInstruction());
DefaultCondition defCondition = new DefaultCondition(subProgram);
ifInst.setDefaultCondition(defCondition);
}
// to be used by the criteria nodes.
context.put(choice, ifInst);