Is there any way to get Lane element reference when I drag and drop an element onto a lane from the pallette? By default when I inspected the newly created element’s parent it was the participant, not the lane. But I need to set the lane as its parent.
Why do you want to do this? Notice that in BPMN lanes contain only references to the elements which belong to the process referred by the participant, e.g.
because in the system I’m working on events (called states in the system) belong to (are children of) lanes (stages).
So is there any way to get that information programmatically?
I’ve stumbled upon a couple of events that I could use on the eventBus: element.hover and commandStack.elements.create.postExecute.
But when combined, I cannot drag any element from the pallette to the diagram.
drag.hover actually worked, but it came with another issue: when I listen to drag.hover events, I cannot connect two elements. In the following screenshot I’m trying to create a sequence flow from the gateway to event:
The other way around does not work either.
In the sandbox this issue does not exist though.
What is supposed to be done in this case? Is it a styling issue? Console does not show any errors.
As a result I get the newly created element plus the parent element where the new element was dropped in, and I’m now able to manually assign it as the actual parent of the new element.
I hope other people find it helpful.
Thank you for your suggestions.