mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-02 17:53:30 +00:00
5.5 KiB
5.5 KiB
Title, Added, Status, Last reviewed
| Title | Added | Status | Last reviewed |
|---|---|---|---|
| Process Filter Service | v2.0.0 | Active | 2018-11-13 |
Process Filter Service
Manage Process Filters, which are pre-configured Process Instance queries.
Class members
Methods
- addProcessFilter(filter:
FilterProcessRepresentationModel):Observable<FilterProcessRepresentationModel>
Adds a filter.- filter:
FilterProcessRepresentationModel- The filter to add - Returns
Observable<FilterProcessRepresentationModel>- The filter just added
- filter:
- callApiProcessFilters(appId?:
number):any
CallsgetUserProcessInstanceFiltersfrom the Alfresco JS API.- appId:
number- (Optional) ID of the target app - Returns
any- List of filter details
- appId:
- createDefaultFilters(appId:
number):Observable<FilterProcessRepresentationModel[]>
Creates and returns the default filters for an app.- appId:
number- ID of the target app - Returns
Observable<FilterProcessRepresentationModel[]>- Default filters just created
- appId:
- getProcessFilterById(filterId:
number, appId?:number):Observable<FilterProcessRepresentationModel>
Retrieves the process filter by ID.- filterId:
number- ID of the filter - appId:
number- (Optional) ID of the target app - Returns
Observable<FilterProcessRepresentationModel>- Details of the filter
- filterId:
- getProcessFilterByName(filterName:
string, appId?:number):Observable<FilterProcessRepresentationModel>
Retrieves the process filter by name.- filterName:
string- Name of the filter - appId:
number- (Optional) ID of the target app - Returns
Observable<FilterProcessRepresentationModel>- Details of the filter
- filterName:
- getProcessFilters(appId:
number):Observable<FilterProcessRepresentationModel[]>
Gets all filters defined for a Process App.- appId:
number- ID of the target app - Returns
Observable<FilterProcessRepresentationModel[]>- Array of filter details
- appId:
- getRunningFilterInstance(appId:
number):FilterProcessRepresentationModel
Creates and returns a filter that matches "running" process instances.- appId:
number- ID of the target app - Returns
FilterProcessRepresentationModel- Filter just created
- appId:
Details
The methods of this service generally return an instance of
FilterProcessRepresentationModel or an array of instances. For example, you
could use getProcessFilters as follows:
const processAppId = 2;
this.processFilterService.getProcessFilters(processAppId)
.subscribe( (filters: FilterProcessRepresentationModel[]) => {
console.log('filters: ', filters);
}, error => {
console.log('Error: ', error);
});
The response is an array of FilterProcessRepresentationModel objects:
filters:
0: {id: 15, appId: 2, name: "Running", recent: true, icon: "glyphicon-random", …}
1: {id: 14, appId: 2, name: "Completed", recent: false, icon: "glyphicon-ok-sign", …}
2: {id: 13, appId: 2, name: "All", recent: false, icon: "glyphicon-th", …}
3: {id: 3003, appId: 2, name: "Running", recent: false, icon: "glyphicon-random", …}
4: {id: 3004, appId: 2, name: "Completed", recent: false, icon: "glyphicon-ok-sign", …}
5: {id: 3005, appId: 2, name: "All", recent: false, icon: "glyphicon-th", …}
You can use the returned filters to get matching process instances for the process app with ID 2, such as 'Running', 'Completed', 'All', etc.