diff --git a/lib/process-services/src/lib/form/services/ecm-model.service.ts b/lib/process-services/src/lib/form/services/ecm-model.service.ts index 5487aa0d174..94996076d6c 100644 --- a/lib/process-services/src/lib/form/services/ecm-model.service.ts +++ b/lib/process-services/src/lib/form/services/ecm-model.service.ts @@ -16,7 +16,7 @@ */ import { AlfrescoApiService, FormModel } from '@alfresco/adf-core'; -import { Injectable } from '@angular/core'; +import { EventEmitter, Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; import { map, catchError } from 'rxjs/operators'; import { CustomModelApi } from '@alfresco/js-api'; @@ -29,6 +29,8 @@ export class EcmModelService { public static MODEL_NAME: string = 'activitiFormsModel'; public static TYPE_MODEL: string = 'cm:folder'; + error = new EventEmitter(); + private _customModelApi: CustomModelApi; get customModelApi(): CustomModelApi { this._customModelApi = this._customModelApi ?? new CustomModelApi(this.apiService.getInstance()); @@ -200,5 +202,7 @@ export class EcmModelService { return res || {}; } - private handleError(_err: any): any {} + private handleError(err: any): any { + this.error.next(err); + } }