Solution task layouts

Draft comment:
This topic is shared by BAW, CP4BA. Last updated on 2025-03-13 12:15
A task list layout is a client-side human service that includes the Task List view, which displays all the tasks that are available and claimed by the current user. The list is scoped to the current case solution.
Note: The solution task layout lists only Business Automation Workflow work items and does not list FileNet® work items.

Static saved searches

These are prebuilt saved searches that appear at the top of the list of user's saved searches, and cannot be modified or deleted. The static saved searches are added by default through a script that is added to the onLoad event handler of the Task List view. For details about the default script, see the following information. For more information about event handlers, see Task List configuration.

By default, the following two prebuilt static saved searches are added to the solution task layout.
  • Current Role: Lists all tasks available for the current role or team.
  • My Tasks: Lists all the claimed tasks for the current user.
The static saved searches are available only to that instance of the Task List view. Any modifications made to the static saved searches can be saved only as a new saved search.

Initially, when the task list loads, it loads the Current Role saved search. You can switch between the saved searches through the Search filter dialog.

The script can further be extended to create custom static saved searches according to the user’s requirements.
// Pass the data to view.staticSavedSearchHandler() to add static saved searches 
var currentRole;
var frameURL=window.location.href;
if(frameURL.includes('tw.local.roleID')) {
	windowURL= frameURL.split('&tw.local.roleID=');
	var roleID= windowURL[1].split('&');
	currentRole = decodeURIComponent(roleID[0]);
}
var myTasksLabel = bpmext.localization.formatMsg("controlTaskList", "myTasks");
var defaultSavedSearches = [
//Current role/team available tasks
{
	"display": currentRole,
	"filter": {
		"interaction": "available",
		"conditions": [
			{
				"field": "assignedToRoleDisplayName",
				"operator": "Equals",
				"value": currentRole
			}
		],
		"fields": [
			"taskTrackingStatus",
			"taskPriority",
			"taskSubject",
			"taskDueDate"
		],
	}
},
//Current user claimed tasks
{
	"display": myTasksLabel,
	"filter": {
		"interaction": "claimed",
		"fields": [
			"taskTrackingStatus",
			"taskPriority",
			"taskSubject",
			"taskDueDate"
		],
	}
}/*,
{
	"display": "Custom Task List",
	"filter": {
		"interaction": "available",
		"conditions": [
			{
				"field": "assignedToRoleDisplayName",
				"operator": "Equals",
				"value": currentRole
			}
		],
		"fields": [
			"taskTrackingStatus",
			"taskPriority",
			"taskSubject",
			"taskDueDate"
		],
		"sort" : 
		{
			"field": "taskPriority",
			"order": "ASC"
		}
	}
}*/
];

var businessDataCustomDisplayNames = [
	/*{
		"name": "HiringManager",
		"display": "The manager hiring"
	},
	{
		"name": <InternalAliasName>,
		"display": "Custom name"
	}*/
];
this.addStaticFilters(defaultSavedSearches, businessDataCustomDisplayNames);
Note: The static saved searches that are provided through the onLoad script are different from the saved searches that can be created from the Search filter dialog. The saved searches that are created from the script cannot be modified or deleted unlike the other saved searches. Any modifications made to the saved searches can be saved only as a new saved search and cannot modify these statically saved searches.

Customizing saved searches

Custom saved searches can be created through the script that is provided in the onLoad event handler.

The following example shows a saved search that is defined as a JSON Object in the JSON array customSavedSearches. In a similar pattern, additional saved search objects can be added to the same JSON array:
var customSavedSearches = [
{
	"display": "Custom Task List",
	"filter": {
		"interaction": "available",
		"conditions": [
		 {
                "field": "assignedToRoleDisplayName",
                "operator": "Equals",
                "value": currentRole
          }
        ],
		"fields": [
			"taskTrackingStatus",
			"taskPriority",
			"taskSubject",
			"taskDueDate",
            "CF_TLT3_prop1",
			"CF_TLT3_prop2",
			"CF_TLT3_prop3"
		],

		"sort" : 
		{
			"field": "taskPriority",
			"order": "ASC"
		}
	}
}
];

var businessDataCustomDisplayNames = [
	{
		"name": "CF_TLT3_prop1",
		"display": "The first property"
	},
	{
		"name": "CF_TLT3_prop2",
		"display": "The second property"
	},
	{
		"name": "CF_TLT3_prop3",
		"display": "The third property"
	}
];
this.addStaticFilters(customSavedSearches, businessDataCustomDisplayNames);

Case Business Data

In the previous example for specifying the fields/field/name, use the following Rest API to fetch the business data field name:
https://<hostname>:<port>/rest/bpm/wle/v1/searches/tasks/meta/businessDataFields?includeCaseAlias=true
For case business data, the field name is the internal alias name. In the response for the respective symbolic name of the case property, the name field is the internal alias name.
  • Properties from a case are prefixed with CF_.
  • Properties from a case activity are prefixed with CT_.

Searching and displaying case business data

For case and activity properties to be available as Business Data, the properties need to be exposed in one of the following ways:
  • Exposing and adding an alias for the property in the Variables section from Process Designer. When you expose the same property from multiple activities, use the same alias so that only one column is shown for the property in the layouts.
  • Adding the properties to the in-basket columns in Case Builder.
The case properties are now available as business data which can be used to display as columns, and also do filtering and sorting on these case business data through the Search filter dialog.

System data can also be used in the fields in the script.

The available System data can be obtained by using the REST API:
https://<hostname>:<port>/rest/bpm/wle/v1/searches/tasks/meta/fields
For the filter condition operators, use the following terms in the script:
Condition operators Term
UI Script
is equal
is not NotEquals
contains Contains
starts with StartsWith
in In
is less than LessThan
is greater than GreaterThan
is before LessThan
is after GreaterThan
   

Custom business data display name

You can provide display names to the field names so that at runtime the display name is used for columns or in any place where these fields are shown. As seen in the previous example script, display names can be given as an object in the businessDataCustomDisplayNames array. The name of the field and the corresponding display name need to be provided.

Limitations

The following case in-basket related configurations in design and runtime or features are not applicable for the Solution Task Layout:

  • The inbasket related configurations in Case Builder under Role Settings are not applicable.
  • The IBM® Case Manager Client plug-in configurations Number of Work items in In-basket page and Show the work items that are configured with the existing IBM Business Automation Workflow processes in In-baskets are not applicable.
  • All assignment in-basket is not configurable for solution task layout.
  • Get Next is not applicable for tasks opened from Solution Task layout.