7 Replies Latest reply on Nov 14, 2011 1:56 AM by nsundar

    rejecting a task

    nsundar

      Hi

       

      Any documents or examples for workflow when a task is rejected/failed.

        • 1. Re: rejecting a task
          salaboy21

          Hi, which version of jBPM5 are you using?

          Did you check the org.jbpm.task.TaskService interface that contains all the method available to interact?

           

              void fail(long taskId, String userId, FaultData faultData);

              void release(long taskId, String userId);

              void remove(long taskId, String userId);

              void skip(long taskId, String userId);

           

           

          Cheers

          • 2. Re: rejecting a task
            nsundar

            Thanks Mauricio.

             

            I am using jBPM5.1.

            I tried failing a task and it got updated in the db. I just want to whether we can do our customized operations before logging in the db.

            e.g  I have a workflow where Task2 is executed after Task1 is completed/Failed. If i fail task1, will the Task2 be excuted or will it be skipped.

                  Because i have certain events/db updates(in our app) when the task is failed or completed, which i plan to accomplish in Task2.

             

            Thanks

            • 3. Re: rejecting a task
              nickynarak

              I think must implement new WorkItem for task. in my project, I have checkout source code project to edit WorkItem for Insert other database or new business code of my project.

              • 4. Re: rejecting a task
                salaboy21

                I'm not sure what do you want to achieve.. Most of the times you don't need to implement something new.. just extend what is there.. With that you can probably contribute back to the project, but let's find first if you need to achieve something that is not possible today with the current mechanisms.

                Cheers

                • 5. Re: rejecting a task
                  nsundar

                  I want know whether we can drive the workflow using FaultData parameter when the user fails a task. 

                  e.g : If the user fails/completes task1 then depending upon user action i may either execute "Human Task1"  or "RejectFlow" service task.

                  Is it possible to assign FaultData parameter to Process Varibale. Thanks

                  reject_task.png

                  • 6. Re: rejecting a task
                    salaboy21

                    I'm pretty sure that if the task is completed or skipped you can propagate data as usual back to the process scope. That means that you don't need to evaluate for a specific fault and you can evaluate based on a process variable. A business fault will be something different that will not be modelled in the way that you model your process in the figure that you share.

                    Cheers

                    1 of 1 people found this helpful
                    • 7. Re: rejecting a task
                      nsundar

                      Thanks Mauricio...

                      Cheers