static Document loadDefinition ( final File def ) { // Parse the jDPL definition into a DOM tree. final Document document = XmlUtils . parseFile ( def ) ; if ( document == null ) { return null ; } // Log the jPDL version from the process definition (if applicable and available). final Node xmlnsNode = document . getFirstChild ( ) . getAttributes ( ) . getNamedItem ( "xmlns" ) ; if ( xmlnsNode != null && StringUtils . isNotBlank ( xmlnsNode . getNodeValue ( ) ) && xmlnsNode . getNodeValue ( ) . contains ( "jpdl" ) ) { final String version = xmlnsNode . getNodeValue ( ) . substring ( xmlnsNode . getNodeValue ( ) . length ( ) - 3 ) ; LOGGER . info ( "jPDL version == " + version ) ; } return document ; }
Load a process definition from file .