eclipsexml-serializationxsdeclipse-emfeclipse-gmf

Serialize Eclipse Graphical Models (e.g. BPMN Diagram) to XML


I'm working on a project where I have to build a graphical process modeler for a proprietary BPM (business process management) system made in java. I'm mentioning that the software is proprietary because it does not follow ANY international standards like BPEL, BPMN, XPDL, and this is a vital information for any answers I may get.

My intended approach is to use the eclipse GMF to create a standalone RCP application, similar to Bonita Studio, where business analysts will graphically model the business processes and deploy the process model into the web application.

This application has an internal wizard-like process modeler, very rudimentary. But this modeler has a functionality to import and export models in a custom, well defined XML format, which is also proprietary and has no international standards.

What I need is to persist the graphical model created with the eclipse gmf rcp application I'm developing into this custom XML format. This way I can simply invoque the import function in the web application and the process will be deployed. I also need to be able to do the reverse: open a custom process in this XML format into my eclipse RCP and show it in a graphical manner.

So, what I need is:

I need to save a graphical diagram in a custom XML format and open a custom XML file in this format and show it as graphical diagrams

Thank you very much for any help!


Solution

  • GMF is using EMF models to store its diagrams. As EMF Models are already able to map to XML, a XSL stylesheet transformation might be enough in most cases to map your model to your custom XML format and vice versa.