[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

@@ -25,7 +25,7 @@ import {
AlfrescoApiCompatibility, AlfrescoApiConfig
} from '@alfresco/js-api';
import { AppConfigService, AppConfigValues } from '../app-config/app-config.service';
import { Subject, Observable } from 'rxjs';
import { Subject, Observable, BehaviorSubject } from 'rxjs';
import { OauthConfigModel } from '../models/oauth-config.model';
import { StorageService } from './storage.service';
@@ -40,7 +40,7 @@ export class AlfrescoApiService {
*/
nodeUpdated = new Subject<Node>();
protected alfrescoApiInitializedSubject: Subject<any>;
protected alfrescoApiInitializedSubject: BehaviorSubject<any>;
alfrescoApiInitialized: Observable<any>;
protected alfrescoApi: AlfrescoApiCompatibility;
@@ -102,7 +102,7 @@ export class AlfrescoApiService {
constructor(
protected appConfig: AppConfigService,
protected storageService: StorageService) {
this.alfrescoApiInitializedSubject = new Subject();
this.alfrescoApiInitializedSubject = new BehaviorSubject(null);
this.alfrescoApiInitialized = this.alfrescoApiInitializedSubject.asObservable();
}
@@ -110,7 +110,7 @@ export class AlfrescoApiService {
await this.appConfig.load().then(() => {
this.storageService.prefix = this.appConfig.get<string>(AppConfigValues.STORAGE_PREFIX, '');
this.initAlfrescoApi();
this.alfrescoApiInitializedSubject.next();
this.alfrescoApiInitializedSubject.next(true);
});
}