Is there no type for BoundaryEvents?


#1

Hi, I’m trying to simulate some processes with bpmn-js. Regarding BoundaryEvents, is there really no type like “Message_Boundary_Event” in the elementRegistry or in the bpmn file?


#2

Such an event is defined by a bpmn:BoundaryEvent that has a bpmn:MessageEventDefinition.

Hope that helps.


#3

perfect, thank you very much!!

I already see the parent of the boundary_event with
var parent_id = elementRegistry._elements[“BoundaryEvent_0eep1xg”].element.businessObject.eventDefinitions[0].$parent.attachedToRef.id

is there also a direct way to get the boundary_event from the parent without editing the elementRegistry?
elementRegistry._elements[parent_id].???

Thank you once again!!


#4

Please make sure to use the public APIs such as ElementRegistry#get to avoid your code breaking due to changes to the internals.

Simply do:

var myBoundaryEvent = elementRegistry.get('myBoundaryEventId');

var myTask = byBoundaryEvent.host;

image


#5

good point!! thank you very much!!