[ACS-7420] cleanup process types (#9709)

This commit is contained in:
Denys Vuika
2024-05-21 12:03:57 -04:00
committed by GitHub
parent 07370d963f
commit ff6a92a471
31 changed files with 344 additions and 434 deletions

View File

@@ -2,10 +2,10 @@
Title: Checklist Component
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-19
Last reviewed: 2024-05-21
---
# [Checklist Component](../../../lib/process-services/src/lib/task-list/components/checklist.component.ts "Defined in checklist.component.ts")
# Checklist Component
Shows the checklist task functionality.
@@ -23,16 +23,16 @@ Shows the checklist task functionality.
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| assignee | `string` | | (required) The assignee id that the subtasks are assigned to. |
| readOnly | `boolean` | false | Toggle readonly state of the form. All form widgets will render as readonly if enabled. |
| taskId | `string` | | (required) The id of the parent task to which subtasks are attached. |
| Name | Type | Default value | Description |
|----------|-----------|---------------|-----------------------------------------------------------------------------------------|
| assignee | `string` | | (required) The assignee id that the subtasks are assigned to. |
| readOnly | `boolean` | false | Toggle readonly state of the form. All form widgets will render as readonly if enabled. |
| taskId | `string` | | (required) The id of the parent task to which subtasks are attached. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| checklistTaskCreated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` | Emitted when a new checklist task is created. |
| checklistTaskDeleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a checklist task is deleted. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| Name | Type | Description |
|----------------------|------------------------------------|-----------------------------------------------|
| checklistTaskCreated | `EventEmitter<TaskRepresentation>` | Emitted when a new checklist task is created. |
| checklistTaskDeleted | `EventEmitter<string>` | Emitted when a checklist task is deleted. |
| error | `EventEmitter<any>` | Emitted when an error occurs. |

View File

@@ -2,10 +2,10 @@
Title: Task Details component
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-13
Last reviewed: 2024-05-21
---
# [Task Details component](../../../lib/process-services/src/lib/task-list/components/task-details.component.ts "Defined in task-details.component.ts")
# Task Details Component
Shows the details of the task ID passed in as input.
@@ -21,45 +21,45 @@ Shows the details of the task ID passed in as input.
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| debugMode | `boolean` | false | Toggles debug mode. |
| fieldValidators | [`FormFieldValidator`](../../../lib/core/src/lib/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Field validators for use with the form. |
| readOnlyForm | `boolean` | false | Toggles read-only state of the form. All form widgets render as read-only if enabled. |
| showChecklist | `boolean` | true | Toggles `Checklist` feature for the Header component. |
| showComments | `boolean` | true | Toggles `Comments` feature for the Header component. |
| showFormCompleteButton | `boolean` | true | Toggles rendering of the `Complete` outcome button. |
| showFormRefreshButton | `boolean` | true | Toggles rendering of the `Refresh` button. |
| showFormSaveButton | `boolean` | true | Toggles rendering of the `Save` outcome button. |
| showFormTitle | `boolean` | false | Toggles rendering of the form title. |
| showHeader | `boolean` | true | Toggles task details Header component. |
| showHeaderContent | `boolean` | true | Toggles collapsed/expanded state of the Header component. |
| showInvolvePeople | `boolean` | true | Toggles `Involve People` feature for the Header component. |
| showNextTask | `boolean` | true | Automatically renders the next task when the current one is completed. |
| taskId | `string` | | (**required**) The id of the task whose details we are asking for. |
| Name | Type | Default value | Description |
|------------------------|------------------------|---------------|---------------------------------------------------------------------------------------|
| debugMode | `boolean` | false | Toggles debug mode. |
| fieldValidators | `FormFieldValidator[]` | \[] | Field validators for use with the form. |
| readOnlyForm | `boolean` | false | Toggles read-only state of the form. All form widgets render as read-only if enabled. |
| showChecklist | `boolean` | true | Toggles `Checklist` feature for the Header component. |
| showComments | `boolean` | true | Toggles `Comments` feature for the Header component. |
| showFormCompleteButton | `boolean` | true | Toggles rendering of the `Complete` outcome button. |
| showFormRefreshButton | `boolean` | true | Toggles rendering of the `Refresh` button. |
| showFormSaveButton | `boolean` | true | Toggles rendering of the `Save` outcome button. |
| showFormTitle | `boolean` | false | Toggles rendering of the form title. |
| showHeader | `boolean` | true | Toggles task details Header component. |
| showHeaderContent | `boolean` | true | Toggles collapsed/expanded state of the Header component. |
| showInvolvePeople | `boolean` | true | Toggles `Involve People` feature for the Header component. |
| showNextTask | `boolean` | true | Automatically renders the next task when the current one is completed. |
| taskId | `string` | | (**required**) The id of the task whose details we are asking for. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| assignTask | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<void>` | Emitted when a task is assigned. |
| claimedTask | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a task is claimed. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../../lib/core/src/lib/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/src/lib/form/components/widgets/core/content-link.model.ts)`>` | Emitted when the form field content is clicked. |
| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. |
| formSaved | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| taskCreated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` | Emitted when a checklist task is created. |
| taskDeleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a checklist task is deleted. |
| unClaimedTask | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a task is unclaimed. |
| Name | Type | Description |
|--------------------|------------------------------------|--------------------------------------------------------------------------------------------------------|
| assignTask | `EventEmitter<void>` | Emitted when a task is assigned. |
| claimedTask | `EventEmitter<string>` | Emitted when a task is claimed. |
| error | `EventEmitter<any>` | Emitted when an error occurs. |
| executeOutcome | `EventEmitter<FormOutcomeEvent>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when the form field content is clicked. |
| formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. |
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| taskCreated | `EventEmitter<TaskRepresentation>` | Emitted when a checklist task is created. |
| taskDeleted | `EventEmitter<string>` | Emitted when a checklist task is deleted. |
| unClaimedTask | `EventEmitter<string>` | Emitted when a task is unclaimed. |
## Details
### Custom 'empty Task Details' template
By default the [Task Details component](task-details.component.md) shows a simple "No Tasks" message when there are
no details. You can change this by adding the a custom HTML template as in the following
By default, the [Task Details component](task-details.component.md) shows "No Tasks" message when there are
no details. You can change this by adding a custom HTML template as in the following
example:
```html
@@ -67,7 +67,7 @@ example:
<adf-no-task-details-template>
<ng-template>
<h1>Sorry, no tasks here</h1>
<img src="example.jpg">
<img src="example.jpg" alt="example">
</ng-template>
</adf-no-task-details-template>
</adf-task-details>

View File

@@ -2,10 +2,10 @@
Title: Task Header component
Added: v2.0.0
Status: Active
Last reviewed: 2019-01-14
Last reviewed: 2024-05-21
---
# [Task Header component](../../../lib/process-services/src/lib/task-list/components/task-header.component.ts "Defined in task-header.component.ts")
# Task Header Component
Shows all the information related to a task.
@@ -23,18 +23,18 @@ Shows all the information related to a task.
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| formName | `string` | null | The name of the form. |
| showClaimRelease | `boolean` | true | Toggles display of the claim/release button. |
| taskDetails | [`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts) | | (required) Details related to the task. |
| Name | Type | Default value | Description |
|------------------|----------------------|---------------|----------------------------------------------|
| formName | `string` | null | The name of the form. |
| showClaimRelease | `boolean` | true | Toggles display of the claim/release button. |
| taskDetails | `TaskRepresentation` | | Details related to the task. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| claim | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the task is claimed. |
| unclaim | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the task is unclaimed (ie, requeue). |
| Name | Type | Description |
|---------|---------------------|---------------------------------------------------|
| claim | `EventEmitter<any>` | Emitted when the task is claimed. |
| unclaim | `EventEmitter<any>` | Emitted when the task is unclaimed (ie, requeue). |
## Details
@@ -43,16 +43,32 @@ The component populates an internal array of
By default all properties are displayed:
**_assignee_**, **_status_**, **_priority_**, **_dueDate_**, **_category_**, **_parentName_**, **_created_**, **_id_**, **_description_**, **_formName_**.
- **_assignee_**
- **_status_**
- **_priority_**
- **_dueDate_**
- **_category_**
- **_parentName_**
- **_created_**
- **_id_**
- **_description_**
- **_formName_**.
However, you can also choose which properties to show using a configuration in `app.config.json`:
```json
{
"adf-task-header": {
"presets": {
"properties" : [ "assignee", "status", "priority", "parentName"]
}
},
"presets": {
"properties": [
"assignee",
"status",
"priority",
"parentName"
]
}
}
}
```
With this configuration, only the four listed properties will be shown.

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2019-02-08
---
# [Task List component](../../../lib/process-services/src/lib/task-list/components/task-list.component.ts "Defined in task-list.component.ts")
# Task List Component
Renders a list containing all the tasks matched by the parameters specified.
@@ -51,32 +51,32 @@ when the task list is empty:
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| appId | `number` | | The id of the app. |
| assignment | `string` | | The assignment of the process. Possible values are: "assignee" (the current user is the assignee), "candidate" (the current user is a task candidate, "group_x" (the task is assigned to a group where the current user is a member, no value (the current user is involved). |
| blurOnResize | `boolean` | true | Toggles blur when columns of the list are being resized. |
| data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. |
| dueAfter | `string` | | Filter the tasks. Display only tasks with `created_date` after `dueAfter`. |
| dueBefore | `string` | | Filter the tasks. Display only tasks with `created_date` before `dueBefore`. |
| isResizingEnabled | `boolean` | false | Toggles column resizing for task list. |
| includeProcessInstance | `boolean` | | Toggles inclusion of Process Instances |
| landingTaskId | `string` | | Define which task id should be selected after reloading. If the task id doesn't exist or nothing is passed then the first task will be selected. |
| multiselect | `boolean` | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |
| name | `string` | | Name of the tasklist. |
| page | `number` | 0 | The page number of the tasks to fetch. |
| presetColumn | `string` | | Custom preset column schema in JSON format. |
| processDefinitionId | `string` | | The Definition Id of the process. |
| processInstanceId | `string` | | The Instance Id of the process. |
| selectFirstRow | `boolean` | true | Toggles default selection of the first row |
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| showContextMenu | `boolean` | false | Toggles custom context menu for the component. |
| size | `number` | | The number of tasks to fetch. Default value: 25. |
| sort | `string` | | Define the sort order of the tasks. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` |
| start | `number` | | Starting point of the list within the full set of tasks. |
| state | `string` | | Current state of the process. Possible values are: `completed`, `active`. |
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
| taskId | `string` | | The id of a task |
| Name | Type | Default value | Description |
|------------------------|-------------------------------------------------------------------------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| appId | `number` | | The id of the app. |
| assignment | `string` | | The assignment of the process. Possible values are: "assignee" (the current user is the assignee), "candidate" (the current user is a task candidate, "group_x" (the task is assigned to a group where the current user is a member, no value (the current user is involved). |
| blurOnResize | `boolean` | true | Toggles blur when columns of the list are being resized. |
| data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. |
| dueAfter | `string` | | Filter the tasks. Display only tasks with `created_date` after `dueAfter`. |
| dueBefore | `string` | | Filter the tasks. Display only tasks with `created_date` before `dueBefore`. |
| isResizingEnabled | `boolean` | false | Toggles column resizing for task list. |
| includeProcessInstance | `boolean` | | Toggles inclusion of Process Instances |
| landingTaskId | `string` | | Define which task id should be selected after reloading. If the task id doesn't exist or nothing is passed then the first task will be selected. |
| multiselect | `boolean` | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |
| name | `string` | | Name of the tasklist. |
| page | `number` | 0 | The page number of the tasks to fetch. |
| presetColumn | `string` | | Custom preset column schema in JSON format. |
| processDefinitionId | `string` | | The Definition Id of the process. |
| processInstanceId | `string` | | The Instance Id of the process. |
| selectFirstRow | `boolean` | true | Toggles default selection of the first row |
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| showContextMenu | `boolean` | false | Toggles custom context menu for the component. |
| size | `number` | | The number of tasks to fetch. Default value: 25. |
| sort | `string` | | Define the sort order of the tasks. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` |
| start | `number` | | Starting point of the list within the full set of tasks. |
| state | `string` | | Current state of the process. Possible values are: `completed`, `active`. |
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
| taskId | `string` | | The id of a task |
### Events
@@ -95,12 +95,11 @@ renders details of any chosen instance.
### Setting the column schema
You can configure the list to show any of the properties of the
[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)
You can configure the list to show any of the properties of the `TaskRepresentation`
class. The example below shows how to set up the column schema from HTML:
```html
<adf-tasklist ...>
<adf-tasklist>
<data-columns>
<data-column key="name" title="NAME" class="full-width name-column"></data-column>
<data-column key="created" title="Created" class="hidden"></data-column>
@@ -111,23 +110,27 @@ class. The example below shows how to set up the column schema from HTML:
You can also set a static custom schema declaration in `app.config.json` as shown below:
```json
"adf-task-list": {
{
"adf-task-list": {
"presets": {
"customSchema": [
{
{
"key": "name",
"type": "text",
"title": "name",
"sortable": true
}],
"sortable": true
}
],
"default": [
{
"key": "name",
"type": "text",
"title": "name",
"sortable": true
}],
}
]
}
}
}
```
@@ -141,23 +144,27 @@ You can also set a static custom schema declaration in `app.config.json` as show
You can use an HTML-based schema and an `app.config.json` custom schema declaration at the same time:
```json
"adf-task-list": {
{
"adf-task-list": {
"presets": {
"customSchema": [
{
{
"key": "id",
"type": "text",
"title": "Id",
"sortable": true
}],
"sortable": true
}
],
"default": [
{
"key": "name",
"type": "text",
"title": "name",
"sortable": true
}],
}
]
}
}
}
```
@@ -197,7 +204,7 @@ let sortParam = 'created-desc';
### Pagination strategy
The Tasklist also supports pagination as shown in the example below:
The TaskList also supports pagination as shown in the example below:
```html
<adf-tasklist
@@ -218,7 +225,7 @@ The Tasklist also supports pagination as shown in the example below:
See the [Data Table Adapter interface](../../core/interfaces/datatable-adapter.interface.md) page for full details of the interface and its standard
implementation, [`ObjectDataTableAdapter`](../../../lib/core/src/lib/datatable/data/object-datatable-adapter.ts). Below is an example of how you can set up the adapter for a
typical tasklist:
typical TaskList:
```json
[
@@ -249,7 +256,7 @@ You can provide all necessary content via the handler.
Event properties:
```ts
```text
value: {
row: DataRow,
col: DataColumn,
@@ -259,7 +266,7 @@ value: {
Handler example:
```ts
```text
onShowRowContextMenu(event: DataCellEvent) {
event.value.actions = [
{ title: 'Task List Context Menu' },

View File

@@ -52,12 +52,12 @@ Manages process instances, process variables, and process audit Log.
- _requestNode:_ [`ProcessFilterParamRepresentationModel`](../../../lib/process-services/src/lib/process-list/models/filter-process.model.ts) - Filter for instances
- _processDefinitionKey:_ `string` - (Optional) Limits returned instances to a process definition
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../../lib/process-services/src/lib/process-list/models/process-list.model.ts)`>` - List of process instances
- **getProcessTasks**(processInstanceId: `string`, state?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`[]>`<br/>
- **getProcessTasks**(processInstanceId: `string`, state?: `string`): `Observable<TaskRepresentation[]>`<br/>
Gets task instances for a process instance.
- _processInstanceId:_ `string` - ID of the process instance
- _state:_ `string` - (Optional) Task state filter (can be "active" or "completed")
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`[]>` - Array of task instance details
- **getProcesses**(requestNode: [`ProcessFilterParamRepresentationModel`](../../../lib/process-services/src/lib/process-list/models/filter-process.model.ts), processDefinitionKey?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../../lib/process-services/src/lib/process-list/models/process-list.model.ts)`>`<br/>
- **Returns** `Observable<TaskRepresentation[]>` - Array of task instance details
- **getProcesses**(requestNode: `ProcessFilterParamRepresentationModel, processDefinitionKey?: `string`): `Observable<ProcessListModel>`<br/>
Gets processes for a filter and optionally a process definition.
- _requestNode:_ [`ProcessFilterParamRepresentationModel`](../../../lib/process-services/src/lib/process-list/models/filter-process.model.ts) - Filter for instances
- _processDefinitionKey:_ `string` - (Optional) Limits returned instances to a process definition

