#ADF-780 Fixed getProcessFilterByName to get the correct filter for the given appId and name (#1952)

This commit is contained in:
Deepak Paul
2017-06-29 15:09:13 +01:00
committed by Eugenio Romano
parent a02ba4ad71
commit 969658891d
@@ -96,13 +96,14 @@ export class ActivitiProcessService {
/**
* Retrieve the process filter by name
* @param processName - string - The name of the filter
* @param filterName - string - The name of the filter
* @param appId - string - optional - The id of app
* @returns {Observable<FilterProcessRepresentationModel>}
*/
getProcessFilterByName(processName: string, appId?: string): Observable<FilterProcessRepresentationModel> {
getProcessFilterByName(filterName: string, appId?: string): Observable<FilterProcessRepresentationModel> {
return Observable.fromPromise(this.callApiProcessFilters(appId))
.map((response: any) => {
return response.data.find(filter => filter.name === processName);
return response.data.find(filter => filter.name === filterName);
}).catch(err => this.handleError(err));
}