6 Replies Latest reply on Sep 16, 2012 5:49 PM by rosidoti

    Task complete operation without process goes on

    rosidoti

      I have this problem: if i start the server and with a client start the process, start the Human task and complete the same human task

      the process goes on the next Human task.

      Instead if i restart the server and there is a task InProgress status and with a client i complete it, the task becomes Completed but

      the process doesn't go on.

      Is the restart operation cause of this problem?

      Any idea?

      Tx in adv

        • 1. Re: Task complete operation without process goes on
          eaa

          Did you restore your session from the db after you restarted the server and BEFORE you completed the task?

          The session must be in memory so the HT Server can communicate with it.

           

          Best Regards

          • 2. Re: Task complete operation without process goes on
            rosidoti

            Hi esteban,

            no I did not.

            But it's strange, sorry if i say those words ... but if i'm playng with client api invoking mothods such as client.complete(taskId...) why I have to restore session (on the server side)

            that is an information that server can retrieve on task table using taskid such as key ... however I tried your suggestion and it works.

            tx a lot

            • 3. Re: Task complete operation without process goes on
              eaa

              The answer is because you where interacting with Human Task API but not with process runtime API. Strange as it sounds, the relation between HT server and session is loosly-coupled. When you complete a task the HT server informs this event to all the registered listeners. If you didn't restore the ksession, there is no listener there.

               

              Best Regards,

              • 4. Re: Task complete operation without process goes on
                rosidoti

                Ok Esteban, I hope that this discussion doesn't going to be a "fight" (sorry for my bad english ...) and may be useful to enhance this great project. But there is something that doesn't sound good for me, let me try to expplain, may be that there is something I don't see in the API architecture/design.In order to restore the session I have to know the bpmn file i'm using to describe the process because if i don't read (again) the bpmn file i get e nullpointer excption about the process.

                So that means that the restore operation has to be perfomed by the "thread" or client application that is performing client.complete(...) operation too. Thus this restoring can't be performed by the server its self ...

                my 2 cents

                roby

                • 5. Re: Task complete operation without process goes on
                  eaa

                  The restore operation must be performed before the task is completed but not necesarelly by the same thread or application. In order to restore a session you need a kbase containing the definition of the process.

                  Let's asume you have 1 kbase per application, what you could do is: when the application is started, you restore all the ksessions you have (this information is not easy to retrieve from jbpm's predefined DB and I usually store it myself) using the kbase.

                   

                  Best Regards,

                  • 6. Re: Task complete operation without process goes on
                    rosidoti

                    I know that u r sayng but the difficulty is, in my case that I have 4 types of process (4 bpmn files), to link the sessions to be restored with their related bpmn file.

                    However i will follow your suggestion to store the association (sessionId,"bpmn file") outside the standard db tables.

                    Tx Esteban for your very clear responses!