Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
Ivan Jovanovikj is currently offline Ivan Jovanovikj
Messages: 1
Registered: March 2013
Junior Member
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
Robert Brodt is currently offline Robert Brodt
Messages: 577
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

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:"User task has no task name"
Next Topic:Launch BPMN modeler plugin from source code
Goto Forum:
  


Current Time: Thu Jul 24 16:07:05 EDT 2014

Powered by FUDForum. Page generated in 0.01557 seconds