Humantask Assignment: Assignment via External Routing

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.

image1

The implementation of the External Routing is done in a custom java class that implements the IAssignmentService interface.

image2

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).

image3

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.

image4

On the assignment tab of the humantask, click the pencil in the upper right corner to attach the class to the humantask.

image5

The Configure Assignment screen appears. Select Use External Routing.

image6

Enter the class name.

image7

After selecting OK, you get the following warning. Select Yes to continue.

image8

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.

image9

The following image shows a situation that the task is first handled by taskUser1 and after that by taskUser3 (which will finish the task).

image10

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s