using Bpmn2DiagramEditorInput to change the bp diagram programmatically [message #1852393] |
Fri, 13 May 2022 15:04 |
Zenith Arnejo Messages: 10 Registered: May 2022 |
Junior Member |
|
|
Good day,
Just a question regarding Bpmn2DiagramEditorInput.
I am trying to instantiate a bp diagram using this class, and thankfully I can create a diagram and read a diagram using it.
What I'm trying now is to change the contents of the bp diagram.
I have this to read/create a diagram:
Bpmn2DiagramEditorInput bp_diagram = (!file.exists()) ?
BPMN2DiagramCreator.createDiagram(uri, Bpmn2DiagramType.PROCESS, "www.omg.org/spec/BPMN/2.0/"):
openFileDiagram(uri);
Then, I can load the diagram using this:
BPMN2DiagramCreator.openEditor(bp_diagram);
What I'm trying to do is change the contents of bp_diagram, before it is rendered in the editor.
I've been trying a couple of approaches, but nothing worked so far.
The most recent one I tried is to create a BPMNdiagram and put it in bp_diagram using:
bp_diagram.setBpmnDiagram(diag).
When I load the definition of bp_diagram, I can read the diagram that I added, but when I render it, it's not displayed.
Any suggestions to approach this are greatly appreciated.
Looking forward to some response.
Thanks you in advance,
Zenith
UPDATE:
It can now reflect the changes on the diagram, thank God :)
[Updated on: Fri, 13 May 2022 18:01] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03603 seconds