diff --git a/imixs-workflow-core/src/main/java/org/imixs/workflow/bpmn/BPMNModelHandler.java b/imixs-workflow-core/src/main/java/org/imixs/workflow/bpmn/BPMNModelHandler.java index 1fb7306b2..f06163426 100644 --- a/imixs-workflow-core/src/main/java/org/imixs/workflow/bpmn/BPMNModelHandler.java +++ b/imixs-workflow-core/src/main/java/org/imixs/workflow/bpmn/BPMNModelHandler.java @@ -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 @@ -691,6 +685,8 @@ public BPMNModel buildModel() throws ModelException { for (String eventID : eventCache.keySet()) { List sourceTaskList = findSourceTasks(eventID); for (ItemCollection sourceTask : sourceTaskList) { + + // resolve signal information (Issue #811) addImixsEvent(eventID, sourceTask); } } @@ -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)); }