Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

[AAE-2261] [ADF] can't open the downloaded task audit file #676

Merged
merged 1 commit into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/api-legacy/activiti-rest-api/docs/TaskApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,41 @@ Name | Type | Description | Notes

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


<a name="getTaskAuditPdf"></a>
# **getTaskAuditPdf**
> Blob getTaskAuditPdf(taskId)

Retrieve audit information in pdf format

### Example
```javascript

var taskId = "taskId_example"; // String | taskId


this.alfrescoJsApi.activiti.taskApi.getTaskAuditPdf(taskId);
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**taskId** | **String**| taskId |

### Return type

[**Blob**]()

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
Expand Down
4 changes: 2 additions & 2 deletions src/api-legacy/activiti-rest-api/src/api/TaskApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ export class TaskApi {
return this.tasksApi.getTaskAuditLog(taskId);
}

getTaskAuditJson(taskId: string) {
getTaskAuditJson(taskId: string): Promise<TaskAuditInfoRepresentation> {
return this.tasksApi.getTaskAuditLog(taskId);
}

getTaskAuditPdf(taskId: string) {
return this.tasksApi.getTaskAuditLog(taskId);
return this.tasksApi.getTaskAuditPdf(taskId);
}

getRelatedContentForTask(taskId: string, opts?: any): Promise<ResultListDataRepresentationRelatedContentRepresentation> {
Expand Down
30 changes: 30 additions & 0 deletions src/api/activiti-rest-api/api/tasks.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,36 @@ export class TasksApi extends BaseApi {
pathParams, queryParams, headerParams, formParams, postBody,
contentTypes, accepts, TaskAuditInfoRepresentation);
}

/**
* Get the audit log for a task
* @param taskId taskId
* @return Promise<Blob> task audit in blob
*/
getTaskAuditPdf(taskId: string): Promise<Blob> {
throwIfNotDefined(taskId, 'taskId');

let postBody = null;

let pathParams = {
'taskId': taskId
};

let queryParams = {};
let headerParams = {};
let formParams = {};

let contentTypes = ['application/json'];
let accepts = ['application/json'];
let responseType = 'blob';

// Todo: update url once ACTIVITI-4191 fixed
return this.apiClient.callApi(
'app/rest/tasks/{taskId}/audit', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
contentTypes, accepts, responseType);
}

/**
* Get a task
*
Expand Down