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.