Flow loses highlighted path on page reloads

Change-Id: I7806cdd1998c4451359b452eb5c9bf1e7059fc32
Issue-ID: SO-1245
Signed-off-by: shinuj1989 <shinu.john@ericsson.com>
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts
index 7967390..2e8f423 100644
--- a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts
+++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts
@@ -30,6 +30,7 @@
 import { HttpResponse } from '@angular/common/http';

 import { PII } from './model/processInstance.model';

 import { HttpErrorHandlerService } from './http-error-handler.service';

+import { ACTINST } from './model/activityInstance.model';

 

 

 @Injectable({

@@ -59,12 +60,12 @@
   }

 

   // HTTP GET to return Activity instancs using ProcessInstanceID

-  getActivityInstance(processInstanceId) {

+  getActivityInstance(processInstanceId): Promise<ACTINST[]> {

     var url = environment.soMonitoringBackendURL + 'activity-instance/' + processInstanceId;

-    return this.http.get(url)

+    return this.http.get<ACTINST[]>(url)

       .pipe(

         catchError(this.httpErrorHandlerService.handleError("GET", url))

-      );

+      ).toPromise();

   }

 

   // HTTP GET to return Activity Instance using ProcessInstanceID

diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts
index 4c19ba1..bb464a9 100644
--- a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts
+++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts
@@ -43,7 +43,6 @@
 })

 

 export class DetailsComponent implements OnInit {

-

   bpmnViewer: any;

 

   processInstanceID: string;

@@ -67,8 +66,8 @@
   constructor(private route: ActivatedRoute, private data: DataService, private popup: ToastrNotificationService,

     private router: Router, private spinner: NgxSpinnerService) { }

 

-  getActInst(procInstId: string) {

-    this.data.getActivityInstance(procInstId).subscribe(

+  async getActInst(procInstId: string) {

+    await this.data.getActivityInstance(procInstId).then(

       (data: ACTINST[]) => {

         this.activityInstance = data;

         console.log(data);

@@ -90,7 +89,7 @@
       });

   }

 

-  async  getProcInstance(procInstId) {

+  async getProcInstance(procInstId) {

     await this.data.getProcessInstance(procInstId).then(

       async (data: PII) => {

         this.processInstance = data;

@@ -160,4 +159,5 @@
         this.getVarInst(this.processInstanceID);

       });

   }

+

 }