Manages task filters.

Class members

Methods

Details

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

this.taskFilterService.getTaskListFilters(appName).subscribe( (filters: TaskFilterCloudModel[]) => {
  console.log('Task filters: ', filters);
}, error => {
  console.log('Error: ', error);
});

These filters can now be used to get matching task instances for the process app.

Inject Preference service

Token: TASK_FILTERS_SERVICE_TOKEN A DI token that maps to the dependency to be injected.

Task Filter Cloud Service is by default injected with the Local Preference Cloud Service

import { NgModule } from '@angular/core';
import { LocalPreferenceCloudService, TASK_FILTERS_SERVICE_TOKEN } from '@alfresco/adf-process-services-cloud';

@NgModule({
    imports: [
        ...Import Required Modules
    ],
    providers: [
        { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }
    ]
})
class ExampleModule {}

If you would like to inject the UserPreferenceCloudService, you can inject the service like below shown

import { NgModule } from '@angular/core';
import { UserPreferenceCloudService, TASK_FILTERS_SERVICE_TOKEN } from '@alfresco/adf-process-services-cloud';

@NgModule({
    imports: [
        ...Import Required Modules
    ],
    providers: [
        { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService }
    ]
})
class ExampleModule {}

See also

© 2023 Alfresco Software, Inc. All Rights Reserved.