AnsweredAssumed Answered

Serialization bug in scripts with JDK >= 1.6.0_43

Question asked by matutano6 on May 5, 2017
Latest reply on Feb 26, 2018 by matutano6

Hi,

I'm using Activiti 5.17.0, and I recently upgraded to JDK 1.7 from 1.6.0_26 and reached a problem with serialization in scripts. Searching forums, I found several articles regarding the issue. Some of them are:

 

Bug on JDK 1.7.0_17 when using ScriptTask in Activiti | Small steps with big feet 

couldn't find a variable type that is able to serialize [object global] 'nashorn.global' 

Script Task exception serizlization 

 

As I could see, the issue is being workarrounded with an explicit variable set (i.e. execution.setVariable("varName", value)), but in my case, I'm using ScriptExecutionListeners, wich still seem to fall in the bug regardless the explicit variable set.

 

I would like to ask if there is a specific way or workarround to continue using the ScriptExecutionListeners (and ScriptTaskListeners also). At the moment, I had to extract scripts listeners to a ScriptTask, but it generates confusion in the business undertanding when viewing the BPMN model.

 

As Oracle removed the bug report at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=9000991, I think they aren't going to fix it or made the behaviour intentional for some reason. In that way, is there going to be a deffinitive fix included from the Activiti side in aome new release?

 

Any suggestion will be very appreciated. Thanks!

M

Outcomes