[ACA-2948] Add API to fetch the bpm properties (#5610)

* Add the api to fetch the bpm properties

* remove useless map

* Use latest api

* Use the BehaviorSubject

* filter the status true
This commit is contained in:
Maurizio Vitale
2020-04-16 17:23:00 +01:00
committed by GitHub
parent 55a5cc073b
commit e56331fecb
7 changed files with 112 additions and 41 deletions

View File

@@ -20,6 +20,10 @@ import { from, throwError, Observable } from 'rxjs';
import { BpmProductVersionModel, EcmProductVersionModel } from '../models/product-version.model';
import { AlfrescoApiService } from './alfresco-api.service';
import { map, catchError } from 'rxjs/operators';
import {
SystemPropertiesRepresentation,
Activiti
} from '@alfresco/js-api';
@Injectable({
providedIn: 'root'
@@ -51,4 +55,15 @@ export class DiscoveryApiService {
catchError((err) => throwError(err))
);
}
private get systemPropertiesApi(): Activiti.SystemPropertiesApi {
return this.apiService.getInstance().activiti.systemPropertiesApi;
}
public getBPMSystemProperties(): Observable<SystemPropertiesRepresentation> {
return from(this.systemPropertiesApi.getProperties())
.pipe(
catchError((err) => throwError(err.error))
);
}
}