logger.debug("Added new Cross Diagnosis for sensor: \n"+sensorType.toString() );
if (logger.isDebugEnabled()) logger.debug("Added new Cross Diagnosis for sensor: \n"+sensorType.toString() );
    protected Vector processElement(Element element) {                        //publish to BB during execute().        //1. Create a new AssetType instance &        String sensorType = element.getAttribute("sensorType");        String affectedBy = element.getAttribute("isAffectedByStateDimension");                DiagnosisTechSpecInterface dtsi = diagnosisTechSpecService.getDiagnosisTechSpec(sensorType);        if (dtsi == null) {            logger.error("CrossDiagnosis XML Error - sensor type not found = " + sensorType );            return null;        }                AssetStateDimension affectedBy_asd = dtsi.getAssetType().findStateDimension(affectedBy);        if (affectedBy_asd == null) {            logger.error("CrossDiagnosis XML Error -  asset state dimension not found! unknown isAffectedByStateDimension dimension: "+affectedBy+ " for asset type = " + dtsi.getAssetType());            return null;        }                        CrossDiagnosis crossD = new CrossDiagnosis( dtsi, affectedBy_asd);        //Create a SensorType        Element e;        for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) {            if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equalsIgnoreCase("WhenActualStateIs") ) {                e = (Element)child;                String whenActualStateIs = e.getAttribute("name");                                AssetState when_as = affectedBy_asd.findAssetState(whenActualStateIs);                if (when_as == null) {                    logger.error("Event XML Error - direct effect asset state not found! unknown WhenActualStateIs : "+whenActualStateIs+ " for asset type = " + dtsi.getAssetType());                    return null;                }                                                DiagnosisProbability dp = new DiagnosisProbability(when_as);                //sensor.addDiagnosisProbability(dp);                parseWhenActualStateIsElements(e, dp, whenActualStateIs, dtsi, affectedBy_asd);            } //else, likely a text element - ignore                    }        diagnosisTechSpecService.addCrossDiagnosis(crossD);                logger.debug("Added new Cross Diagnosis for sensor: \n"+sensorType.toString() );                    return null;    }