mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-5601] Add getProcessesAndTasksOnContent to process content service (#8940)
* [ACS-5601] Add getProcessesAndTasksOnContent to process content service * [ACS-5601] Add docs for new method * [ACS-5601] Fix import
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
import { AlfrescoApiService, LogService } from '@alfresco/adf-core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivitiContentApi, RelatedContentRepresentation } from '@alfresco/js-api';
|
||||
import { ActivitiContentApi, RelatedContentRepresentation, ResultListDataRepresentationRelatedProcessTask } from '@alfresco/js-api';
|
||||
import { Observable, from, throwError } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
|
||||
@@ -183,6 +183,19 @@ export class ProcessContentService {
|
||||
.pipe(catchError((err) => this.handleError(err)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists processes and tasks on workflow started with provided document
|
||||
*
|
||||
* @param sourceId - id of the document that workflow or task has been started with
|
||||
* @param source - source of the document that workflow or task has been started with
|
||||
* @param size - size of the entries to get
|
||||
* @param page - page number
|
||||
* @return Promise<ResultListDataRepresentationRelatedProcessTask>
|
||||
*/
|
||||
getProcessesAndTasksOnContent(sourceId: string, source: string, size?: number, page?: number): Observable<ResultListDataRepresentationRelatedProcessTask> {
|
||||
return from(this.contentApi.getProcessesAndTasksOnContent(sourceId, source, size, page)).pipe(catchError((err) => this.handleError(err)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a JSON representation of data.
|
||||
*
|
||||
|
Reference in New Issue
Block a user