June 12 2017

Oracle BPM tasks can be dynamically assigned to an individual user, application role, and / or an LDAP group depending on the human task's incoming data.  

They did not have to be separate strings, but for clarity these three human task data elements have corresponding process data objects mapped into the human task in this Oracle BPM 12.2.1.2 application.  Based on which one(s) is populated, the task's assignment is made.

Human Task Incoming Data

 

These are set in the activity's input data association from corresponding process data objects.

Input Data Associations to set the Human Task's Data

 

The process data objects are set in the output data association of an activity upstream of the activity in the process.

Outgoing Data Associations

 

Dynamic Assignment to an Individual User or to an Application Role

As shown in the Workspace task list shown below, if the individualUserAssigned and groupAssigned process data objects are not populated, and if the appRoleAssigned process data object is populated, the task is assigned to the application role (the top task below).  If there is a user id set to individualUserAssigned process data object (the bottom task below), then the task is only assigned to that individual.

Assignment to user or Application Role

 

 

 

 

 

Similarly, if the groupAssigned process data object is populated, in the Workspace the task is assigned to that LDAP group .

Assign to an LDAP Group

More than one of the incoming values can be set.  For example, if a valid user id, LDAP group and an application role are all passed in, in the Workspace the task will be assigned to all three.

Assign to user, LDAP group and an application role

 

The Human Task Business Rule

These dynamic assignments occurred because a business rule set was created for the human task (open the human task -> double click the user icon -> set it to use a business rule -> name the List Ruleset rule -> click OK.

Create Dynamic Assignment Rule

 

With the new Rule Set selected, create three new if / then business rules.  The first one assigns it to an LDAP group if a group is passed in.  Note that the second parameter is set in the CreateResourceList function that assigns the task to users in the LDAP Group.

Assign to an LDAP Group

 

 

 

 

 

 

 

 

Click the + icon in the rule's toolbar to add a second rule that assigns the task to an application role if it is passed in.  Note that the third parameter is set in the CreateResourceList function that assigns the task to users in the Application Role.

Assign to an Application Role

 

 

 

 

 

 

 

Click the + icon in the rule's toolbar to add a third rule that assigns the task to an individual user if one is passed in.  Note that the first parameter is set in the CreateResourceList function that assigns the task to individual user(s).  

Assign to a User

 

Caveats to this Approach

There are a couple things you need to be aware of if you decide to take the business rule approach with human tasks.

  1. In order for the rule to use them as facts, the valid text needs to be passed into the human task's user id, application role, and LDAP group id.  If the invalid text is passed into any one of the three (e.g., the user, group or application role does not exist), this recoverable runtime error will occur:  exception.name: Error in routing slip.
    exception.description: The task is assigned to an invalid {user,group, application role} in realm jazn.com.
    exception.fix: Verify that the group is specified correctly in the routing slip in the task definition
  2. While a business rule's if statement does a nice job of checking for an empty string (e.g., Task.payload.userAssigned=="""), it does not work as well when checking for null.

The Oracle BPM 12.2.1.2 application created with these business rules can be downloaded from here.

References:

 

About the Author

Dan Atwood

Dan has more than sixteen years of experience in all phases of design, development, and implementation of software applications using BPM. He has developed Oracle BPM, BAM, business rule and integration solutions for financial services, insurance, food cooperative, and telecommunications clients.

Join the Conversation

Michelle
June 21, 2017

I'm very happy to see this web because the info I'm looking for at this time is in here.  $1 Hosting Australia

Enter your first name. It will only be used to display with your comment.
Enter your email. This will be used to validate you as a real user but will NOT be displayed with the comment.
By submitting this form, you accept the Mollom privacy policy.