Manage Task Filters, which are pre-configured Task Instance queries.
FilterRepresentationModel): Observable<FilterRepresentationModel>FilterRepresentationModel - The new filter to addObservable<FilterRepresentationModel> - Details of task filter just addednumber): Promise<any>getUserTaskFilters from the Alfresco JS API.number - (Optional) ID of the target appPromise<any> - List of task filtersnumber): Observable<FilterRepresentationModel[]>number - ID of the target appObservable<FilterRepresentationModel[]> - Array of default filters just creatednumber, index?: number): FilterRepresentationModelnumber - ID of the target appnumber - (Optional) of the filter (optional)FilterRepresentationModel - The newly created filternumber, index?: number): FilterRepresentationModelnumber - ID of the target appnumber - (Optional) of the filter (optional)FilterRepresentationModel - The newly created filternumber, index?: number): FilterRepresentationModelnumber - ID of the target appnumber - (Optional) of the filter (optional)FilterRepresentationModel - The newly created filternumber, index?: number): FilterRepresentationModelnumber - ID of the target appnumber - (Optional) of the filter (optional)FilterRepresentationModel - The newly created filternumber, appId?: number): Observable<FilterRepresentationModel>number - ID of the filternumber - (Optional) ID of the app for the filterObservable<FilterRepresentationModel> - Details of task filterstring, appId?: number): Observable<FilterRepresentationModel>string - Name of the filternumber - (Optional) ID of the app for the filterObservable<FilterRepresentationModel> - Details of task filternumber): Observable<FilterRepresentationModel[]>number - (Optional) Optional ID for a specific appObservable<FilterRepresentationModel[]> - Array of task filter detailsThe 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'.
import { TaskFilterService, FilterRepresentationModel } from '@alfresco/adf-process-services';
class SomePageComponent implements OnInit {
constructor(private taskFilterService: TaskFilterService) {
}
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.