Skip to main content



      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 10:04 Go to next message
Eclipse UserFriend
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
Re: how to create an image on a server [message #1586049 is a reply to message #1585909] Mon, 26 January 2015 11:38 Go to previous message
Eclipse UserFriend
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: Mon Jul 14 00:51:21 EDT 2025

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

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

Back to the top