Skip to content

Commit

Permalink
changed impl
Browse files Browse the repository at this point in the history
Issue #811
  • Loading branch information
rsoika committed Mar 20, 2023
1 parent d1bf474 commit 9a5a228
Showing 1 changed file with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,9 @@ public void endElement(String uri, String localName, String qName) throws SAXExc
// adapt deprecated proptery format
adaptDeprecatedEventProperties(currentEntity);

// adapter ?
// If we have a adapter ref we store this id for later?
if (currentSignalRefID != null && !currentSignalRefID.isEmpty()) {
String signalName = signalCache.get(currentSignalRefID);
if (signalName != null && !signalName.isEmpty()) {
currentEntity.setItemValue("adapter.id", signalName);
} else {
logger.warning("Event " + currentEntity.getItemValueInteger("id") + " Signal Ref " + signalName
+ " is not defined!");
}
currentEntity.setItemValue("signal.ref.id", currentSignalRefID);
}

// we need to cache the activities because the sequence flows must be
Expand Down Expand Up @@ -691,6 +685,8 @@ public BPMNModel buildModel() throws ModelException {
for (String eventID : eventCache.keySet()) {
List<ItemCollection> sourceTaskList = findSourceTasks(eventID);
for (ItemCollection sourceTask : sourceTaskList) {

// resolve signal information (Issue #811)
addImixsEvent(eventID, sourceTask);
}
}
Expand Down Expand Up @@ -1204,6 +1200,18 @@ private void addImixsEvent(String eventID, ItemCollection sourceTask) throws Mod
event.setItemValue("loopEvent", true);
}

/* Resolve Adapter */
String signalRefID=event.getItemValueString("signal.ref.id");
if (signalRefID != null && !signalRefID.isEmpty()) {
String signalName = signalCache.get(signalRefID);
if (signalName != null && !signalName.isEmpty()) {
event.setItemValue("adapter.id", signalName);
} else {
logger.warning("Event " + event.getItemValueInteger("id") + " Signal Ref " + signalRefID
+ " is not defined!");
}
}

model.addEvent(verifyActiviytIdForEvent(event));
}

Expand Down

0 comments on commit 9a5a228

Please sign in to comment.