3 Replies Latest reply on Jan 7, 2010 6:46 PM by kukeltje

    Executing a task automatically

      Hi everyone,

       

      I've a little problem. I've developed a workflow, and it's working fine. But, in the workflow there're some sequential tasks.

       

      User will check for a condition X, if that's true, the user end the task and start another. But I was wanting, at the view, when the user just click at the Save Button, it should end the task and start the next task on the view and show the next task form.

       

      How can I do it?

       

      Thanks!

        • 1. Re: Executing a task automatically
          kukeltje
          By implementing that in the UI. The jBPM console does not do this since it never knows if there is going to be a next task in the same processinstance. Displaying the next task from the tasklist would be possible, but most people do not want this behaviour, so it is not implemented there.
          • 2. Re: Executing a task automatically

            Hi Ronald, thanks for the reply.

             


            Well, I'll show you a little example:

             

            The process is:

             

            1. Start

            2. User check if the document (document A) is ok

            3. User check if the document (document B) is ok

            4. If document A or B have some error, throws a exception

            5. End

             

            The steps 2 and 3 are tasks, The user needs to complete the process.

             

            I was reading a book (Business process management with JBoss jBPM) and I understood that the tasks are a kind of human task. And check a document is a human task, in my concept.

             

            What I want is: user have started a instance of that process, and checked the Document A and that's ok. How can I start the task 3 and jump to the task 3 form?

             

            Thanks!
            • 3. Re: Executing a task automatically
              kukeltje

              Yes, I know the usecase... and the answer still is 'implement it in your own ui'.

               

              Think about what steps you logically think are needed. Write those down, and then have a look at what methods are available in the jBPM api to implement each of these steps. Try to implement those in a unit test and see what happens. If there are still some things not clear please get back to us.

               

              Another way of describing what you ask is the following:

               

              How do I get a row from a database that has values 'A' and '3' for a specific record, show this to the user and after updating this row, if there is a row that also has the value 'A'. but the other value is '4', show that to the user.

               

              You would probably know how to do that :-)