Yes, our research made us think that also. The current serialization serializes the
process definition with the process instance so you end up with multiple copies when you
deserialize it. We'd really like to change the serialization so that it writes out
the process definition name and version when serializing and then restores the process
definition by looking up the name and version using the ProcessState default subprocess
resolver.
We had thought of subclassing process definition so that it would do this as part of a
readReplace() method but the use of ProcessDefinition class is hard coded into the jpdl
xml reader so there is no way to replace it with a different class. Process Definition
should be an interface or the definition instantiation code should get the process
definition class from a factory or from the configuration files.
Instead, when we write out process instances, we remove the process definitions from the
process instances and put the name of the definitions on the transients map on the process
instance. (Note that it's called transients but its still serialized) After we read
the process instances back in, we walk the process instance tree attaching the process
definitions based on the name previously in the transients map.
We probably serialize BPM instances 1.5 million times per day so the savings can add up.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173056#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...