Everything is Serialized

56 views
Skip to first unread message

Ben Wolin

unread,
May 23, 2013, 5:24:01 PM5/23/13
to grails-acti...@googlegroups.com

Hi,

I'm using the plugin and all variables including Strings and Integers are being stored as ByteArrays. This means that the Activiti API can't query for process instances using process variables.

This serialization of Strings & Integers due to, I believe, this:

from ActivitiGrailsPlugin.groovy
...
                   
// Define custom serializable types for fix issue with serialization
                    customPreVariableTypes
= [new SerializableVariableType()]
...


Since the SerializableVariableType is the first variable type Activiti checks for being able to store the incoming variable, it's being used to serialize Strings & Integers.

    boolean isAbleToStore(Object value) {
       
return value instanceof Serializable;
   
}


My inclination to fix this would be to have this method return false for double, float, long, int & strings (noting that Strings > 4K in length would have to be serialized)

I'm trying to do an evaluation of Activiti in a Grails environment and I'm wondering why I'm the only person reporting this issue. I did upgrade locally to use 5.9, could this be a new issue with 5.12?

I'm also wondering why the plugin hasn't already been updated to a more recent version than 5.9.  I was able to build a 5.12 version without too much trouble, but it makes me wonder to what degree this is really being used in the field.

Thanks,
Ben



Andy

unread,
May 29, 2013, 2:37:16 PM5/29/13
to grails-acti...@googlegroups.com
I fixed this is my recent fork, which I'm hoping Chee Kin Lim will incorporate into an updated release. Follow this thread...https://groups.google.com/forum/?fromgroups=#!topic/grails-activiti-plugin/FGBuy5wW8CE

On my project, we're trying to get up to 5.12, as there are a large number of bug fixes and performance enhancements - I would recommend it.

I think the issue with the plugin lagging is more that Chee Kin has limited bandwidth and is focusing on some other things.  That's the great thing about open source...the power of the community!

Andy
Reply all
Reply to author
Forward
0 new messages