BPM 11g - Dynamic Task Assignment with Multi-level Organization Units

I've seen several requirements to have a more granular level of task assignment in BPM 11g based on some value in the data passed to the process. Parametric Roles is normally the first port of call to try to satisfy this requirement, but in this blog we will show how a lot of use-cases can be satisfied by the easier to implement and flexible Organization Unit.

The Use-Case

Task assignment is to an approval group containing several users. At runtime, a location value in the input data determines which of the particular users the task is ultimately assigned to.

In this case we use the Demo Community referenced in the SOA Admin Guide, and specifically the "LoanAnalyticGroup" which contains three users; "szweig", "mmitch" & "fkafka". In our scenario we would like to assign a task to "szweig" if the input data specifies that the location is "JapanCentral", to "fkafka" if the location is "JapanNorth" and to "mmitch" if "JapanSouth", and to all of them if the location is "Japan" i.e....  

The Process

Simple one human task process....

In the output data association of the "Start" activity we need to set the value of the "Organization Unit" predefined variable based on the input data (note that the  predefined variables can only be set on output data associations)....

 ...and in the output data association of the human activity we will reset the "Organization Unit" to empty, always good practice to ensure that the Organization Unit will not be used for any subsequent human activities for which we do not require it....

Set Up the Organization Unit 

Log in to the BPM Workspace with an administrator user (weblogic/welcome1 in our case) and choose the "Administration" option.

Within "Roles" assign the "ProcessOwner" swim-lane for our process to "LoanAnalyticGroup"....

Within "Organization Units" we can model our organization.... "Root Organization Unit" as "Japan" and "Child Organization Unit" as "Central", "South" & "North" as shown. As described previously, add user "szweig" to "Central", "mmitch" to "South" and "fkafka" to "North"....  

Test the Process

Invalid Data 

First let us test with invalid data in the input to see what the consequences are, here we use "X" as input....

...and looking at the instance we can see it has errored....

Organization Unit Root Level Assignment 

Now let us see what happens if we have "Japan" in the input data....

...looking in the "flow trace" we can see that the task has been assigned....

 ... but who has the task been assigned to ? Let us look in the BPM Workspace for user "szweig"....

 ...and for "mmitch"....

 ... and for "fkafka"....

 ...so we can see that with an Organization Unit at "Root" level we have successfully assigned the task to all users.

Organization Unit Child Level Assignment 

Now let us test with "Japan/North" in the input data....

...and looking in "fkafka" workspace we see the task has been assigned, remember, he was associated with "JapanNorth".... 

 ... but what about the workspace of "szweig"....

 ...no tasks assigned, neither has "mmitch", just as we expected.


We have seen in this blog how to easily implement multi-level dynamic task routing using Organization Units, a common use-case and a simpler solution than Parametric Roles. 


Hi Mark,

This is a great example of using OUs. However what happens when the user needs to move from one OU to another OU? Lets say if the user's location has changed on the Identity Management system - how can this change be propagated to the BPM OU structure? Are there some examples using oracle.bpm.services.organization.IBPMOrganizationService API ?


Posted by vikram on October 16, 2012 at 08:37 AM PDT #

Hi Vikram,

Glad you liked the blog.

Interesting point you make.... I often find that BPM projects have little influence over the content of the underlying corporate LDAP.... you want some new groups adding to it for a BPM project, you've got almost no chance... the reality in most cases is that corporate LDAPs are a tangled mess of historic interconnections.
The beauty of OUs in this case is that you can provide the same functionality with no dependency on the underlying LDAP... the finer granularity is provided in BPM... the process owner has access to the Workspace and can make changes when needed in a timely manner.

In an ideal world, all this would be inside a lean and efficient corporate LDAP.

I like the idea of an automatic propagation using the provided services, not something I've looked at yet though.


Posted by guest on October 17, 2012 at 02:10 AM PDT #

I think this is useful only when you are letting the participants claim the task because you are not doing direct assignment if you apply for example round robin you will see the task is assigned in that fashion despite the OU of the user, until now I just can't figure out how to do real assignment without parametric roles.

Posted by Carlod on December 17, 2012 at 06:46 AM PST #

Thanks Mark. Excellent post.

I can see using this as a good alternative to parametric roles.

Athough it only allows one dimension for the parameter (your Japan/North in your example and not the two parameters Japan/North and Sales), it allows the assignment to be an LDAP Group or Application Role as well as the individual assignment you showed here.


Posted by datwood on January 04, 2013 at 10:07 AM PST #

Hi Mark,

Thanks for the post. I found it very helpful.

I am trying to loop the humantask with different parametric role value with the help of subprocess to send notifications to different region users (like central, north) at same time.

Can you please let me know if it is possible to change the parametric role value in a subprocess. if so how?


Posted by raju on March 04, 2013 at 11:57 AM PST #

Its very informative post, i learn some info here. Very impressive post.

Posted by guest on May 24, 2013 at 09:34 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

This is the blog for the Oracle FMW Architects team fondly known as the A-Team. The A-Team is the central, technical, outbound team as part of the FMW Development organization working with Oracle's largest and most important customers. We support Oracle Sales, Consulting and Support when deep technical and architectural help is needed from Oracle Development.
Primarily this blog is tailored for SOA issues (BPEL, OSB, BPM, Adapters, CEP, B2B, JCAP)that are encountered by our team. Expect real solutions to customer problems, encountered during customer engagements.
We will highlight best practices, workarounds, architectural discussions, and discuss topics that are relevant in the SOA technical space today.


« January 2017