Title | Added | Status | Last reviewed |
---|---|---|---|
Task Filter Cloud Service |
v3.0.0 |
Experimental |
2019-01-09 |
Manages task filters.
-
addFilter(newFilter:
TaskFilterCloudModel
):Observable
<
TaskFilterCloudModel
[]>
Adds a new task filter.- newFilter:
TaskFilterCloudModel
- - Returns
Observable
<
TaskFilterCloudModel
[]>
- Observable of task instance filters with newly added filter
- newFilter:
-
deleteFilter(deletedFilter:
TaskFilterCloudModel
):Observable
<
TaskFilterCloudModel
[]>
Deletes a task filter- deletedFilter:
TaskFilterCloudModel
- - Returns
Observable
<
TaskFilterCloudModel
[]>
- Observable of task instance filters without deleted filter
- deletedFilter:
-
getBasePath(appName:
string
):string
- appName:
string
- - Returns
string
-
- appName:
-
getTaskFilterById(appName:
string
, id:string
):Observable
<
TaskFilterCloudModel
>
Gets a task filter.- appName:
string
- Name of the target app - id:
string
- ID of the task - Returns
Observable
<
TaskFilterCloudModel
>
- Details of the task filter
- appName:
-
getTaskFilterCounter(taskFilter:
TaskFilterCloudModel
):Observable
<any>
Finds a task using an object with optional query properties.- taskFilter:
TaskFilterCloudModel
- - Returns
Observable
<any>
- Task information
- taskFilter:
-
getTaskListFilters(appName?:
string
):Observable
<
TaskFilterCloudModel
[]>
Gets all task filters for a task app.- appName:
string
- (Optional) Name of the target app - Returns
Observable
<
TaskFilterCloudModel
[]>
- Observable of task filter details
- appName:
-
getTaskNotificationSubscription(appName:
string
):Observable
<
TaskCloudEngineEvent
[]>
- appName:
string
- - Returns
Observable
<
TaskCloudEngineEvent
[]>
-
- appName:
-
isDefaultFilter(filterName:
string
):boolean
Checks if given filter is a default filter- filterName:
string
- Name of the target task filter - Returns
boolean
- Boolean value for whether the filter is a default filter
- filterName:
-
updateFilter(updatedFilter:
TaskFilterCloudModel
):Observable
<
TaskFilterCloudModel
[]>
Updates a task filter.- updatedFilter:
TaskFilterCloudModel
- - Returns
Observable
<
TaskFilterCloudModel
[]>
- Observable of task instance filters with updated filter
- updatedFilter:
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.
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 {}