Community
Participate
Working Groups
The value of the location attribute of import elements should be interpreted as relative to the URI of the importing document. Example: Document /absolute/path/to/A.bpmn2 has an import element with location="subfolder/B.bpmn2". This should be resolved as "/absolute/path/to/subfolder/B.bpmn2". At the moment, this only works if the BPMNResource of the importing document (A) that contains the import element is created with an absolute URI. If the resource has a relative URI (which should be common when constructing BPMN models), a relative import location can not be (de)resolved, as location and resource/base URI are relative. (With the current implementation, it works if the import location is relative to the working directory instead of the importing document, which is not what we want, because the working directory of a program execution can change and has no meaning for the BPMN model.) As a second way of specifying the import location, we should also support absolute URIs in the location attribute.
This affects saving and loading, so BpmnXmlHelper.getNsPrefix (for saving) and ~.getPathForPrefix or QNameURIHandler.resolve (for loading) need to be adapted.
Fixed in e9996e93e211031c6f1f6c263aa9dbbcb9ba2b11 Preceding commits introduce corresponding test cases.