Skip to main content



      Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Access the process model programmatically?
Access the process model programmatically? [message #1059633] Mon, 20 May 2013 21:46 Go to next message
Eclipse UserFriend
Hello,

I have to implement additional tree viewer into the modeler, which will actually show the computed RPST( Refined Process Structure Tree) of the process model created previously in the designer.
I added simple tree viewer as extension in org.eclipse.bpmn2.modeler.runtime.example.
But now I'm stacked because I don't know how to access the process model programmatically and use as a source in the Tree Viewer?

Thanks in advance
Re: Access the process model programmatically? [message #1059790 is a reply to message #1059633] Tue, 21 May 2013 11:35 Go to previous message
Eclipse UserFriend
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
Previous Topic:Launch BPMN modeler plugin from source code
Next Topic:anchor points
Goto Forum:
  


Current Time: Thu Jul 24 14:23:49 EDT 2025

Powered by FUDForum. Page generated in 0.03401 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top