* integrate JS-API with monorepo * [ci:force] fix token issue [ci:force] migrate docs folder [ci:force] clean personal tokens * [ci:force] gha workflow support * [ci:force] npm publish target * fix js-api test linting * [ci:force] fix test linting, mocks, https scheme * [ci:force] fix https scheme * [ci:force] typescript mappings * [ci:force] update scripts * lint fixes * linting fixes * fix linting * [ci:force] linting fixes * linting fixes * [ci:force] remove js-api upstream and corresponding scripts * [ci:force] jsdoc fixes * fix jsdoc linting * [ci:force] jsdoc fixes * [ci:force] jsdoc fixes * jsdoc fixes * jsdoc fixes * jsdoc fixes * [ci:force] fix jsdoc * [ci:force] reduce code duplication * replace 'chai' expect with node.js assert * replace 'chai' expect with node.js assert * [ci:force] remove chai and chai-spies for js-api testing * [ci:force] cleanup and fix imports * [ci:force] fix linting * [ci:force] fix unit test * [ci:force] fix sonar linting findings * [ci:force] switch activiti api models to interfaces (-2.5% reduction of bundle) * [ci:force] switch activiti api models to interfaces * [ci:force] switch AGS api models to interfaces * [ci:force] switch AGS api models to interfaces * [ci:force] switch search api models to interfaces * [ci:force] switch content api models to interfaces where applicable
13 KiB
TasksApi
All URIs are relative to /activiti-app/api
Method | HTTP request | Description |
---|---|---|
createIdentityLink | POST /enterprise/tasks/{taskId}/identitylinks | List the users and groups involved with a task |
createNewTask | POST /enterprise/tasks | Create a standalone task |
deleteIdentityLink | DELETE /enterprise/tasks/{taskId}/identitylinks/{family}/{identityId}/{type} | Remove a user or group involvement from a task |
deleteTask | DELETE /enterprise/tasks/{taskId} | Delete a task |
filterTasks | POST /enterprise/tasks/filter | Filter a list of tasks |
getIdentityLinkType | GET /enterprise/tasks/{taskId}/identitylinks/{family}/{identityId}/{type} | Get a user or group involvement with a task |
getIdentityLinksForFamily | GET /enterprise/tasks/{taskId}/identitylinks/{family} | List either the users or groups involved with a process instance |
getIdentityLinks | GET /enterprise/tasks/{taskId}/identitylinks | getIdentityLinks |
getTaskAuditLog | GET /enterprise/tasks/{taskId}/audit | Get the audit log for a task |
getTask | GET /enterprise/tasks/{taskId} | Get a task |
listHistoricTasks | POST /enterprise/historic-tasks/query | Query historic tasks |
listTasks | POST /enterprise/tasks/query | List tasks |
updateTask | PUT /enterprise/tasks/{taskId} | Update a task |
createIdentityLink
IdentityLinkRepresentation createIdentityLink(taskIdidentityLinkRepresentation)
List the users and groups involved with a task
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.createIdentityLink(taskIdidentityLinkRepresentation).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskId | string | taskId | |
identityLinkRepresentation | IdentityLinkRepresentation | identityLinkRepresentation |
Return type
createNewTask
TaskRepresentation createNewTask(taskRepresentation)
Create a standalone task
A standalone task is one which is not associated with any process instance.
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.createNewTask(taskRepresentation).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskRepresentation | TaskRepresentation | taskRepresentation |
Return type
deleteIdentityLink
deleteIdentityLink(taskIdfamilyidentityIdtype)
Remove a user or group involvement from a task
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.deleteIdentityLink(taskIdfamilyidentityIdtype).then(() => {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskId | string | taskId | |
family | string | family | |
identityId | string | identityId | |
type | string | type |
Return type
null (empty response body)
deleteTask
deleteTask(taskId)
Delete a task
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.deleteTask(taskId).then(() => {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskId | string | taskId |
Return type
null (empty response body)
filterTasks
ResultListDataRepresentationTaskRepresentation filterTasks(tasksFilter)
Filter a list of tasks
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.filterTasks(tasksFilter).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
tasksFilter | TaskFilterRequestRepresentation | tasksFilter |
Return type
ResultListDataRepresentationTaskRepresentation
getIdentityLinkType
IdentityLinkRepresentation getIdentityLinkType(taskIdfamilyidentityIdtype)
Get a user or group involvement with a task
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.getIdentityLinkType(taskIdfamilyidentityIdtype).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskId | string | taskId | |
family | string | family | |
identityId | string | identityId | |
type | string | type |
Return type
getIdentityLinksForFamily
IdentityLinkRepresentation getIdentityLinksForFamily(taskIdfamily)
List either the users or groups involved with a process instance
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.getIdentityLinksForFamily(taskIdfamily).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskId | string | taskId | |
family | string | family |
Return type
getIdentityLinks
IdentityLinkRepresentation getIdentityLinks(taskId)
getIdentityLinks
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.getIdentityLinks(taskId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskId | string | taskId |
Return type
getTaskAuditLog
TaskAuditInfoRepresentation getTaskAuditLog(taskId)
Get the audit log for a task
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.getTaskAuditLog(taskId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskId | string | taskId |
Return type
getTask
TaskRepresentation getTask(taskId)
Get a task
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.getTask(taskId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskId | string | taskId |
Return type
listHistoricTasks
ResultListDataRepresentationTaskRepresentation listHistoricTasks(queryRequest)
Query historic tasks
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.listHistoricTasks(queryRequest).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
queryRequest | HistoricTaskInstanceQueryRepresentation | queryRequest |
Return type
ResultListDataRepresentationTaskRepresentation
listTasks
ResultListDataRepresentationTaskRepresentation listTasks(tasksQuery)
List tasks
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.listTasks(tasksQuery).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
tasksQuery | TaskQueryRepresentation | tasksQuery |
Return type
ResultListDataRepresentationTaskRepresentation
updateTask
TaskRepresentation updateTask(taskIdupdated)
Update a task
You can edit only name, description and dueDate (ISO 8601 string).
Example
import TasksApi from 'TasksApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let tasksApi = new TasksApi(this.alfrescoApi);
tasksApi.updateTask(taskIdupdated).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
taskId | string | taskId | |
updated | TaskUpdateRepresentation | updated |