JBoss Community

Re: How to get the bpmn file validation information

created by xin sun in jBPM - View the full discussion

Plus: I use below code to validate the bpmn file programmatically and can't find any error in the attached bpmn file. But the Jbpm Console still can's show any process.

 

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

kbuilder.add(ResourceFactory.newClassPathResource("Test0.bpmn"), ResourceType.BPMN2);

if(kbuilder.hasErrors()){

    Iterator itr = kbuilder.getErrors().iterator();

    while(itr.hasNext()){

        KnowledgeBuilderError error = (KnowledgeBuilderError)itr.next();

        System.out.println(error.getMessage());

    }

}

Reply to this message by going to Community

Start a new discussion in jBPM at Community