cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Json to Model

nbouget
Champ in-the-making
Champ in-the-making
Hi,

I'm using the Activiti json converter 5.15.1 to convert JSON file to BPM Activiti models.

I think there is a bug in a conversion, I'm not able to define execution listeners on events (start event, intermediate event etc.).

For example, parsing a Start event, I get to the point where the execution listener is parsed but at the end it's not added to the Start Event because of these lines I think:

org.activiti.editor.language.json.converter.BaseBpmnJsonConverter.java#convertJsonToListeners
            if (element instanceof Process) {
              ((Process) element).getExecutionListeners().add(listener);
            } else if (element instanceof SequenceFlow) {
              ((SequenceFlow) element).getExecutionListeners().add(listener);
            } else if (element instanceof UserTask) {
              ((UserTask) element).getTaskListeners().add(listener);
            } else if (element instanceof Activity) {
              ((Activity) element).getExecutionListeners().add(listener);
            }

Does someone can confirm the bug ? or tell me where I'm wrong …

Thanks,
Nicolas
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Seems indeed like a bug. A StartEvent is not an Activity nor anything of the other if-clauses.

Feel free to submit a pull request for this (should be pretty easy to do)