I added this listener to my bpmn modeler
eventBus.on('connect.end',2000, function(event) {
console.log(event);
let context=event.context;
if (context.source.id===context.target.id || !self.checkConnection(context)){
return false;
}
});
So when this listener is triggered(when I create a connection) I print the context in the console assuming I would find both the ids of the source shape and the target shape but as you can see in the image below the target information is missing/null.
- Is it supposed to be this way? if so is there is any alternative (another listener I could use,I already tried a bunch of listeners but this one was the closest to what I was looking for apart from this issue)?.
Edit: I just realized that source is also null, but I am able to find the source Id with context.start but can’t figure out how to get the target id still.