Humantask Assignment: Assignment via External Routing

3

This blog post is part of a series of posts about humantask assignment. You can find the starting point of this series by following the next link.

This post gives an example of task assignment via External Routing. I will use the same BPM process as in most of the other posts.
Screenshot12
The implementation of the External Routing is done in a custom java class that implements the IAssignmentService interface.
Screenshot-5
The following picture shows the implementation of this class. The task is assigned to taskGroup1 in the OnInitiation method. This method is executed when the task is activated for the first time. The OnOutcomeUpdated method is executed every time an outcome is selected in the task. Depending on the user who handled the task, the task is reassigned in this method to taskGroup2 or the task stops by assigning the task to nobody (task is handled by taskUser3).
Screenshot-14
After creating and compiling the class, It must become available for use. For this copy the class to the following location: /Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/classes. You must restart the WebLogic Server after you put your class files there.
Screenshot
On the assignment tab of the humantask, click the pencil in the upper right corner to attach the class to the humantask.
Screenshot-9
The Configure Assignment screen appears. Select Use External Routing.
Screenshot-6
Enter the class name.
Screenshot-7
After selecting OK, you get the following warning. Select Yes to continue.
Screenshot-8
Now it’s time to do some testing. After deployment of the process we can start a new instance via the EM.
The following image shows the situation where the task is only handled by taskUser3.
Screenshot-11
The following image shows a situation that the task is first handled by taskUser1 and after that by taskUser3 (which will finish the task).
Screenshot-10
This brings me to the end of this example. The example shows a very simple and straight forward implementation of the External Routing. The example shows the situation where the task is handle by one representative and a situation where it is handled by two representatives. This dynamic length routing is a very powerful feature of the External Routing functionality.
From here you can download the sample project.

Share.

About Author

As a SOA and BPM professional, Marcel is an experienced consultant in the field of process design and process modeling. Within this field system integration and IT-transcending business processes have Marcel's special interest.

3 Comments

  1. Hi Marchel, great tutorial !
    I wonder if you ever tried doing the same external routing but instead of using :
    objFactory.createParticipantsTypeParticipant();

    you use :
    objFactory.createParticipantsTypeSequentialParticipant();

    to be able to add multiple resources as users inside SequentialParticipant and route the task to them sequentially, I tried and it didn’t really work, it would just reroute to workflowsystem and auto-complete the task.

    Thanks!
    Ahmed

    • Hi Marchel,

      This is a good knowledge sharing.

      As Ahmed said, I am also trying to objFactory.createParticipantsTypeSequentialParticipant();
      But that doesn’t worked. If you have done it, could you plesae help me to do the same. Thanks

      Regards,
      Dinesh

Leave a Reply