You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the BpmnXMLConverter to convert a BpmnModel to XML, I defined a delegateExpression for the servicetask element, but it is lost during the conversion process,
Expected behavior
conversion process can convert the delegateExpression attribute
Code
BpmnModel model = new BpmnModel();
Process process = new Process();
...
flowElement = new ServiceTask();
...
ExtensionAttribute extensionAttribute = new ExtensionAttribute();
extensionAttribute.setNamespace(BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE);
extensionAttribute.setNamespacePrefix(BpmnXMLConstants.FLOWABLE_EXTENSIONS_PREFIX);
extensionAttribute.setName("delegateExpression");
extensionAttribute.setValue("${" + delegateExpression + "}");
flowElement.addAttribute(extensionAttribute);
BpmnAutoLayout bpmnLayout = new BpmnAutoLayout(model); //debug can see the delegateExpression attribute
bpmnLayout.execute();
// convert to xml
BpmnXMLConverter converter = new BpmnXMLConverter();
xmlBytes = converter.convertToXML(model, "UTF-8");
String xmlString = new String(xmlBytes, "UTF-8"); //missing the delegateExpression attribute in XML
Additional context
flowable version: 6.8.1, using mysql database, spring boot:2.7.18
The text was updated successfully, but these errors were encountered:
Some attributes are treated specially by Flowable. In order to achieve what you are looking for you should not use an extension attribute. Rather use the setters on the ServiceTask itself.
Describe the bug
When using the BpmnXMLConverter to convert a BpmnModel to XML, I defined a delegateExpression for the servicetask element, but it is lost during the conversion process,
Expected behavior
conversion process can convert the delegateExpression attribute
Code
BpmnModel model = new BpmnModel();
Process process = new Process();
...
flowElement = new ServiceTask();
...
ExtensionAttribute extensionAttribute = new ExtensionAttribute();
extensionAttribute.setNamespace(BpmnXMLConstants.FLOWABLE_EXTENSIONS_NAMESPACE);
extensionAttribute.setNamespacePrefix(BpmnXMLConstants.FLOWABLE_EXTENSIONS_PREFIX);
extensionAttribute.setName("delegateExpression");
extensionAttribute.setValue("${" + delegateExpression + "}");
flowElement.addAttribute(extensionAttribute);
Additional context
flowable version: 6.8.1, using mysql database, spring boot:2.7.18
The text was updated successfully, but these errors were encountered: