[jboss-user] [JBoss jBPM] - Would like to use ProcessDefinition subclass for custom seri
do-not-reply at jboss.com
Fri Sep 12 16:59:59 EDT 2008
We want to use custom serialization (externalizable) for ProcessDefinitions because there isn't any reason to serialize the the ProcessDefinitions when going in and out of network caches. We really just need to serialize the names of the ProcessDefiitions and then reattach with readReplace(). The problem is that the BPM will not let us swap in our own subclass of ProcessDefinition and it doesn't use interfaces or factories in this particular area. (It has nice configurable behavior in other places)
| Our code calls ProcessDefinition.parseXmlInputStream()
| That calls jpdlReader.readProcessDefinition()
| readProcessDefinition is hardwired to create instances of the ProcessDefinition class. It calls ProcessDefinition.crateNewProcessDefinition().
| createNewProcessDefinition() creates the instance and configures it in one method.
We thought about subclassing JpdlXmlReader to create our own ProcessDefinition (subclass) instances but the readProcessDefinition() method needs to be broken into two parts. The first part creates an instance and stores it in the processDefinition attribute on JpdlXmlReader. The second part of the broken up readProcessDefinition() method would do all the processing exactly as it does.
We tried post-process replacing ProcessDefinition instances with OurProcessDefinition instances but that is too late in the process. There are many objects in a ProcessDefinition that have back pointers to the ProcessDefinition that contains them.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176266#4176266
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176266
More information about the jboss-user