In-baskets widget incoming events

Draft comment:
This topic is shared by BAW, CP4BA. Last updated on 2025-01-20 10:38
The In-baskets widget provides incoming events to handle the data that is received from other widgets.

Apply filter event

You can apply filter events and dynamically filter the workflow process tasks and FileNet® P8 tasks in your case in-basket.

Description Update the work items that are listed in the in-basket based on the specified filters.
Event ID icm.ApplyFilter
Payload The Apply filter event can accept either of the following payloads:
filters
An array of icm.model.InbasketFilter objects that represent the filters that are to be applied to the in-basket.
The following example shows the contents of this payload:
var filterJSON = {See the Example input JSON};
var filter = icm.model.InbasketFilter.fromJSON(filterJSON);
var filters = [];
filters.push(filter);
var payload = {"filters": filters};
Example input JSON:

	var filterJSON= {
		"queueName":"G603_R1",
		//inbasket queue name
		"inbasketName":"R1",
		//inbasket name
		"hideFilterUI":true,
		// true will hide the inbasket filter
		"filterFields": [
			{
 			"name":"1",
 			// filter name defined in PCC
				"value":11
				// filter value
			}
			{
 			"name":"2",
				"value":["abc","def"]
				// Array represents OR condition. The expression only supports equal operator.
				// When the filter operator is Equal, that mean "value==abc OR value==def"
			}
			{
 			"name":"3",
 			"value":["Red","Green"]
 			// If the filter field in PCC is a choice list type, value need to be input by choice item value.
			}
			{
 			"name":"4",
 			"value":["caseType1","caseType2"]
 			// If the filter field in PCC is case type, value need to be input by case type id
			}
		],
		"hideLockedByOther":true
		// true will hide the work items locked by other.
	};
dynamicFilters
An array of icm.model.InbasketDynamicFilter objects that represent the filters that are to be applied to the in-basket. This array uses the following format:
var dynamicFilterJSON= {See Example input JSON};
var filter = icm.model.InbasketDynamicFilter.fromJSON(dynamicFilterJSON);
var dynamicFilters= [];
dynamicFilters.push(filter);
var payload = {"dynamicFilters": dynamicFilters,
   "cleanDynamicFilterByReset":true};

The optional cleanDynamicFilterByReset parameter specifies whether a dynamic filter is cleared when the user clicks the Reset button.

Example input JSON:
var dynamicFilterJSON = {
		"queueName":"DY_R1",
		//inbasket queue name
		"inbasketName":"R1",
		//inbasket name
		"hideFilterUI":true,
		// true will hide the inbasket filter
		"query_bpmVars":[
			{
			"name":<propertySymbolicName>,
			"value":<value>,
			//Value: Use semicolon (;) separater for multi values (for example value1;value2) when using equals to, and use "in" operator for supportedOperators.
			"type":"xs:<dataType>",
			"operator":"<supportedOperators>"
			},
			{
			"name":"MI1UI_P1",
			"value":"test",
			"type":"xs:string",
			"operator":"is like"
			}
		],
		//Use this parameter for Business Automation Workflow process work items. 
		"queryFilter":"(DY_Company = :A) OR (DY_Company = :A AND DY_LOC = :A) AND (DY_Int > :A)"
		//Please see PE Java API doc(VWWorkBasket class,fetchFilteredBatch function, queryFilter parameter) to construct the parameter
		"queryFields": [
			{
  			"name": "DY_Company",
  			//filter field symbolic name
  			"type": "xs:string",
  			// filter field type
  			"value":["ABC","XYZ"]
  			// Array represents OR condition. The expression only supports equal operator.
				// When the filter operator is Equal, that mean "value=="ABC" OR value==XYZ"
				// If the filter field is a choice list type, value need to be input by choice item value
				// If the filter field is case type, value need to be input by case type id.
			},
			{
  			"name": "DY_LOC",
  			"type": "xs:string",
  			"value":"Beijing"
			},
			{
  			"name": "DY_Int",
  			"type": "xs:integer",
  			"value":2
			}
		],
		"hideLockedByOther":true
		// true will hide the work items locked by other.
	};

For operator supportedOperators, refer to Filtering and sorting process work items in in-baskets.

The following code provides an example of this payload:
var payload = 
{"dynamicFilters": dynamicFilters, 
"cursorLocation": 1,
"cleanDynamicFilterByReset":true};

Clear content event

Description Clear the content in the In-baskets widget.
Event ID icm.ClearContent
Payload null

Receive in-basket event

Description Display the tab for the in-basket that is contained in the event payload.
Event ID icm.ReceiveInbasket
Payload
queueName
The name of the queue in which the work items in the in-basket are stored.
inbasketName
The name of the in-basket that is being received.
cursorLocation
Optional: The index of the row that is to be selected in the in-basket.

Receive Role event

Description Update the In-baskets widget to display the in-baskets that are associated with the specified role.
Event ID icm.ReceiveRole
Payload
role
A string that contains the symbolic name of the role.

Refresh event

Description Refresh the in-basket to update the list of work items..
Event ID icm.Refresh
Payload Any value

Request open work item event

Description Send the information to open the next work item in the queue.
Event ID icm.RequestOpenWorkItem
Payload
queueName
The name of the queue in which the work item to be opened is stored.
inbasketName
The name of the in-basket in which the work item to be opened is located.
cursorLocation
Optional: The index of the row in the in-basket that contains the work item to be opened.

Request selected work items event

Description Send the information for the in-basket rows that are specified in the event payload.
Event ID icm.RequestSelectWorkItems
Payload Any. The In-basket widget handles the event and sends the specified work items along with the incoming payload.