Skip to content

Latest commit

 

History

History
515 lines (353 loc) · 13 KB

File metadata and controls

515 lines (353 loc) · 13 KB

TasksApi

All URIs are relative to https://adfdev.envalfresco.com/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

IdentityLinkRepresentation

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

TaskRepresentation

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

IdentityLinkRepresentation

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

IdentityLinkRepresentation

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

IdentityLinkRepresentation

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

TaskAuditInfoRepresentation

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

TaskRepresentation

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

Return type

TaskRepresentation