instanceSpecList = dataSpec.getChildren("instance", ns);
Iterator instanceIter = instanceSpecList.iterator();
while(instanceIter.hasNext()) {
instance = ((Element) instanceIter.next());
if(instance.getContentSize() == 0) { //empty string or whitespace
throw new CoordinatorJobException(ErrorCode.E1021, "<instance> tag within " + eventType + " is empty!");
}
instanceValue = instance.getContent(0).toString();
boolean isInvalid = false;
try {
isInvalid = evalAction.checkForExistence(instanceValue, ",");
} catch (Exception e) {
handleELParseException(eventType, dataType, instanceValue);
}
if (isInvalid) { // reaching this block implies instance is not empty i.e. length > 0
handleExpresionWithMultipleInstances(eventType, dataType, instanceValue);
}
}
// In case of input-events, there can be multiple child <start-instance> datasets. Iterating to ensure none of them have errors
instanceSpecList = dataSpec.getChildren("start-instance", ns);
instanceIter = instanceSpecList.iterator();
while(instanceIter.hasNext()) {
instance = ((Element) instanceIter.next());
if(instance.getContentSize() == 0) { //empty string or whitespace
throw new CoordinatorJobException(ErrorCode.E1021, "<start-instance> tag within " + eventType + " is empty!");
}
instanceValue = instance.getContent(0).toString();
boolean isInvalid = false;
try {
isInvalid = evalAction.checkForExistence(instanceValue, ",");
} catch (Exception e) {
handleELParseException(eventType, dataType, instanceValue);
}
if (isInvalid) { // reaching this block implies start instance is not empty i.e. length > 0
handleExpresionWithStartMultipleInstances(eventType, dataType, instanceValue);
}
}
// In case of input-events, there can be multiple child <end-instance> datasets. Iterating to ensure none of them have errors
instanceSpecList = dataSpec.getChildren("end-instance", ns);
instanceIter = instanceSpecList.iterator();
while(instanceIter.hasNext()) {
instance = ((Element) instanceIter.next());
if(instance.getContentSize() == 0) { //empty string or whitespace
throw new CoordinatorJobException(ErrorCode.E1021, "<end-instance> tag within " + eventType + " is empty!");
}
instanceValue = instance.getContent(0).toString();
boolean isInvalid = false;
try {
isInvalid = evalAction.checkForExistence(instanceValue, ",");