I don’t quite understand how I can combine 2 parts into one BPMN element. At the moment, I have only the icon displayed on the diagram, without the event circle.
Here is my code:
Append Custom Shape
function appendCustomShapeStart() {
return function(event) {
const businessObject = bpmnFactory.create('bpmn:Event');
const shape = elementFactory.createShape({
type: 'bpmn:MultipleEventDefinition',
businessObject: businessObject,
stroke: '#000000',
fill: '#FFF00'
});
create.start(event, shape);
}
}
return {
'append.custom-shape':{
group: 'model',
className: 'bpmn-icon-start-event-multiple',
title: translate('Standart multiple element'),
action: {
click: appendCustomShape(),
dragstart: appendCustomShapeStart()
}
}
};
BPMN Render
'bpmn:ParallelMultipleEventDefinition': function(parentGfx, event) {
var pathData = pathMap.getScaledPath('EVENT_PARALLEL_MULTIPLE', {
xScaleFactor: 1.2,
yScaleFactor: 1.2,
containerWidth: event.width,
containerHeight: event.height,
position: {
mx: 0.458,
my: 0.194
}
});
return drawPath(parentGfx, pathData, {
strokeWidth: 1,
fill: getStrokeColor(event, defaultStrokeColor),
stroke: getStrokeColor(event, defaultStrokeColor)
});
}
Result