cancel
Showing results for 
Search instead for 
Did you mean: 

Migration to 5.13 issues

pkromolowski
Champ in-the-making
Champ in-the-making
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,
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
1) I'll look into the issue with the script-bindings.

2) We're going to resolve this issue indeed, always interested to see how you implemented a workaround.

3) Sure thing, https://github.com/Activiti/Activiti/commit/389bf278a48acfeb367bdcda464292a1a1f3124c

frederikherema1
Star Contributor
Star Contributor
I don't immediately see any code that would replace the scriptingEngines that you're using, UNLESS you're using the OSGI org.activiti.osgi.blueprint.ProcessEngineFactoryWithELResolver -> are you using this?

If not, please reply on this thread so we can look deeper. Any idea what particular part of the code is responsible for throwing away your custom ScriptEngines?

pkromolowski
Champ in-the-making
Champ in-the-making
As for #1 - I'm lame, sorry for reporting this issue.
In 5.11 I was overriding the org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(String, String, VariableScope) method, and in 5.13 it isn't called anymore. When I override org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(String, String, Bindings) - everything works fine.

Thanks.

frederikherema1
Star Contributor
Star Contributor
Okay, thanks for letting us know what the issue was eventually.