Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » how to create an image on a server
how to create an image on a server [message #1585909] Mon, 26 January 2015 15:04 Go to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 202
Registered: July 2009
Location: Switzerland
Senior Member
Hello

I would like to create an image of a BPMN diagram on the server side without having to load the entire editor environment.

I got the following test snipped so far:
		URI modelUri = URI.createFileURI("D:/temp/data.bpmn");
		URI diagramUri = URI.createFileURI("D:/temp/data.diagram");

		TransactionalEditingDomain editingDomain = createResourceSetAndEditingDomain();
		ResourceSet resourceSet = editingDomain.getResourceSet();
		resourceSet.setURIConverter(new ProxyURIConverterImplExtension(modelUri));
		Bpmn2ResourceImpl resource = (Bpmn2ResourceImpl) resourceSet.createResource(modelUri,
				Bpmn2ModelerResourceImpl.BPMN2_CONTENT_TYPE_ID);

		ModelHandler modelHandler = ModelHandlerLocator.createModelHandler(modelUri, resource);

		URI uridiagram = diagramUri.appendFragment("/0"); // diagram is first object
		Diagram diagram = (Diagram) editingDomain.getResourceSet().getEObject(uridiagram, true);


The question now is how do I generate the according GraphicalEditPart from the diagram? If I look at the EditPartFactories e.g. org.eclipse.graphiti.ui.internal.partfactory.PictogramsEditPartFactory it would require to initialize a whole editor. Does anybody have a snippet or can point me in the right direction?

greets and thanks
Flavio


Prozessmanagement und Qualit├Ątsmanagement Software QMS/IMS
https://www.scodi.ch
Re: how to create an image on a server [message #1586049 is a reply to message #1585909] Mon, 26 January 2015 16:38 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Flavio,

Unfortunately, the diagram rendering requires MOST of the BPMN2 Modeler code. You may want to talk to Darrel on this thread - I think he's working on refactoring the code so that fewer external dependencies are required for a basic graphical viewer.

Cheers,
Bob
Previous Topic:Morph Gateway not available
Next Topic:Documentation for adding new Runtime
Goto Forum:
  


Current Time: Tue Aug 21 11:56:34 GMT 2018

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

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

Back to the top