Get name of signal in custom AbstractBpmnParseListener

Hey,
actually I’m experimenting with Camunda and MQTT (for some smarthome automation :wink: ) and I want to get the set name of a signal (set in a SignalIntermediateCatchEvent)

    <bpmn:intermediateCatchEvent id="Event_S1" name="S1">
      <bpmn:incoming>Flow_0hjsfz5</bpmn:incoming>
      <bpmn:outgoing>Flow_0cb28xt</bpmn:outgoing>
      <bpmn:signalEventDefinition id="SignalEventDefinition_0j4di1f" signalRef="Signal_1x4otk3" />
    </bpmn:intermediateCatchEvent>

In my AbstractBpmnParseListener custom implementation I have overridden the method

    @Override
    public void parseIntermediateSignalCatchEventDefinition(Element signalEventDefinition, ActivityImpl signalActivity) {
        super.parseIntermediateSignalCatchEventDefinition(signalEventDefinition, signalActivity);

// How to get the name of the Signal "S1" here?
      
    }

Is there a way to get the parent element/node from the signalEventDefinition? So using the “attribute()” method on the parent element could help here?

Cheers!

I found following way to get the signalName:

Inside the parse method I get the signalRef attribute/value from the signalEventDefinition. That value will be used in the notify method of the ExecutionListener impl to get with following code snippet the signal name:

            signalName = execution.getProcessEngineServices()
                    .getRepositoryService()
                    .getBpmnModelInstance(execution.getProcessDefinitionId())
                    .getModelElementById(signalRef)
                    .getAttributeValue("name");