2 Replies Latest reply on Nov 7, 2005 7:52 AM by Ravi Prakash Reddy Ummadi

    swimlane problem

    Ravi Prakash Reddy Ummadi Newbie

      Hi,

      I have the following process def.

      <?xml version="1.0" encoding="UTF-8"?>

      <process-definition name="EventProcess">







      <start-state name="create new event">


      </start-state>








      <task-node name="evaluate event">


      </task-node>







      <task-node name="fixevent">


      </task-node>

      <end-state name="done" />


      </process-definition>

      When I say,

      Token token = processInstance.getRootToken();
      token.signal();

      The process is jumping to 'EvaluateDecision' state.
      But it has to idealy go to 'AdminAssignmentHandler'.
      The control is skipping the following statement:


      it is happening only when I use mysql database.
      When I use HSQL DB, it works fine.

      Am I missing any thing here?

      Ravi

        • 1. Re: swimlane problem
          Koen Aers Master

          Please put your code between the appropriate brackets.

          Regards,
          Koen

          • 2. Re: swimlane problem
            Ravi Prakash Reddy Ummadi Newbie

            Hi,

            Sorry, My previous psot was not readable.

            Here is my process definition:

            --------------------------------------------------------

            <?xml version="1.0" encoding='UTF-8'?>
            <process-definition name='EventProc'>
            <swimlane name='user' >
            <assignment class="test.jbpm.UserAssignmentHandler" />
             </swimlane>
             <swimlane name="admin">
            <assignment class="test.jbpm.AdminAssignmentHandler" />
             </swimlane>
            <start-state name="create new event">
             <task swimlane="user"/>
             <transition to="BadWords" />
             </start-state>
             <decision name="BadWords" >
            <handler class="test.jbpm.BadWordsDescHndlr" />
            <transition name="pass" to="evaluate event" />
            <transition name="fail" to="done" />
             </decision>
             <task-node name="evaluate event">
             <task swimlane="admin"/>
             <transition name="evaluate_event_transition" to="EvaluateDecision"/>
             </task-node>
             <decision name="EvaluateDecision" >
            <handler class="test.jbpm.EvaluateDescHndlr" />
            <transition name="approve" to="done" />
            <transition name="disapprove" to="fixevent" />
            </decision>
            <task-node name="fixevent">
            <task name="fixevent_task" swimlane="user"/>
             <transition name="fixevent_trans" to="evaluate event"/>
             </task-node>
            <end-state name="done" />
            </process-definition>

            ------------------------------------------------------------------

            Here is the code snippet calling the process :

            ----------

            processDefinition = graphSession.findLatestProcessDefinition("EventProc");
            ProcessInstance processInstance = new ProcessInstance(processDefinition);
            Token token = processInstance.getRootToken();
            token.signal();

            --------------

            Now the above code should ideally work like this:

            1. First user creates an event.
            2. the event is in 'create new event" state.
            3. process moves to 'BadWords' state.
            4. From the BadWords state, process moves to 'evaluate event' state. (I am hardcoding decision "pass" in the "BadWordsDescHndlr".
            5. When process reaches "evaluate event" state, first it encounters the statement

            Hence 'AdminAssignmentHandler' is executed.
            6. AFter that process moves to 'EvaluateDecision' state.

            ----------

            Now the problem is, the above process works in the expected way with databases 'HSQL DB' and 'Pstgres SQL'. But with 'MySQL' the process is not moving as expected.
            When the process completes 'BadWordsDescHndlr', it is directly moving to 'EvaluateDecision' state. It is not moving to 'AdminAssignmentHandler' as expected. It is skipping the statement


            I want to know why this wrong behaviour with mysql?
            Any suggestions would be appreciated.

            Ravi