public void setFault(QName name, String explanation, int lineNo, int activityId, Element faultData) {
entering("ProcessInstanceDaoImpl.setFault");
if (_instance.getFault() != null)
getSession().delete(_instance.getFault());
HFaultData fault = new HFaultData();
fault.setName(QNameUtils.fromQName(name));
fault.setExplanation(explanation);
fault.setLineNo(lineNo);
fault.setActivityId(activityId);
if (faultData != null) {
fault.setData(DOMUtils.domToBytes(faultData));
}
_instance.setFault(fault);
getSession().save(fault);
getSession().update(_instance);