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

Commit

Permalink
Merge pull request #75 from Alfresco/dev-eromano-65
Browse files Browse the repository at this point in the history
aadd a method in order to retrieve the form variables #65
  • Loading branch information
VitoAlbano authored Oct 28, 2016
2 parents ab2dbed + 3da2d8e commit a463e07
Show file tree
Hide file tree
Showing 14 changed files with 821 additions and 433 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,20 @@ New method to retrieve just the profile picture URL
this.alfrescoJsApi.activiti.profileApi.getProfilePictureUrl();
```


## Features
- [Activiti process status call](https://github.com/Alfresco/alfresco-js-api/issues/67)
- [add a method in order to retrieve the /task-forms/{task-id}/variables](https://github.com/Alfresco/alfresco-js-api/issues/65)
```javascript

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

this.alfrescoJsApi.activiti.taskFormsApi.getTaskFormVariables(taskId);
```


```javascript
this.alfrescoJsApi.activiti.profileApi.getProfilePictureUrl();
```

### Example
```javascript
Expand Down
945 changes: 549 additions & 396 deletions dist/alfresco-js-api.js

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions dist/alfresco-js-api.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/alfresco-activiti-rest-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ Class | Method | HTTP request | Description
- [ActivitiPublicRestApi.ProcessInstanceFilterRepresentation](docs/ProcessInstanceFilterRepresentation.md)
- [ActivitiPublicRestApi.ProcessInstanceFilterRequestRepresentation](docs/ProcessInstanceFilterRequestRepresentation.md)
- [ActivitiPublicRestApi.ProcessInstanceRepresentation](docs/ProcessInstanceRepresentation.md)
- [ActivitiPublicRestApi.ProcessInstanceVariableRepresentation](docs/ProcessInstanceVariableRepresentation.md)
- [ActivitiPublicRestApi.ProcessScopeIdentifierRepresentation](docs/ProcessScopeIdentifierRepresentation.md)
- [ActivitiPublicRestApi.ProcessScopeRepresentation](docs/ProcessScopeRepresentation.md)
- [ActivitiPublicRestApi.ProcessScopesRequestRepresentation](docs/ProcessScopesRequestRepresentation.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ActivitiPublicRestApi.ProcessInstanceVariableRepresentation

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**type** | **String** | | [optional]
**value** | **Object** | | [optional]
34 changes: 34 additions & 0 deletions src/alfresco-activiti-rest-api/docs/TaskFormsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Method | HTTP request | Description
[**getRestFieldValues**](TaskFormsApi.md#getRestFieldValues) | **GET** /api/enterprise/task-forms/{taskId}/form-values/{field}/{column} | Retrieve Column Field Values
[**getRestFieldValues**](TaskFormsApi.md#getRestFieldValues) | **GET** /api/enterprise/task-forms/{taskId}/form-values/{field} | Retrieve Populated Field Values
[**getTaskForm**](TaskFormsApi.md#getTaskForm) | **GET** /api/enterprise/task-forms/{taskId} | Retrieve Task Form
[**getTaskFormVariable**](TaskFormsApi.md#getTaskFormVariable) | **GET** /app/rest/task-forms/{taskId}/variables | Retrieve Task Form variables
[**saveTaskForm**](TaskFormsApi.md#saveTaskForm) | **POST** /api/enterprise/task-forms/{taskId}/save-form | Save Task Form


Expand Down Expand Up @@ -154,6 +155,39 @@ Name | Type | Description | Notes

No authorization required

### HTTP request headers

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

<a name="getTaskFormVariables"></a>
# **getTaskFormVariables**
> ProcessInstanceVariableRepresentation getTaskFormVariables(taskId)
Retrieve Task Form Variables

### Example
```javascript

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

this.alfrescoJsApi.activiti.taskFormsApi.getTaskFormVariables(taskId);
```

### Parameters

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

### Return type

[**ProcessInstanceVariableRepresentation**](ProcessInstanceVariableRepresentation.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
Expand Down
48 changes: 45 additions & 3 deletions src/alfresco-activiti-rest-api/src/api/TaskFormsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
define(['ApiClient', 'model/CompleteFormRepresentation', 'model/FormValueRepresentation', 'model/FormDefinitionRepresentation', 'model/SaveFormRepresentation'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../../../alfrescoApiClient'), require('../model/CompleteFormRepresentation'), require('../model/FormValueRepresentation'), require('../model/FormDefinitionRepresentation'), require('../model/SaveFormRepresentation'));
module.exports = factory(require('../../../alfrescoApiClient'), require('../model/CompleteFormRepresentation'), require('../model/FormValueRepresentation'), require('../model/FormDefinitionRepresentation'), require('../model/SaveFormRepresentation'), require('../model/ProcessInstanceVariableRepresentation'));
} else {
// Browser globals (root is window)
if (!root.ActivitiPublicRestApi) {
root.ActivitiPublicRestApi = {};
}
root.ActivitiPublicRestApi.TaskFormsApi = factory(root.ActivitiPublicRestApi.ApiClient, root.ActivitiPublicRestApi.CompleteFormRepresentation, root.ActivitiPublicRestApi.FormValueRepresentation, root.ActivitiPublicRestApi.FormDefinitionRepresentation, root.ActivitiPublicRestApi.SaveFormRepresentation);
root.ActivitiPublicRestApi.TaskFormsApi = factory(root.ActivitiPublicRestApi.ApiClient, root.ActivitiPublicRestApi.CompleteFormRepresentation, root.ActivitiPublicRestApi.FormValueRepresentation, root.ActivitiPublicRestApi.FormDefinitionRepresentation, root.ActivitiPublicRestApi.SaveFormRepresentation, root.ActivitiPublicRestApi.ProcessInstanceVariableRepresentation);
}
}(this, function(ApiClient, CompleteFormRepresentation, FormValueRepresentation, FormDefinitionRepresentation, SaveFormRepresentation) {
}(this, function(ApiClient, CompleteFormRepresentation, FormValueRepresentation, FormDefinitionRepresentation, SaveFormRepresentation, ProcessInstanceVariableRepresentation) {
'use strict';

/**
Expand Down Expand Up @@ -229,6 +229,48 @@
);
}

/**
* Function to receive the result of the getTaskFormVariables operation.
* @param {String} error Error message, if any.
* @param {module:model/FormDefinitionRepresentation} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/

/**
* Retrieve Task Form Variables
* @param {String} taskId taskId
*/
this.getTaskFormVariables = function(taskId) {
var postBody = null;

// verify the required parameter 'taskId' is set
if (taskId == undefined || taskId == null) {
throw "Missing the required parameter 'taskId' when calling getTaskFormVariables";
}


var pathParams = {
'taskId': taskId
};
var queryParams = {
};
var headerParams = {
};
var formParams = {
};

var authNames = [];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = [ProcessInstanceVariableRepresentation];

return this.apiClient.callApi(
'/app/rest/task-forms/{taskId}/variables', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}

/**
* Function to receive the result of the saveTaskForm operation.
* @param {String} error Error message, if any.
Expand Down
Loading

0 comments on commit a463e07

Please sign in to comment.