Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-1775

EventFactHandles are not deserialized correctly causing error "No enum constant org.drools.core.factmodel.traits.TraitTypeEnum.xxx"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 6.2.0
    • 6.1.0
    • jBPM Core
    • None

      The following code causes errors "No enum constant org.drools.core.factmodel.traits.TraitTypeEnum.xxx"

      XStream xstream = BatchExecutionHelper.newXStreamMarshaller();
      ...
      ExecutionResults results = (ExecutionResults) xstream.fromXML(responseXml);

      The root cause is explained in the jira https://issues.jboss.org/browse/DROOLS-924
      "EventFactHandle overrides DefaultFactHandle's toExternalForm(), but it is not happening the same for the createFromExternalFormat() method. Moreover no code takes care of the 1st argument (the format version) of the serialized format so when deserializing it always instance a DefaultFactHandle even when it was serialized an event."

              mfusco@redhat.com Mario Fusco
              rhn-support-ghu Gary Hu
              Marek Winkler Marek Winkler (Inactive)
              Marek Winkler Marek Winkler (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: