Skip to content

Latest commit

 

History

History
113 lines (90 loc) · 7.26 KB

task-filter-cloud.service.md

File metadata and controls

113 lines (90 loc) · 7.26 KB
Title Added Status Last reviewed
Task Filter Cloud Service
v3.0.0
Experimental
2019-01-09

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 }
    ]
})
export 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 }
    ]
})
export class ExampleModule {}

See also