AnsweredAssumed Answered

Redirect to task details on click of app

Question asked by anitapatil.bld@gmail.com on Apr 24, 2018
Latest reply on Apr 27, 2018 by anitapatil.bld@gmail.com

Ciju Joseph

I have process with 2 tasks namely t1 and t2.
I have a case to start a process on clicking the app and redirect it to task details page.
For this I have written code to start the process on click of app now it is started and i want to redirect it to
t1 task details page
in app.view.component.html
```
<adf-apps (appClick)="onAppClickStartProcess($event)"></adf-apps>
```

in app.view.component.ts
```
onAppClickStartProcess(app: AppDefinitionRepresentationModel) {
this.apppid1 = app.id;
this.processService.getProcessDefinitions(this.apppid1).subscribe(
data => {
console.dir(data)
this.apppid = data;
this.exdepId = this.apppid[0].id;

this.processService.startProcess(this.exdepId, "aaa", "", "", [])

.subscribe(
data => {
//at precent redirecting to this route
this.router.navigate(['activiti/apps', app.id || 0, 'tasks']);
//but it should redirect to this route
//this.router.navigate(['activiti/apps', app.id || 0, 'tasks', taskid]);

});

});
}
```

Kindly help me out. 

 

Thanks & Regards

Anita Patil

Outcomes