0 Replies Latest reply on Jul 21, 2011 4:11 PM by lukasz.kozerski

    Serialization and declared types

    lukasz.kozerski

      Hi,

      I have problem with (I suppose) session serialization and declared types.

      Process looks like this:

      Start -> Script: Stuff.status="X" -> WorkItem -> Script: Stuff.status="Y" -> End

       

      And the test:

      ksession = newSession();

      ksession.startProcess("process", parameters);

      ksession.fireAllRules();

      objects = ksession.getObjects();

      assertThat(objects).hasSize(1);

      o = objects.iterator().next();

      assertEquals("X", type.get(o, "status")); // test ok

      ksession.dispose();

       

      ksession = loadSession(sessionId);

      ksession.getWorkItemManager().completeWorkItem(workItemId, null);

      objects = ksession.getObjects();

      assertThat(objects).hasSize(1);

      o = objects.iterator().next();

      assertEquals("Y", type.get(o, "status")); // test fail, status=="X"

      ksession.dispose();

       

      My question is: why this test fails?

      Full maven project attached.

       

      Thanks,

      Lukasz