|
Re: Access the process model programmatically? [message #1059790 is a reply to message #1059633] |
Tue, 21 May 2013 15:35 |
|
Hi Ivan,
Have a look at the Outline viewer in BPMN2EditorOutlinePage. This uses an EditPartFactory for the ContentOutlinePage tree viewer, but the concepts should be similar to using a tree content provider.
You may also want to have a look at the default tree editor generated by EMF for the bpmn2 metamodel. This plugin is in the eclipse bpmn2 project, named org.eclipse.bpmn2.editor.
Starting with the EMF Resource loaded from a bpmn2 file, its contents is a DocumentRoot object (defined in the Bpmn2Package) and from that you can get the <bpmn2:definitions> element. See ModelUtil.getDefinitions(Resource) for example. <bpmn2:definitions> is the root of the BPMN2 document and contains both the business logic model (Definitions.rootElements) as well as the Diagram Interchange model (Definitions.diagrams).
HTH,
Bob
|
|
|
Powered by
FUDForum. Page generated in 0.03635 seconds