diff --git a/lib/core/src/lib/auth/guard/auth-guard-base.ts b/lib/core/src/lib/auth/guard/auth-guard-base.ts index 07c98acfb0e..44268dc8d84 100644 --- a/lib/core/src/lib/auth/guard/auth-guard-base.ts +++ b/lib/core/src/lib/auth/guard/auth-guard-base.ts @@ -17,10 +17,7 @@ import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanActivateChild, UrlTree } from '@angular/router'; import { AuthenticationService } from '../services/authentication.service'; -import { - AppConfigService, - AppConfigValues -} from '../../app-config/app-config.service'; +import { AppConfigService, AppConfigValues } from '../../app-config/app-config.service'; import { OauthConfigModel } from '../models/oauth-config.model'; import { MatDialog } from '@angular/material/dialog'; import { StorageService } from '../../common/services/storage.service'; @@ -28,9 +25,7 @@ import { Observable } from 'rxjs'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; import { OidcAuthenticationService } from '../services/oidc-authentication.service'; - export abstract class AuthGuardBase implements CanActivate, CanActivateChild { - protected get withCredentials(): boolean { return this.appConfigService.get('auth.withCredentials', false); } @@ -43,8 +38,7 @@ export abstract class AuthGuardBase implements CanActivate, CanActivateChild { protected appConfigService: AppConfigService, protected dialog: MatDialog, private storageService: StorageService - ) { - } + ) {} abstract checkLogin( activeRoute: ActivatedRouteSnapshot, @@ -96,7 +90,7 @@ export abstract class AuthGuardBase implements CanActivate, CanActivateChild { urlToRedirect = `${urlToRedirect}?redirectUrl=${url}`; return this.navigate(urlToRedirect); - } else if (this.getOauthConfig().silentLogin && !this.oidcAuthenticationService.isPublicUrl()) { + } else if (this.getOauthConfig().silentLogin && !this.oidcAuthenticationService.isPublicUrl()) { if (!this.oidcAuthenticationService.hasValidIdToken() || !this.oidcAuthenticationService.hasValidAccessToken()) { this.oidcAuthenticationService.ssoLogin(url); } @@ -114,13 +108,7 @@ export abstract class AuthGuardBase implements CanActivate, CanActivateChild { } protected getOauthConfig(): OauthConfigModel { - return ( - this.appConfigService && - this.appConfigService.get( - AppConfigValues.OAUTHCONFIG, - null - ) - ); + return this.appConfigService && this.appConfigService.get(AppConfigValues.OAUTHCONFIG, null); } protected getLoginRoute(): string { @@ -132,20 +120,12 @@ export abstract class AuthGuardBase implements CanActivate, CanActivateChild { } protected isOAuthWithoutSilentLogin(): boolean { - const oauth = this.appConfigService.get( - AppConfigValues.OAUTHCONFIG, - null - ); - return ( - this.authenticationService.isOauth() && !!oauth && !oauth.silentLogin - ); + const oauth = this.appConfigService.get(AppConfigValues.OAUTHCONFIG, null); + return this.authenticationService.isOauth() && !!oauth && !oauth.silentLogin; } protected isSilentLogin(): boolean { - const oauth = this.appConfigService.get( - AppConfigValues.OAUTHCONFIG, - null - ); + const oauth = this.appConfigService.get(AppConfigValues.OAUTHCONFIG, null); return this.authenticationService.isOauth() && oauth && oauth.silentLogin; } diff --git a/lib/core/src/lib/form/components/form-renderer.component.spec.ts b/lib/core/src/lib/form/components/form-renderer.component.spec.ts index 6387fa94eb5..e48f316c68b 100644 --- a/lib/core/src/lib/form/components/form-renderer.component.spec.ts +++ b/lib/core/src/lib/form/components/form-renderer.component.spec.ts @@ -701,12 +701,12 @@ describe('Form Renderer Component', () => { }); describe('Form rules', () => { - it('should call the Form Rules Manager init on component changes', () => { + it('should call the Form Rules Manager init', () => { spyOn(rulesManager, 'initialize'); const formModel = formService.parseForm(customWidgetFormWithVisibility.formRepresentation.formDefinition); formRendererComponent.formDefinition = formModel; - formRendererComponent.ngOnChanges(); + formRendererComponent.ngOnInit(); expect(rulesManager.initialize).toHaveBeenCalledWith(formModel); }); diff --git a/lib/core/src/lib/form/components/form-renderer.component.ts b/lib/core/src/lib/form/components/form-renderer.component.ts index 0c94dca2c43..a720598cecc 100644 --- a/lib/core/src/lib/form/components/form-renderer.component.ts +++ b/lib/core/src/lib/form/components/form-renderer.component.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { Component, ViewEncapsulation, Input, OnDestroy, Injector, OnChanges, OnInit, Inject } from '@angular/core'; +import { Component, ViewEncapsulation, Input, OnDestroy, Injector, OnInit, Inject } from '@angular/core'; import { FormRulesManager, formRulesManagerFactory } from '../models/form-rules.model'; import { FormModel } from './widgets/core/form.model'; import { ContainerModel, FormFieldModel, TabModel } from './widgets'; @@ -36,7 +36,7 @@ import { FORM_FIELD_MODEL_RENDER_MIDDLEWARE, FormFieldModelRenderMiddleware } fr ], encapsulation: ViewEncapsulation.None }) -export class FormRendererComponent implements OnInit, OnChanges, OnDestroy { +export class FormRendererComponent implements OnInit, OnDestroy { /** Toggle debug options. */ @Input() showDebugButton: boolean = false; @@ -57,9 +57,6 @@ export class FormRendererComponent implements OnInit, OnChanges, OnDestroy { ngOnInit(): void { this.runMiddlewareServices(); - } - - ngOnChanges(): void { this.formRulesManager.initialize(this.formDefinition); } diff --git a/lib/core/src/lib/form/events/form-spinner.event.ts b/lib/core/src/lib/form/events/form-spinner.event.ts new file mode 100644 index 00000000000..8b17acdfa5e --- /dev/null +++ b/lib/core/src/lib/form/events/form-spinner.event.ts @@ -0,0 +1,25 @@ +/*! + * @license + * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface FormSpinnerEventPayload { + showSpinner: boolean; + message?: string; +} + +export class FormSpinnerEvent { + constructor(public type: string, public payload: FormSpinnerEventPayload) {} +} diff --git a/lib/core/src/lib/form/events/index.ts b/lib/core/src/lib/form/events/index.ts index e6ed154026f..aecf52a7eee 100644 --- a/lib/core/src/lib/form/events/index.ts +++ b/lib/core/src/lib/form/events/index.ts @@ -21,3 +21,4 @@ export * from './form-field.event'; export * from './validate-form-field.event'; export * from './validate-form.event'; export * from './form-rules.event'; +export * from './form-spinner.event'; diff --git a/lib/core/src/lib/form/models/form-rules.model.ts b/lib/core/src/lib/form/models/form-rules.model.ts index bf44598c515..7f64e84c2f8 100644 --- a/lib/core/src/lib/form/models/form-rules.model.ts +++ b/lib/core/src/lib/form/models/form-rules.model.ts @@ -39,7 +39,7 @@ export function formRulesManagerFactory(injector: Injector): FormRulesManager } export abstract class FormRulesManager { - constructor(private formService: FormService) {} + constructor(protected formService: FormService) {} protected formModel: FormModel; private onDestroy$ = new Subject(); @@ -66,7 +66,9 @@ export abstract class FormRulesManager { this.handleRuleEvent(event, rules); }); - this.formService.formRulesEvent.next(new FormRulesEvent('formLoaded', new FormEvent(formModel))); + const onFormLoadedEvent = new FormEvent(formModel); + const formRules = new FormRulesEvent('formLoaded', onFormLoadedEvent); + this.formService.formRulesEvent.next(formRules); } } diff --git a/lib/core/src/lib/form/services/form.service.ts b/lib/core/src/lib/form/services/form.service.ts index 65f839f2a21..d3bbc5c4c2e 100644 --- a/lib/core/src/lib/form/services/form.service.ts +++ b/lib/core/src/lib/form/services/form.service.ts @@ -29,12 +29,12 @@ import { ValidateFormEvent } from '../events/validate-form.event'; import { ValidateFormFieldEvent } from '../events/validate-form-field.event'; import { FormValidationService } from './form-validation-service.interface'; import { FormRulesEvent } from '../events/form-rules.event'; +import { FormSpinnerEvent } from '../events'; @Injectable({ providedIn: 'root' }) export class FormService implements FormValidationService { - formLoaded = new Subject(); formDataRefreshed = new Subject(); formFieldValueChanged = new Subject(); @@ -44,6 +44,7 @@ export class FormService implements FormValidationService { taskSaved = new Subject(); taskSavedError = new Subject(); formContentClicked = new Subject(); + toggleFormSpinner = new Subject(); validateForm = new Subject(); validateFormField = new Subject(); @@ -55,8 +56,7 @@ export class FormService implements FormValidationService { formRulesEvent = new Subject(); - constructor() { - } + constructor() {} /** * Parses JSON data to create a corresponding Form model. diff --git a/lib/core/src/lib/pipes/time-ago.pipe.ts b/lib/core/src/lib/pipes/time-ago.pipe.ts index f018f137e64..df0eae8c348 100644 --- a/lib/core/src/lib/pipes/time-ago.pipe.ts +++ b/lib/core/src/lib/pipes/time-ago.pipe.ts @@ -38,8 +38,10 @@ export class TimeAgoPipe implements PipeTransform, OnDestroy { private onDestroy$ = new Subject(); - constructor(public userPreferenceService: UserPreferencesService, - public appConfig: AppConfigService) { + constructor( + public userPreferenceService: UserPreferencesService, + public appConfig: AppConfigService + ) { this.userPreferenceService .select(UserPreferenceValues.Locale) .pipe(takeUntil(this.onDestroy$)) diff --git a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts index 860d96f4843..55db98f819b 100644 --- a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts @@ -41,6 +41,7 @@ import { ConfirmDialogComponent } from '@alfresco/adf-content-services'; import { v4 as uuidGeneration } from 'uuid'; import { FormCloudDisplayMode, FormCloudDisplayModeConfiguration } from '../../services/form-fields.interfaces'; import { DisplayModeService } from '../public-api'; +import { FormCloudSpinnerService } from '../services/spinner/form-cloud-spinner.service'; @Component({ selector: 'adf-cloud-form', @@ -128,9 +129,13 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, protected formService: FormService, private dialog: MatDialog, protected visibilityService: WidgetVisibilityService, - private readonly displayModeService: DisplayModeService + private readonly displayModeService: DisplayModeService, + private spinnerService: FormCloudSpinnerService ) { super(); + + this.spinnerService.initSpinnerHandling(this.onDestroy$); + this.id = uuidGeneration(); this.formService.formContentClicked.pipe(takeUntil(this.onDestroy$)).subscribe((content) => { @@ -375,6 +380,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, } return form; } + return null; } @@ -396,8 +402,10 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, private refreshFormData() { this.form = this.parseForm(this.formCloudRepresentationJSON); - this.onFormLoaded(this.form); - this.onFormDataRefreshed(this.form); + if (this.form) { + this.onFormLoaded(this.form); + this.onFormDataRefreshed(this.form); + } } protected onFormLoaded(form: FormModel) { diff --git a/lib/process-services-cloud/src/lib/form/components/spinner/form-spinner.component.html b/lib/process-services-cloud/src/lib/form/components/spinner/form-spinner.component.html new file mode 100644 index 00000000000..0e69015793f --- /dev/null +++ b/lib/process-services-cloud/src/lib/form/components/spinner/form-spinner.component.html @@ -0,0 +1,11 @@ +
+
+ + + {{message | translate}} + +
+
diff --git a/lib/process-services-cloud/src/lib/form/components/spinner/form-spinner.component.scss b/lib/process-services-cloud/src/lib/form/components/spinner/form-spinner.component.scss new file mode 100644 index 00000000000..f98c3281c26 --- /dev/null +++ b/lib/process-services-cloud/src/lib/form/components/spinner/form-spinner.component.scss @@ -0,0 +1,20 @@ +.adf-cloud-form { + &-spinner { + position: fixed; + inset: 0; + display: flex; + place-content: center center; + + &-content { + display: flex; + flex-flow: column wrap; + place-content: center center; + row-gap: 25px; + align-items: center; + + &-message { + font-size: var(--theme-body-4-font-size); + } + } + } +} diff --git a/lib/process-services-cloud/src/lib/form/components/spinner/form-spinner.component.ts b/lib/process-services-cloud/src/lib/form/components/spinner/form-spinner.component.ts new file mode 100644 index 00000000000..ab80e1afcf6 --- /dev/null +++ b/lib/process-services-cloud/src/lib/form/components/spinner/form-spinner.component.ts @@ -0,0 +1,26 @@ +/*! + * @license + * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Component, Input } from '@angular/core'; + +@Component({ + templateUrl: './form-spinner.component.html', + styleUrls: ['./form-spinner.component.scss'] +}) +export class FormSpinnerComponent { + @Input() message = ''; +} diff --git a/lib/process-services-cloud/src/lib/form/form-cloud.module.ts b/lib/process-services-cloud/src/lib/form/form-cloud.module.ts index a6f38795b59..a20f4567f20 100644 --- a/lib/process-services-cloud/src/lib/form/form-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/form/form-cloud.module.ts @@ -42,10 +42,14 @@ import { FileViewerWidgetComponent } from './components/widgets/file-viewer/file import { DisplayRichTextWidgetComponent } from './components/widgets/display-rich-text/display-rich-text.widget'; import { RichTextEditorModule } from '../rich-text-editor'; import { A11yModule } from '@angular/cdk/a11y'; +import { OverlayModule } from '@angular/cdk/overlay'; +import { FormSpinnerComponent } from './components/spinner/form-spinner.component'; +import { FormCloudSpinnerService } from './services/spinner/form-cloud-spinner.service'; @NgModule({ imports: [ CommonModule, + OverlayModule, MaterialModule, FormsModule, ReactiveFormsModule, @@ -76,7 +80,8 @@ import { A11yModule } from '@angular/cdk/a11y'; PropertiesViewerWidgetComponent, FilePropertiesTableCloudComponent, FileViewerWidgetComponent, - DisplayRichTextWidgetComponent + DisplayRichTextWidgetComponent, + FormSpinnerComponent ], exports: [ FormCloudComponent, @@ -92,6 +97,7 @@ import { A11yModule } from '@angular/cdk/a11y'; PropertiesViewerWidgetComponent, FileViewerWidgetComponent, DisplayRichTextWidgetComponent - ] + ], + providers: [FormCloudSpinnerService] }) export class FormCloudModule {} diff --git a/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.spec.ts b/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.spec.ts new file mode 100644 index 00000000000..7a6b029e0a4 --- /dev/null +++ b/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.spec.ts @@ -0,0 +1,84 @@ +/*! + * @license + * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { FormCloudSpinnerService } from './form-cloud-spinner.service'; +import { OverlayModule } from '@angular/cdk/overlay'; +import { FormService, FormSpinnerEvent } from '@alfresco/adf-core'; +import { Subject } from 'rxjs'; +import { TranslateModule } from '@ngx-translate/core'; +import { Component } from '@angular/core'; +import { FormSpinnerComponent } from '../../components/spinner/form-spinner.component'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing'; +import { PortalModule } from '@angular/cdk/portal'; +import { HarnessLoader } from '@angular/cdk/testing'; +import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; + +@Component({ + selector: 'adf-cloud-overlay-test', + template: `
adf-cloud-overlay-test
` +}) +class SpinnerTestComponent {} + +describe('FormCloudSpinnerService', () => { + let fixture: ComponentFixture; + let rootLoader: HarnessLoader; + let spinnerService: FormCloudSpinnerService; + let formService: FormService; + + const showSpinnerEvent = new FormSpinnerEvent('toggle-spinner', { showSpinner: true, message: 'LOAD_SPINNER_MESSAGE' }); + const hideSpinnerEvent = new FormSpinnerEvent('toggle-spinner', { showSpinner: false }); + + const onDestroy$ = new Subject(); + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [FormSpinnerComponent, SpinnerTestComponent], + providers: [ + FormCloudSpinnerService, + { + provide: FormService, + useValue: { + toggleFormSpinner: new Subject() + } + } + ], + imports: [OverlayModule, PortalModule, MatProgressSpinnerModule, TranslateModule.forRoot()] + }); + + fixture = TestBed.createComponent(SpinnerTestComponent); + rootLoader = TestbedHarnessEnvironment.documentRootLoader(fixture); + spinnerService = TestBed.inject(FormCloudSpinnerService); + formService = TestBed.inject(FormService); + }); + + it('should toggle spinner', async () => { + spinnerService.initSpinnerHandling(onDestroy$); + formService.toggleFormSpinner.next(showSpinnerEvent); + fixture.detectChanges(); + + let hasSpinner = await rootLoader.hasHarness(MatProgressSpinnerHarness); + expect(hasSpinner).toBeTrue(); + + formService.toggleFormSpinner.next(hideSpinnerEvent); + fixture.detectChanges(); + + hasSpinner = await rootLoader.hasHarness(MatProgressSpinnerHarness); + expect(hasSpinner).toBeFalse(); + }); +}); diff --git a/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.ts b/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.ts new file mode 100644 index 00000000000..7722b9afed5 --- /dev/null +++ b/lib/process-services-cloud/src/lib/form/services/spinner/form-cloud-spinner.service.ts @@ -0,0 +1,48 @@ +/*! + * @license + * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Injectable, inject } from '@angular/core'; +import { Overlay, OverlayRef } from '@angular/cdk/overlay'; +import { ComponentPortal } from '@angular/cdk/portal'; +import { FormService, FormSpinnerEvent } from '@alfresco/adf-core'; +import { Observable } from 'rxjs'; +import { takeUntil } from 'rxjs/operators'; +import { FormSpinnerComponent } from '../../components/spinner/form-spinner.component'; + +@Injectable() +export class FormCloudSpinnerService { + private formService = inject(FormService); + private overlay = inject(Overlay); + + private overlayRef?: OverlayRef; + + initSpinnerHandling(onDestroy$: Observable): void { + this.formService.toggleFormSpinner.pipe(takeUntil(onDestroy$)).subscribe((event: FormSpinnerEvent) => { + if (event?.payload.showSpinner) { + this.overlayRef = this.overlay.create({ + hasBackdrop: true + }); + + const userProfilePortal = new ComponentPortal(FormSpinnerComponent); + const componentRef = this.overlayRef.attach(userProfilePortal); + componentRef.instance.message = event.payload.message; + } else if (event?.payload.showSpinner === false) { + this.overlayRef?.detach(); + } + }); + } +} diff --git a/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.html b/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.html index a15b2a84868..3afa23c2a16 100755 --- a/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.html +++ b/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.html @@ -1,4 +1,7 @@ - + @@ -100,10 +103,12 @@
diff --git a/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.ts b/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.ts index 9af6ed73464..99f0e03c7fa 100755 --- a/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.ts @@ -86,6 +86,10 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy @Input() showTitle: boolean = true; + /** Show/hide cancel button. */ + @Input() + showCancelButton: boolean = true; + /** Emitted when the process is successfully started. */ @Output() success = new EventEmitter(); @@ -187,20 +191,24 @@ export class StartProcessCloudComponent implements OnChanges, OnInit, OnDestroy } setProcessDefinitionOnForm(selectedProcessDefinitionName: string) { - this.processDefinitionCurrent = this.filteredProcesses.find( + const processDefinitionCurrent = this.filteredProcesses.find( (process: ProcessDefinitionCloud) => process.name === selectedProcessDefinitionName || process.key === selectedProcessDefinitionName ); - this.startProcessCloudService.getStartEventFormStaticValuesMapping(this.appName, this.processDefinitionCurrent.id).subscribe( + this.startProcessCloudService.getStartEventFormStaticValuesMapping(this.appName, processDefinitionCurrent.id).subscribe( (staticMappings) => { this.staticMappings = staticMappings; this.resolvedValues = this.staticMappings.concat(this.values || []); + this.processDefinitionCurrent = processDefinitionCurrent; }, - () => (this.resolvedValues = this.values) + () => { + this.resolvedValues = this.values; + this.processDefinitionCurrent = processDefinitionCurrent; + } ); this.isFormCloudLoaded = false; - this.processPayloadCloud.processDefinitionKey = this.processDefinitionCurrent.key; + this.processPayloadCloud.processDefinitionKey = processDefinitionCurrent.key; } private getProcessDefinitionListByNameOrKey(processDefinitionName: string): ProcessDefinitionCloud[] { diff --git a/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts b/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts index 6938559cc27..afb1cd3bbef 100644 --- a/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts @@ -32,11 +32,7 @@ import { AdfHttpClient } from '@alfresco/adf-core/api'; export class NotificationCloudService extends BaseCloudService { appsListening = []; - constructor( - public apollo: Apollo, - private http: HttpLink, - private authService: AuthenticationService, - protected adfHttpClient: AdfHttpClient) { + constructor(public apollo: Apollo, private http: HttpLink, private authService: AuthenticationService, protected adfHttpClient: AdfHttpClient) { super(adfHttpClient); }