| 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};
|
This topic is shared by BAW, CP4BA. Last updated on 2025-01-20 10:38