AnsweredAssumed Answered

Migration to 5.13 issues

Question asked by pkromolowski on Jul 17, 2013
Latest reply on Jul 19, 2013 by frederikheremans1
Hi guys,

I recently upgraded to 5.13 version from 5.11. Since then I encountered a few migration problems, I hope you will be able to clarify them to me:

1. I have been using a custom scripting engine implementation (I was doing some script preprocessing before evaluating it). I registered the engine the following way:

ScriptingEngines scriptingEngines = configuration.getScriptingEngines();
if (scriptingEngines == null)
{
      scriptingEngines = new ScriptingEngines(new ScriptBindingsFactory(rfactories));
}
configuration.setScriptingEngines(new CustomScriptingEngines(scriptingEngines));

After upgrading to 5.13 the engine ignrores this registration and is only using the default ScriptingEngines implementation.

2. This method org.activiti.bpmn.model.ExtensionElement.getChildElements() returns a map of <String, ExtensionElement> that doesn't allow multiple extension elements with the same name. I temporarily managed by replacing your declaration with
protected LinkedMultiValueMap<String, ExtensionElement> childElements = new LinkedMultiValueMap<String, ExtensionElement>();
and by adding a getter like this: LinkedMultiValueMap<String, ExtensionElement> getMultiChildElements(), but it's actually a poor quality patch while waiting for your fix.

3. I don't actually feel that the BpmnParseHandler based API fully covers the possibilities of the previous BpmnParseListener approach. After a few hours of fighting with the new API I decided to write my own BpmnXMLConverter implementation (where I handled all custom extensions and build my own task object). And - surprisingly - I find this a very correct and handy approach: I build the task object from XML properties and then pass the complete object to the ParseHandler. It greatly separates parsing logic from the remaining work on the parsed task. The only problem is that I had to register the converters by using reflection. Is there any chance that you make org.activiti.bpmn.converter.BpmnXMLConverter.addConverter method public?

Thanks,

Outcomes