I’m able to generate the POJOs, except when I add in flowable-bpmn-extensions.xsd or activiti-bpmn-extensions-5.4.xsd (depending on which library I pull these out of there seem to be no difference)
When I add the extensions xsd to my list of XSDs to be picked up by jaxb2-maven (xjc)
I get the following exception when generating the pojos:
[ERROR] file:/C:/path/to/project/src/main/resources/flowable_xsd/activiti-bpmn-extensions-5.4.xsd [221,60]
com.sun.istack.SAXParseException2: Property "Expression" is already defined. Use <jaxb:property> to resolve this conflict.
and a little further down, it says:
[ERROR] file:/C:/path/to/project/src/main/resources/flowable_xsd/activiti-bpmn-extensions-5.4.xsd [225,76]
com.sun.istack.SAXParseException2: The following location is relevant to the above error
Has anyone done this before/any advice on resolving the issue?
No, the BpmnModel classes are part of the transitive dependencies of the flowable-engine module. So for example when using Maven, adding flowable-engine will automatically add these classes to your classpath.
Thanks, this helped a lot, after asking the question I looked into it a little bit more, for my purposes I’ll need to write the model back to XML after I’ve finished creating it.