Signal Expression is not considered while creating xml from BPMNModel object

Hi,
In my application, I generate the BPMNModel object thorough the java api’s.
Then pass the bytearray of the same for the deployment.

I have a requirement where i need to have IntermediateSignalCatchEvent with the signal name as dynamic.
For this i used : org.flowable.bpmn.model.SignalEventDefinition#setSignalExpression method.
SignalEventDefinition definition = new SignalEventDefinition();
definition.setSignalExpression("${signalName}");
eventDefinitions.add(definition);
I observed that the BPMNModel object has the information about the signalExpression.

But when I use org.flowable.bpmn.converter.BpmnXMLConverter#convertToXML(org.flowable.bpmn.model.BpmnModel) to generate the byte array
The generate byte array does not have the information about the signalExpression and only the empty signalEventDefinition tag is present.

On debugging I found that the following code does not appear to consider the signalExpression from the SignalEventDefinition object.

protected void writeSignalDefinition(Event parentEvent, SignalEventDefinition signalDefinition, XMLStreamWriter xtw) throws Exception {
xtw.writeStartElement(ELEMENT_EVENT_SIGNALDEFINITION);
writeDefaultAttribute(ATTRIBUTE_SIGNAL_REF, signalDefinition.getSignalRef(), xtw);
if (parentEvent instanceof ThrowEvent && signalDefinition.isAsync()) {
BpmnXMLUtil.writeQualifiedAttribute(ATTRIBUTE_ACTIVITY_ASYNCHRONOUS, “true”, xtw);
}
boolean didWriteExtensionStartElement = BpmnXMLUtil.writeExtensionElements(signalDefinition, false, xtw);
if (didWriteExtensionStartElement) {
xtw.writeEndElement();
}
xtw.writeEndElement();
}

Is this the intended behavior or is it a bug?
If it is the intended behavior then can you please share the info as to how i can add the signalExpression to the finale byte array?

Correct analysis, that is indeed a bug. Fixed it here: https://github.com/flowable/flowable-engine/commit/a3c2e9cd2d72113222851904b4bd1c9b8e47ce33 (thanks for pointing in the right direction!).

Thanks for your confirmation.

Hi

I am a user on flowable forum and when posting new question, getting message ‘Sorry, new users can only mention 2 users in a post’ thus unable to create any topic/post new question.
I am messaging only 1 admin user and even with no user , I am getting above message. Kindly help me to start posting questions.

Thanks
Shashank