Skip to content

Latest commit

 

History

History
102 lines (85 loc) · 7.17 KB

task-filter.service.md

File metadata and controls

102 lines (85 loc) · 7.17 KB
Title Added Status Last reviewed
Task Filter Service
v2.0.0
Active
2018-06-07

Manage Task Filters, which are pre-configured Task Instance queries.

Class members

Methods

Details

The methods of this service generally return an instance of FilterRepresentationModel or an array of instances. For example, you could use getTaskListFilters as follows:

const processAppId = 2;
this.taskFilterService.getTaskListFilters(processAppId).subscribe( (filters: FilterRepresentationModel[]) => {
  console.log('Task filters: ', filters);
}, error => {
  console.log('Error: ', error);
});

The response is an array of FilterRepresentationModel objects:

filters:  
    0: {id: 10, appId: 2, name: "Involved Tasks", recent: true, icon: "glyphicon-align-left", …}
    1: {id: 9, appId: 2, name: "My Tasks", recent: false, icon: "glyphicon-inbox", …}
    2: {id: 11, appId: 2, name: "Queued Tasks", recent: false, icon: "glyphicon-record", …}
    3: {id: 12, appId: 2, name: "Completed Tasks", recent: false, icon: "glyphicon-ok-sign", …}
    4: {id: 4004, appId: 2, name: "Completed Tasks", recent: false, icon: "glyphicon-ok-sign", …}
    5: {id: 4005, appId: 2, name: "My Tasks", recent: false, icon: "glyphicon-inbox", …}
    6: {id: 4006, appId: 2, name: "Queued Tasks", recent: false, icon: "glyphicon-record", …}
    7: {id: 4007, appId: 2, name: "Involved Tasks", recent: false, icon: "glyphicon-align-left", …}

These filters can now be used to get matching task instances for the process app with ID 2, such as 'Involved Tasks', 'My Tasks', 'Queued Tasks', and 'Completed Tasks'.

Importing

import { TaskFilterService, FilterRepresentationModel } from '@alfresco/adf-process-services';

export class SomePageComponent implements OnInit {

  constructor(private taskFilterService: TaskFilterService) {
  }

See also