+

Search Tips   |   Advanced Search


Create new filters for tasks

You can extend the default filter set for tasks by creating new filter sets and filters for tasks that appear in the Task List. By creating custom task filter sets, you can adapt the Task List portlet for different work contexts, cloning the Task List portlet for individual applications.


Prerequisites

Understand the default filter set for tasks

Specify additional filter sets and filters for tasks by creating new configuration properties with names qualified as processintegration.filterset..

The example shown in the following procedure uses the sample Travel Request business process application to illustrate how you might create task filters for the tasks of this business process. The example shows how the data retrieval queries expressed in the property values define the filter criteria to apply to the query domain, in this case, the process template. The queries for each task filter specify the condition PROCESS_TEMPLATE.NAME='TravelRequestProcess1'.

This conditional expression retrieves tasks related to the Travel RequestProcess1 process template and excludes tasks that do not belong to the Travel RequestProcess1 process template.

  1. On the portal server, open the Administrative Console and click Resources > Resource Environment > Resource Environment Providers > WP Config Service > Custom Properties to display the custom configuration properties for business process integration, including the properties qualified as processintegration.filterset.default.

  2. To create a new task filter set property, click New.

  3. Using the properties of the default filter set, processintegration.filterset.default, as a reference, create a task filter set for the tasks of a particular business process by specifying custom configuration properties similar to those shown in the following example. This example illustrates how to specify a filter set for the tasks of the sample Travel Request business process application, which is defined by the process template TravelRequestProcess1.

    processintegration.filterset.travelRequest.all=PROCESS_TEMPLATE.NAME='TravelRequestProcess1' processintegration.filterset.travelRequest.claimedTasks=WORK_ITEM.REASON=WORK_ITEM.REASON.REASON_OWNER
    
    

    AND TASK.STATE=TASK.STATE.STATE_CLAIMED AND PROCESS_TEMPLATE.NAME='TravelRequestProcess1' processintegration.filterset.travelRequest.unclaimedTasks=WORK_ITEM.REASON=WORK_ITEM.REASON.REASON_POTENTIAL_OWNER

    AND TASK.STATE=TASK.STATE.STATE_READY AND PROCESS_TEMPLATE.NAME='TravelRequestProcess1' processintegration.filterset.travelRequest.order=unclaimedTasks,claimedTasks,all

    These property values define a new task filter set processintegration.filterset.travelRequest that contains three task filters for showing all tasks, claimed tasks, and unclaimed tasks in the Travel Request business process application. The filters are ordered in the Show list of the Task List in the sequence specified. The query processintegration.filterset.travelRequest.all=PROCESS_TEMPLATE.NAME='TravelRequestProcess1' filters out all tasks that do not belong the Travel Request process template.

    As a result, a Task List portlet clone that uses the travelRequest filter set will only display tasks related to travel requests.

  4. Optional: Create more advanced filters to use in Task List portlet clones for particular application contexts. Apply the full flexibility of queries using where clauses, as supported by WebSphere Process Server. For more information about queries using the where clause, refer to the WebSphere Process Server Information Center topics that explain developing EJB client applications, specifically queries on business process and task-related objects.

  5. Specify titles for the custom task filter set and the custom task filters, including titles for different locales, by referencing the corresponding Java™ resource bundle specified in the property processintegration.filtersetresourcebundle of the Portal Configuration Service:

    1. On the portal server, open the Administrative Console and click Resources > Resource Environment > Resource Environment Providers > WP Config Service > Custom Properties and open the custom property processintegration.filtersetresourcebundle.

    2. Specify the titles for the task filter set, for example, processintegration.filtersetresourcebundle=yourCompany.filterSetTitles. This setting causes the Task List portlet to load the resource bundle from the specified path using its class loader. Thus, deploy the resource bundle files into the Java classpath of the portlet using a matching folder.

      For example, if you specify processintegration.filtersetresourcebundle=yourCompany.filterSetTitles, place the resource bundle files into the folder /shared/app/yourCompany. Within that folder the Java locale name resolution is used to load resource bundles for the preferred language specified in the user's browser.

      For example, if the user has set the browser to display in French, the Task List portlet tries to load the file filterSetTitles_fr.properties.

      If no matching properties file can be found, the Task List portlet will show the identifier values instead of the titles.

    3. Within the language-specific properties files identified by the processintegration.filtersetresourcebundle, specify the titles for all task filter sets and task filters for the given language. Refer to the example and follow these guidelines:

      • For a task filter set, qualify the property as filterset, concatenate the identifier of the task filter set, and specify the title.

      • For a task filter, qualify the property as filter, concatenate the identifier of the task filter set that contains the task filter, concatenate the identifier of the task filter, and specify the title.

      • Remember to separate each element of a property name with a dot.

      For the sample Travel Request business process application, you would define the titles of the example task filter set and task filters specified in Step 3 as follows:

      filterset.travelRequest=Travel Request Tasks filter.travelRequest.all=All Travel Request Tasks filter.travelRequest.claimedTasks=Claimed Travel Request Tasks filter.travelRequest.unclaimedTasks=Unclaimed Travel Request Tasks
      


Parent topic:

Creating custom filters for tasks


Previous topic:

Understand the default filter set for tasks


Related information


Querying business-process and task-related objects