View File

@@ -17,53 +17,53 @@ import { TaskListService } from '@alfresco/adf-process-services';
### Methods
- **addTask**(task: [`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>`<br/>
- **addTask**(task: `TaskRepresentation`): `Observable<TaskRepresentation>`<br/>
Adds a subtask (ie, a checklist task) to a parent task.
- _task:_ [`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts) - The task to add
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` - The subtask that was added
- **assignTask**(taskId: `string`, requestNode: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>`<br/>
- _task:_ `TaskRepresentation` - The task to add
- **Returns** `Observable<TaskRepresentation>` - The subtask that was added
- **assignTask**(taskId: `string`, requestNode: `any`): `Observable<TaskRepresentation>`<br/>
Assigns a task to a user or group.
- _taskId:_ `string` - The task to assign
- _requestNode:_ `any` - User or group to assign the task to
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` - Details of the assigned task
- **assignTaskByUserId**(taskId: `string`, userId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>`<br/>
- **Returns** `Observable<TaskRepresentation>` - Details of the assigned task
- **assignTaskByUserId**(taskId: `string`, userId: `string`): `Observable<TaskRepresentation>`<br/>
Assigns a task to a user.
- _taskId:_ `string` - ID of the task to assign
- _userId:_ `string` - ID of the user to assign the task to
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` - Details of the assigned task
- **Returns** `ObservableTaskRepresentation>` - Details of the assigned task
- **attachFormToATask**(taskId: `string`, formId: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Attaches a form to a task.
- _taskId:_ `string` - ID of the target task
- _formId:_ `number` - ID of the form to add
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Null response notifying when the operation is complete
- **claimTask**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>`<br/>
- **Returns** `Observable<any>` - Null response notifying when the operation is complete
- **claimTask**(taskId: `string`): `Observable<TaskRepresentation>`<br/>
Claims a task for the current user.
- _taskId:_ `string` - ID of the task to claim
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` - Details of the claimed task
- **completeTask**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
- **Returns** `Observable<TaskRepresentation>` - Details of the claimed task
- **completeTask**(taskId: `string`): `Observable<any>`<br/>
Gives completed status to a task.
- _taskId:_ `string` - ID of the target task
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Null response notifying when the operation is complete
- **createNewTask**(task: [`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>`<br/>
- **Returns** `Observable<any>` - Null response notifying when the operation is complete
- **createNewTask**(task: `TaskRepresentation`): `Observable<TaskRepresentation>`<br/>
Creates a new standalone task.
- _task:_ [`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts) - Details of the new task
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` - Details of the newly created task
- **deleteForm**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>`<br/>
- _task:_ `TaskDetailsModel` - Details of the new task
- **Returns** `Observable<TaskRepresentation>` - Details of the newly created task
- **deleteForm**(taskId: `string`): `Observable<TaskRepresentation>`<br/>
Deletes a form from a task.
- _taskId:_ `string` - Task id related to form
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` - Null response notifying when the operation is complete
- **deleteTask**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>`<br/>
- **Returns** `Observable<TaskRepresentation>` - Null response notifying when the operation is complete
- **deleteTask**(taskId: `string`): `Observable<TaskRepresentation>`<br/>
Deletes a subtask (ie, a checklist task) from a parent task.
- _taskId:_ `string` - The task to delete
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` - Null response notifying when the operation is complete
- **fetchTaskAuditJsonById**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
- **Returns** `Observable<TaskRepresentation>` - Null response notifying when the operation is complete
- **fetchTaskAuditJsonById**(taskId: `string`): `Observable<any>`<br/>
Fetch the Task Audit information in JSON format
- _taskId:_ `string` - ID of the target task
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - JSON data
- **fetchTaskAuditPdfById**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>`<br/>
- **Returns** `Observable<any>` - JSON data
- **fetchTaskAuditPdfById**(taskId: `string`): `Observable<Blob>`<br/>
Fetches the Task Audit information in PDF format.
- _taskId:_ `string` - ID of the target task
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary PDF data
- **Returns** `Observable<Blob>` - Binary PDF data
- **findTasksByState**(requestNode: `TaskQueryRequestRepresentationModel`, state?: `string`): `Observable<ResultListDataRepresentationTaskRepresentation>`<br/>
Gets tasks matching a query and state value.
- _requestNode:_ `TaskQueryRequestRepresentationModel` - Query to search for tasks
@@ -76,12 +76,12 @@ import { TaskListService } from '@alfresco/adf-process-services';
- **Returns** `Observable<UserTaskFilterRepresentation>` - Filters belonging to the task
- **getFormList**(): `Observable<Form[]>`<br/>
Gets all available reusable forms.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts)`[]>` - Array of form details
- **getTaskChecklist**(id: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`[]>`<br/>
- **Returns** `Observable<Form[]>` - Array of form details
- **getTaskChecklist**(id: `string`): `Observable<TaskRepresentation[]>`<br/>
Gets the checklist for a task.
- _id:_ `string` - ID of the target task
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`[]>` - Array of checklist task details
- **getTaskDetails**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>`<br/>
- **Returns** `Observable<TaskRepresentation[]>` - Array of checklist task details
- **getTaskDetails**(taskId: `string`): `Observable<TaskRepresentation>`<br/>
Gets details for a task.
- _taskId:_ `string` - ID of the target task.
- **Returns** `Observable<TaskDetailsModel>` - Task details
@@ -101,18 +101,18 @@ import { TaskListService } from '@alfresco/adf-process-services';
- **unclaimTask**(taskId: `string`): `Observable<TaskDetailsModel>`<br/>
Un-claims a task for the current user.
- _taskId:_ `string` - ID of the task to unclaim
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` - Null response notifying when the operation is complete
- **updateTask**(taskId: `string`, updated: [`TaskUpdateRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/activiti-rest-api/docs/TaskUpdateRepresentation.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>`<br/>
- **Returns** `Observable<TaskRepresentation>` - Null response notifying when the operation is complete
- **updateTask**(taskId: `string`, updated: `TaskUpdateRepresentation`): `Observable<TaskRepresentation>`<br/>
Updates the details (name, description, due date) for a task.
- _taskId:_ `string` - ID of the task to update
- _updated:_ [`TaskUpdateRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/activiti-rest-api/docs/TaskUpdateRepresentation.md) - Data to update the task (as a [`TaskUpdateRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/activiti-rest-api/docs/TaskUpdateRepresentation.md) instance).
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` - Updated task details
- _updated:_ `TaskUpdateRepresentation`) - Data to update the task (as a `TaskUpdateRepresentation`) instance).
- **Returns** `Observable<TaskRepresentation>` - Updated task details
## Details
### Task details
Several of the methods return one or more [`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts) instances corresponding
Several of the methods return one or more `TaskRepresentation` instances corresponding
to tasks or subtasks matched by a query of some kind. For example, `getTaskDetails`
could be used as shown below:
@@ -125,7 +125,7 @@ this.tasklistService.getTaskDetails(taskInstanceId).subscribe( (taskInstance: Ta
});
```
The resulting [`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts) object contains information like the following:
The resulting `TaskRepresentation` object contains information like the following:
```text
adhocTaskCanBeReassigned: false