db.setErrorHandler(new WorkflowLoader.WorkflowErrorHandler(new URL(url)));
    public static WorkflowDescriptor getDescriptor(String url) throws Exception {        File file = new File(new URL(url).getFile());        if (!file.exists()) {            throw new IllegalArgumentException("file " + file + " does not exist");        }        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();        dbf.setNamespaceAware(true);        dbf.setValidating(true);        DocumentBuilder db = dbf.newDocumentBuilder();        db.setEntityResolver(new DTDEntityResolver());        Document doc = db.parse(new FileInputStream(file));        Element root = (Element) doc.getElementsByTagName("workflow").item(0);        WorkflowDescriptor descriptor = new WorkflowDescriptor(root);        return descriptor;    }