When setting a serialized object variable via batch operation, class cannot be found on execution

XMLWordPrintable

      Environment (Required on creation):

      Reproduced on Automation Platform 7.16.0-SNAPSHOT and Apache Tomcat 9.0.43 distribution via Arquillian.

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      exception-stack-trace.txt

      Steps to reproduce (Required on creation):

      1. Deploy a process application with a custom java class org.pa.MyPojo and a process with a waiting state
      2. Start a process instance
      3. In Cockpit, set a variable foo via batch operation to the previously started process instance with the following properties:
        • Type: Object
        • Object Type Name: org.pa.MyPojo
        • Format: application/json
        • Value: {"name": "myName", "prio": 5}

      Observed Behavior (Required on creation):

      The batch operation cannot complete with the following exception:

      Cannot deserialize object in variable 'foo': SPIN/JACKSON-JSON-01007 Cannot construct java type from string 'org.pa.MyPojo'
      

      See the full exception-stack-trace.txt.

      Expected behavior (Required on creation):

      The batch operation completes successfully.

      Root Cause (Required on prioritization):

      The variable foo is deserialized in BatchSetVariablesHandler. However, in this context the org.pa.MyPojo class is not accessible.

      Solution Ideas (Optional):

      1. Don't deserialize variable in BatchSetVariablesHandler; instead, retrieve the serialized value from the database and set it to the process instance
      2. Switch into the context of the process application

            Assignee:
            Tassilo Weidner-Mühl
            Reporter:
            Tassilo Weidner-Mühl
            Tassilo Weidner-Mühl Tassilo Weidner-Mühl
            Yana Vasileva Yana Vasileva
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: