Use /api endpoint to fetch process instance data

Refs #344
This commit is contained in:
Will Abson 2016-07-22 09:29:00 +01:00
parent b04293de75
commit 5cc083120a

View File

@ -28,7 +28,7 @@ import 'rxjs/add/operator/catch';
@Injectable() @Injectable()
export class ActivitiProcessService { export class ActivitiProcessService {
private processesUrl = 'http://localhost:9999/activiti-app/app/rest/filter/process-instances'; private processesUrl = 'http://localhost:9999/activiti-app/api/enterprise/process-instances/query';
constructor(private alfrescoSettingsService: AlfrescoSettingsService, private http: Http) { constructor(private alfrescoSettingsService: AlfrescoSettingsService, private http: Http) {
} }
@ -36,9 +36,10 @@ export class ActivitiProcessService {
getProcesses(): Observable<ProcessInstance[]> { getProcesses(): Observable<ProcessInstance[]> {
let headers = new Headers(); let headers = new Headers();
headers.append('Content-Type', 'application/json'); headers.append('Content-Type', 'application/json');
// headers.append('Authorization', 'Basic ' + btoa('admin@app.activiti.com:admin'));
return this.http.post( return this.http.post(
this.processesUrl, this.processesUrl,
'{"page":0,"filterId":6,"filter":{"sort":"created-desc","name":"","state":"all"},"appDefinitionId":null}', '{"page":0,"sort":"created-desc","state":"all"}',
new RequestOptions({ new RequestOptions({
headers: headers headers: headers
})) }))