0 Replies Latest reply on Sep 12, 2008 4:59 PM by joe freeman

    Would like to use ProcessDefinition subclass for custom seri

    joe freeman Newbie

      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.