Advanced Policy not able to create PolicyViolation

Suresh,

The rule code looks clean to me. The toXml method can throw a GeneralException. As such, you may want to wrap the method call in a try-catch block.

try {
  log.error("policy object xml"+v.toXml());
} catch (GeneralException e) {
  log.error("printing the policy violation object caused a GeneralException", e);
}

Rob