Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
Issue #157
  • Loading branch information
rsoika committed Sep 24, 2024
1 parent 8cf43e4 commit 59a3fd3
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,20 @@ public void buildPropertiesForm(final BPMNElement bpmnElement, final DataBuilder
public boolean updatePropertiesData(final JsonObject json, final String category, final BPMNElement bpmnElement,
final GModelElement gNodeElement) {

boolean updateClient = false;
// we are only interested in category messages
if ("Message Objects".equals(category)) {

Event bpmnEvent = (Event) bpmnElement;
Set<Element> oldDefinitionList = bpmnEvent.getEventDefinitionsByType("messageEventDefinition");

JsonArray dataList = json.getJsonArray("messageRefs");
// synchronize the definition list of the event element
Set<Element> messageEventDefinitions = synchronizeEventDefinitions("messageEventDefinition", bpmnEvent,
dataList);
if (oldDefinitionList.size() != messageEventDefinitions.size()) {
updateClient = true;
}
// now we can update the values
Iterator<Element> iter = messageEventDefinitions.iterator();
int i = 0;
Expand All @@ -184,8 +190,15 @@ public boolean updatePropertiesData(final JsonObject json, final String category
i++;
// update completed
}

}

if (updateClient) {
// modelState.reset();
modelState.refreshGModelState();

}
return false;
return updateClient;

}
}

0 comments on commit 59a3fd3

Please sign in to comment.