5 Replies Latest reply on Oct 7, 2011 9:05 AM by Maciej Swiderski

    Problem with insertion of process instance into a knowledge session

    Miljenko Norsic Newbie

      Hi all,

       

      I have a small test process that uses persistency to store process and knowledge session data into a database.As part of my process workflow I have a Rule Task that pulls WorkflowProcessInstance from a knowledge session, and therefore I have to insert process instance into a ksession, as shown on picture:

       

      sample.png

       

       

      Upon signalEvent(), process continues, calls rule task and runs to completion, and there is nothing wrong with that.

       

      The problem is that my rule does not run:

       

      rule "Test WorkflowProcessInstance existence" ruleflow-group "test"
          when
              $p : WorkflowProcessInstance()
          then
              System.out.println("Process instance exists!");
      end
      

       

      It is obvious that I'm missing WorkflowProcessInstance in a knowledge session, and therefore I've added it.

      But now I'm getting the following exception upon calling UserTransaction.commit() method:

      java.io.NotSerializableException: org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl$1
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
      ...
      

       

      It seems to me it is a bug in jBPM5.1, could someone please check it?

      If this is a bug, I can create a Jira issue, but since I'm a jBPM greenhorn, I'd rather like to check on forum first because maybe I'm missing something obvious

       

      I'm attaching a sample Eclipse project with both persistent and non-persistent scenario.

       

      Thanks,

      Miljenko