5 Replies Latest reply on May 17, 2012 2:42 PM by marfernandez

    Notification and Escalation using API

    hadik

      Hello community,

       

           Can anyone provide example of Escalation and Notification using API ?

           I can insert the data but can't retrieve it back from the databse.

           I am not getting how to relate it with human task.

           Any snippet of code would also be helpful.

       

      Regards,

      Hardik Dave.

        • 1. Re: Notification and Escalation using API
          calca
          1 of 1 people found this helpful
          • 2. Re: Notification and Escalation using API
            hadik

            First of Thanks Demian for your quick reply.

             

            The example helped me too much but the test case given for EscalationProcessTest.java fails while claiming the task with the follwing error:

             

            org.jbpm.task.service.PermissionDeniedException: User '[User:'Steve Rogers']' was unable to execution operation 'Claim' on task id 1 due to a no 'current status' match.

             

            Please give a look on it.

             

            Regards,

            Hardik Dave.

             


            • 3. Re: Notification and Escalation using API
              calca

              Hi Hardik, sorry for the late response.

               

              The problem is related to the LocalTaskService, which ends up having an entity manager. The escalation is executed (using a new entity manager, the task is reasigned, but when in line 145 you get the task, you get an outdate one (which is in entity manager cache I imagine).

              If you add this line before line 145,

              localTaskService = new LocalTaskService(taskService);

              it will create a new entity manager and the test will run ok!

               

              I know the jbpm team is looking at this issue and probably get a better solution.

               

              Thanks!

               

              Demian

              • 4. Re: Notification and Escalation using API
                hadik

                Thanks Demian,

                 

                     It's now working like a charm and now trying to integrate it to web if have any problem will post here.

                 

                Regards,

                Hardik Dave.

                • 5. Re: Notification and Escalation using API
                  marfernandez

                  Hi All.

                   

                   

                  I am using jBPM5.2 I need to implement an escalation of human tasks with the following definitions.

                   

                   

                  Escalation

                            Delegation (Assigning a task from one user to another for various reasons)

                             Controlled: Manually Assign a task to a specific user.

                             Implicit: Automatic assignment of one task to another person by the absence of the target user of it.

                                                               According to criteria:

                                                                                   By complex rules

                                                                                   Organizational structure

                   

                  Expiration (Assigning a task from one user to another by expiration of it)

                                      Controlled: Manually Assign a task to a specific user.

                                      Implicit: Automatic assignment of one task to another person.

                                                          According to criteria:

                                                                    By complex rules

                                                                    Organizational structure

                  Chain of Authorization (Authorization of a task at different levels of organization)

                                      implicit:

                                                According to criteria:

                                                          By complex rules

                                                          Organizational structure

                   

                   

                  Anyone have any idea what would be the best way to handle this issue?

                   

                   

                  Regards.

                  Mariano