mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -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))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user