Yay, I’ve got it working. Thank you Niklas for pushing me in a right direction, also a huge help was that post.
It appears that passing the name
property itself doesn’t work. What you want to do instead is to set the name
prop for a businessObject
of a shape.
Here is an example:
const sdi0 = elementFactory.createShape({
type: 'bpmn:StartEvent',
x: 40,
y: 8,
parent: deviceContainer
});
sdi0.businessObject.name = "in";