People resolution in Business Process Choreographer returns
a list of the users that are assigned to a specific role, for example,
potential owners of a task. You can create a plug-in that changes
the results of people queries that are returned by people resolution.
For example, to improve workload balancing, you could remove users
from the query result who already have a high workload.
About this task
To modify the results that are returned by people assignment
and people substitution, you must write a class that implements the
plug-in interface, assemble a JAR file for the plug-in, then install
and activate it.
Complete the
following steps to create a plug-in to post-process people query results.
Procedure
- Implement your people query result post-processing plug-in. Write a class that implements either the StaffQueryResultPostProcessorPlugin interface or the StaffQueryResultPostProcessorPlugin2 interface.
- Create an installable JAR file.
- Assemble your plug-in class and its helper classes into
a JAR file.
- Create a service provider configuration file for the
plug-in in the META-INF/services/ directory of
your JAR file. The configuration file provides the mechanism for identifying
and loading the plug-in. This file must conform to the Java™ EE service provider interface specification.
- In a text editor, create a service provider configuration file
with the name com.ibm.task.spi.plug-in_nameStaffQueryResultPostProcessorPlugin, where plug-in_name is the name of the plug-in. The name
of the configuration file does not depend on the name of the interface
that you implemented. For example, if your plug-in is called MyHandler and it implements the com.ibm.task.spi.StaffQueryResultPostProcessorPlugin2 interface, the name of the configuration file is com.ibm.task.spi.MyHandlerStaffQueryResultPostProcessorPlugin.
- In the first line of the file that is neither a comment line (a
line that starts with a number sign (#)) nor a blank line, specify
the fully qualified name of the plug-in class that you created in
step 1. For example, if your plug-in class is called StaffPostProcessor and it is in the com.customer.plugins package,
then the first line of the configuration file must contain the following
entry: com.customer.plugins.StaffPostProcessor.
You have an installable JAR file that contains a plug-in
that post-processes people query results and a service provider configuration
file that can be used to load the plug-in.
- Install the JAR file in a shared library in the application
server and associate it with the Human Task Manager application.
- Define a WebSphere® Application
Server shared library for the plug-in on the scope of
the server or cluster where Business Process Choreographer is configured. For more information about using shared
libraries, see the related task link.
- Associate the shared library with the TaskContainer application.
- Make the plug-in JAR file available to each affected Process Server
that hosts a server or a cluster member.
- Configure the Human Task Manager to use the plug-in.
- In the administrative console, go to the Custom
Properties page of the Human Task Manager.
Click ,
then on the Configuration tab, in the Business Process Manager section, expand Business Process Choreographer, and click Human Task Manager. Under Additional Properties, select Custom Properties.
- Add a custom property with the name Staff.PostProcessorPlugin, and a value of the name that you gave to your plug-in, for example, MyHandler.
The plug-in is now available for post processing people
query results.
- Restart the server to activate the plug-in. The post processing plug-in is invoked after both the people assignment
and people substitution have run.
Note: If you modify the plug-in,
you must replace the JAR file in the shared library, and restart the
server.