cancel
Showing results for 
Search instead for 
Did you mean: 

Forcing Activiti editor to refresh from bpmn file

breakline
Champ in-the-making
Champ in-the-making
Hi!

We're trying to implement a custom text based editor for bpmn files. When this editor's content is changed, we want the activiti editor instance with the same resource open to refresh itself from the bpmn file.

Is there an easy way to do this? We figured there is an  "Update" command in the context menu but it doesnt seem to work when we change the files outside of Eclipse (so in a text editor like Notepad for example).

I suspect most of the refresh functionality only refreshes the editor from the model.

Also we found the "DefaultUpdateBehavior" class which has a "setResourceChanged" method, but setting this to true just makes all the elements of the editor part invisible and nothing happens.

Thank you in advance
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
The way graphiti works is that is creates an intermediate file, containing a diagram that graphiti can understand. As long as the activiti-editor is open, it manipulates that representation. When saved, the original BPMN-file is written with the changes? However, as long as the editor-window is open, the BPMN source file will not be read agian.

A solution would be to find the right editor and close/re-open it, to have the BPMN read.

breakline
Champ in-the-making
Champ in-the-making
Thank you.

Is there a simple way to disable editing in an activiti editor? Because we're thinking about letting the user have both editors open but disable one if the other is dirty.