Try OpenEdge Now
skip to main content
BP Server Developer's Guide
Fetching the next available work item : Fetch next available work item methodology
 

Fetch next available work item methodology

In BP Server, an activity workstep can have a user group as a performer. If "Any" is specified for the group performer, then the resultant work item is in an "Available" state. If any member of this group wants to work on this work item, then it is "Assigned" to this member and becomes not available to the other members of the group.
In a typical business scenario like a Call Center, there are hundreds of work items available to a group of operators. Business Process Portal displays all the available work items when a group member logs in. This makes the user experience very slow if large number of work items exist. Moreover, all the group members see all the work items and there are many conflicts when they pick up the same work item.
To avoid possible performance issues, BP Server provides the feature of fetching the next available work item from the pool of available work items.
Figure 5 shows the design methodology.
Figure 5. Fetch next available work item methodology
The steps are as follows:
1. Multiple users call the session bean method.
2. Begin transaction and one thread (user call) obtains the lock.
3. Get the work items as per filter criteria from database. By default, only one work item is fetched, but you can increase it up to five work items.
4. Assign the work items to this user.
5. Return the work items to the user and end the transaction, releasing the lock.
This scenario is also valid when the performer is a queue.