From f5ef324dd21d6ba64cb728d503b0fa6061ab2e75 Mon Sep 17 00:00:00 2001
From: Andy Stark <30621568+therealandeeee@users.noreply.github.com>
Date: Wed, 17 Jan 2018 17:11:48 +0000
Subject: [PATCH] [ADF-2152] Updated See Also sections in docs (#2846)
---
docs/search-api.service.md | 5 -
docs/shared-links-api.service.md | 7 +-
docs/site.model.md | 5 +-
docs/sites-api.service.md | 8 +-
docs/start-form.component.md | 9 +-
docs/storage.service.md | 7 +-
docs/tag-actions.component.md | 8 +-
docs/tag-list.component.md | 8 +-
docs/tag-node-list.component.md | 8 +-
docs/tag.service.md | 8 +-
docs/task-filters.component.md | 24 +-
docs/task-header.component.md | 10 +-
docs/task-list.component.md | 41 +--
docs/tasklist.service.md | 435 +++++++++++++++---------------
docs/text-highlight.pipe.md | 7 +-
docs/text-mask.component.md | 17 +-
docs/thumbnail.service.md | 16 +-
docs/time-ago.pipe.md | 5 -
docs/toolbar-divider.component.md | 7 +-
docs/toolbar-title.component.md | 5 +
docs/toolbar.component.md | 5 +
docs/user-info.component.md | 12 +-
docs/user-initial.pipe.md | 9 +-
docs/user-process.model.md | 5 +-
docs/version-list.component.md | 7 +-
docs/version-manager.component.md | 17 +-
docs/viewer.component.md | 4 +-
docs/webscript.component.md | 2 +-
docs/widget.component.md | 7 +-
29 files changed, 328 insertions(+), 380 deletions(-)
diff --git a/docs/search-api.service.md b/docs/search-api.service.md
index 784c8c3d25..81d4859868 100644
--- a/docs/search-api.service.md
+++ b/docs/search-api.service.md
@@ -12,8 +12,3 @@ Searches the repository.
See the
[Alfresco JS API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-search-rest-api/docs/SearchApi.md#search)
for the format of the query and returned data.
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/shared-links-api.service.md b/docs/shared-links-api.service.md
index 59fac0115a..e0f980b79e 100644
--- a/docs/shared-links-api.service.md
+++ b/docs/shared-links-api.service.md
@@ -11,15 +11,10 @@ Gets shared links available to the current user.
Content Services allows users to generate URLs that can be shared with
other people, even if they don't have a Content Services account. These
-URLs are known as *shared links*.
+URLs are known as _shared links_.
Use `getSharedLinks` to find all the shared links that are available to
the current user. You can supply a number of `options` to refine the
search; see the
[Alfresco JS API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SharedlinksApi.md#findsharedlinks)
for more information.
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/site.model.md b/docs/site.model.md
index 48b78e2163..c85c5af6ba 100644
--- a/docs/site.model.md
+++ b/docs/site.model.md
@@ -40,9 +40,6 @@ class SiteMembersModel {
}
```
-
-
## See also
-- [Sites api service](sites.service.md)
-
\ No newline at end of file
+- [Sites api service](sites-api.service.md)
diff --git a/docs/sites-api.service.md b/docs/sites-api.service.md
index 3b45e94842..38b8b8abc4 100644
--- a/docs/sites-api.service.md
+++ b/docs/sites-api.service.md
@@ -40,12 +40,6 @@ and
[getSite](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitesApi.md#getSite)
for more information about the available options.
-
-
## See also
-- [Site model](site.model.md)
-
-
-
-
+- [Site model](site.model.md)
diff --git a/docs/start-form.component.md b/docs/start-form.component.md
index f9a16dcbad..a8d1d18f53 100644
--- a/docs/start-form.component.md
+++ b/docs/start-form.component.md
@@ -16,7 +16,7 @@ Displays the Start Form for a process.
### Properties
| Name | Type | Default | Description |
-| --- | --- | --- | --- |
+| ---- | ---- | ------- | ----------- |
| processDefinitionId | string | | Definition ID of the process to start. |
| processId | string | | Process ID of the process to start. |
| showOutcomeButtons | boolean | true | Should form outcome buttons be shown? |
@@ -26,7 +26,7 @@ Displays the Start Form for a process.
### Events
| Name | Description |
-| --- | --- |
+| ---- | ----------- |
| outcomeClick | Emitted when the user clicks one of the outcome buttons that completes the form. |
## Details
@@ -40,7 +40,6 @@ The `outcomeClick` event is passed a string containing the ID of the outcome but
the user clicked. You can pass this value to the `startProcess` method (defined in the
[Process service](process.service.md)) when activating the process, if necessary.
-
-
+## See also
-
\ No newline at end of file
+- [Process service](process.service.md)
diff --git a/docs/storage.service.md b/docs/storage.service.md
index 04c14e13d4..ce3cbe3ed2 100644
--- a/docs/storage.service.md
+++ b/docs/storage.service.md
@@ -32,10 +32,7 @@ more widely supported by browsers and can be set to expire after a certain date.
If local storage is not available then non-persistent memory storage within the app is
used instead.
-
-
## See also
-- [Cookie service](cookie.service.md)
-- [Content service](content.service.md)
-
\ No newline at end of file
+- [Cookie service](cookie.service.md)
+- [Content service](content.service.md)
diff --git a/docs/tag-actions.component.md b/docs/tag-actions.component.md
index eb247e837b..ad6974f559 100644
--- a/docs/tag-actions.component.md
+++ b/docs/tag-actions.component.md
@@ -1,4 +1,4 @@
-# Alfresco Tag Node Actions List component
+# Tag Node Actions List component
Shows available actions for tags.
@@ -10,10 +10,10 @@ Shows available actions for tags.
-```
+```
### Properties
| Attribute | Type | Default | Description |
-| --- | --- | --- | --- |
-| nodeId | string | | The identifier of a node |
\ No newline at end of file
+| --------- | ---- | ------- | ----------- |
+| nodeId | string | | The identifier of a node |
diff --git a/docs/tag-list.component.md b/docs/tag-list.component.md
index 7d005fe86a..5fb700cdc5 100644
--- a/docs/tag-list.component.md
+++ b/docs/tag-list.component.md
@@ -1,5 +1,9 @@
-# Alfresco Tag List component
+# Tag List component
Shows tags for an item.
-
\ No newline at end of file
+
+
+## See Also
+
+- [Tag service](tag.service.md)
diff --git a/docs/tag-node-list.component.md b/docs/tag-node-list.component.md
index 335c95b93a..30e4dd4dea 100644
--- a/docs/tag-node-list.component.md
+++ b/docs/tag-node-list.component.md
@@ -1,4 +1,4 @@
-# Alfresco Tag Node List component
+# Tag Node List component
Shows tags for a node.
@@ -10,10 +10,10 @@ Shows tags for a node.
-```
+```
### Properties
| Attribute | Type | Default | Description |
-| --- | --- | --- | --- |
-| nodeId | string | | The identifier of a node |
+| --------- | ---- | ------- | ----------- |
+| nodeId | string | | The identifier of a node |
diff --git a/docs/tag.service.md b/docs/tag.service.md
index e669188604..5c4478eda7 100644
--- a/docs/tag.service.md
+++ b/docs/tag.service.md
@@ -35,12 +35,6 @@ in the Alfresco JS API for more information about the types returned by Tag
service methods and for the implementation of the REST API the service is
based on.
-
-
## See also
-- [Tag list component](tag-list.component.md)
-
-
-
-
+- [Tag list component](tag-list.component.md)
diff --git a/docs/task-filters.component.md b/docs/task-filters.component.md
index 6cc6d1b296..a548d59c78 100644
--- a/docs/task-filters.component.md
+++ b/docs/task-filters.component.md
@@ -1,4 +1,4 @@
-# Activiti Filter component
+# Task Filters component
Shows all available filters.
@@ -11,7 +11,7 @@ Shows all available filters.
### Properties
| Name | Type | Description |
-| --- | --- | --- |
+| ---- | ---- | ----------- |
| filterParam | [FilterParamsModel](#filterparamsmodel) | The params to filter the task filter. If there is no match the default one (first filter of the list) is selected |
| appId | string | Display filters available to the current user for the application with the specified ID. |
| `appName` | string | Display filters available to the current user for the application with the specified name. |
@@ -22,20 +22,19 @@ If both `appId` and `appName` are specified then `appName` will take precedence
### Events
| Name | Description |
-| --- | --- |
-| filterClick | Raised when the filter in the list is clicked |
-| success | Raised when the list is loaded |
-| error | Raised if there is an error during the loading |
+| ---- | ----------- |
+| filterClick | Raised when the filter in the list is clicked |
+| success | Raised when the list is loaded |
+| error | Raised if there is an error during the loading |
## Details
### How filter the activiti task filters
- ```html
+```html
+ [filterParam]="{name:'My tasks'}">
-
```
You can use inside the filterParam one of the properties from [FilterParamsModel](#filterparamsmodel) (see below).
@@ -51,7 +50,7 @@ You can use inside the filterParam one of the properties from [FilterParamsModel
```
| Name | Type | Description |
-| --- | --- | --- |
+| ---- | ---- | ----------- |
| id | string | The id of the task filter |
| name | string | The name of the task filter, lowercase is checked |
| index | string | The zero-based position of the filter in the array. |
@@ -61,9 +60,6 @@ You can use inside the filterParam one of the properties from [FilterParamsModel
The task filter often works well as an item in an accordion menu. See the [Accordion component](accordion.component.md)
page for an example of how to do set this up.
-
-
## See also
-- [Filter model](filter.model.md)
-
\ No newline at end of file
+- [Filter model](filter.model.md)
diff --git a/docs/task-header.component.md b/docs/task-header.component.md
index cb0c0c3130..6f01d3279c 100644
--- a/docs/task-header.component.md
+++ b/docs/task-header.component.md
@@ -1,4 +1,4 @@
-# Activiti Task Header component
+# Task Header component
Shows all the information related to a task.
@@ -15,14 +15,14 @@ Shows all the information related to a task.
### Properties
| Name | Type | Default | Description |
-| --- | --- | --- | --- |
-| taskDetails | [TaskDetailsModel](#taskdetailsmodel) | | (**required**) The task details related to the task. |
-| formName | string | | The name of the form. |
+| ---- | ---- | ------- | ----------- |
+| taskDetails | [TaskDetailsModel](#taskdetailsmodel) | | (**required**) The task details related to the task. |
+| formName | string | | The name of the form. |
### Events
| Name | Description |
-| --- | --- |
+| ---- | ----------- |
| claim | Raised when the task is claimed. |
| unclaim | Raised when the task is unclaimed (requeued). |
diff --git a/docs/task-list.component.md b/docs/task-list.component.md
index 12bc8a1205..368c2ec4f7 100644
--- a/docs/task-list.component.md
+++ b/docs/task-list.component.md
@@ -1,4 +1,4 @@
-# Activiti Task List component
+# Task List component
Renders a list containing all the tasks matched by the parameters specified.
@@ -11,6 +11,7 @@ Renders a list containing all the tasks matched by the parameters specified.
[assignment]="'assignee'">
```
+
You can pass schema as data adapter for the tasklist like shown below :
```ts
@@ -79,12 +80,14 @@ define static custom schema in the app.config.json as shown below json format.
}
}
```
+
```html
```
+
You can also use both HTML-based and app.config.json custom schema declaration at same time like shown below:
```json
@@ -107,6 +110,7 @@ You can also use both HTML-based and app.config.json custom schema declaration a
}
}
```
+
```html
Possible values are: assignee : where the current user is the assignee candidate: where the current user is a task candidate group_x: where the task is assigned to a group where the current user is a member of. no value: where the current user is involved |
-| 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. |
-| multiselect | boolean | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |
-| state | string || Define state of the processes. Possible values are: `completed`, `active` |
+| assignment | string | | The assignment of the process. Possible values are: - assignee : where the current user is the assignee
- candidate: where the current user is a task candidate
- group_x: where the task is assigned to a group where the current user is a member of.
- no value: where the current user is involved
|
+| 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. |
+| multiselect | boolean | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |
+| state | string | | Define state of the processes. Possible values are: `completed`, `active` |
| hasIcon | boolean | true | Toggle the icon on the left . |
-| landingTaskId | string | | Define which task id should be selected after the reloading. If the task id doesn't exist or nothing is passed it will select the first task |
-| sort | string | | Define the sort of the processes. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` |
-| data | [DataTableAdapter](DataTableAdapter.md) | | JSON object that represent the number and the type of the columns that you want show (see the [example](#datatableadapter-example) section below) |
+| landingTaskId | string | | Define which task id should be selected after the reloading. If the task id doesn't exist or nothing is passed it will select the first task |
+| sort | string | | Define the sort of the processes. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` |
+| data | [DataTableAdapter](DataTableAdapter.md) | | JSON object that represent the number and the type of the columns that you want show (see the [example](#datatableadapter-example) section below) |
### Events
| Name | Description |
-| --- | --- |
+| ---- | ----------- |
| success | Raised when the task list is loaded |
| rowClick | Raised when the task in the list is clicked |
-| rowsSelected | Raised when the a row is selected/unselected |
+| rowsSelected | Raised when the a row is selected/unselected |
## Details
@@ -172,10 +176,7 @@ typical tasklist.
You can customize the styling of a column and also add features like tooltips and automatic translation of column titles. See the [DataColumn](data-column.component.md) page for more information about these features.
-
-
## See also
-- [Data column component](data-column.component.md)
-- [DataTableAdapter](DataTableAdapter.md)
-
+- [Data column component](data-column.component.md)
+- [DataTableAdapter](DataTableAdapter.md)
diff --git a/docs/tasklist.service.md b/docs/tasklist.service.md
index b6c79f20d0..1e5f8035ed 100644
--- a/docs/tasklist.service.md
+++ b/docs/tasklist.service.md
@@ -17,6 +17,7 @@ export class SomePageComponent implements OnInit {
## Methods
#### getTaskDetails(taskId: string): Observable``
+
Get Task Instance metadata for passed in Task Instance ID:
```ts
@@ -31,41 +32,40 @@ this.tasklistService.getTaskDetails(taskInstanceId).subscribe( (taskInstance: Ta
The `taskInstanceId` refers to a Task Instance identifier in APS.
The returned `taskInstance` object is of type `TaskDetailsModel` and looks like in this sample:
-```
-adhocTaskCanBeReassigned: false
-assignee: UserProcessModel {pictureId: null, id: 1, email: "admin@app.activiti.com", firstName: null, lastName: "Administrator"}
-category: null
-created: Wed Oct 11 2017 09:07:14 GMT+0100 (BST) {}
-description: null
-dueDate: null
-duration: null
-endDate: null
-executionId: "11337"
-formKey: "9"
-id: "15303"
-initiatorCanCompleteTask: false
-involvedPeople: []
-managerOfCandidateGroup: false
-memberOfCandidateGroup: false
-memberOfCandidateUsers: false
-name: "Clarify Invoice - Invoice-20302.pdf"
-parentTaskId: null
-parentTaskName: null
-priority: 50
-processDefinitionCategory: "http://www.activiti.org/processdef"
-processDefinitionDeploymentId: "18"
-processDefinitionDescription: "This is a simple invoice approval process that allows a person to assign a dedicated approver for the the invoice. It will then be routed to the Accounting department for payment preparation. Once payment is prepared the invoice will be stored in a specific folder and an email notification will be sent."
-processDefinitionId: "InvoiceApprovalProcess:2:21"
-processDefinitionKey: "InvoiceApprovalProcess"
-processDefinitionName: "Invoice Approval Process"
-processDefinitionVersion: 2
-processInstanceId: "11337"
-processInstanceName: null
-processInstanceStartUserId: "1"
-taskDefinitionKey: "clarifyInvoice"
-```
+ adhocTaskCanBeReassigned: false
+ assignee: UserProcessModel {pictureId: null, id: 1, email: "admin@app.activiti.com", firstName: null, lastName: "Administrator"}
+ category: null
+ created: Wed Oct 11 2017 09:07:14 GMT+0100 (BST) {}
+ description: null
+ dueDate: null
+ duration: null
+ endDate: null
+ executionId: "11337"
+ formKey: "9"
+ id: "15303"
+ initiatorCanCompleteTask: false
+ involvedPeople: []
+ managerOfCandidateGroup: false
+ memberOfCandidateGroup: false
+ memberOfCandidateUsers: false
+ name: "Clarify Invoice - Invoice-20302.pdf"
+ parentTaskId: null
+ parentTaskName: null
+ priority: 50
+ processDefinitionCategory: "http://www.activiti.org/processdef"
+ processDefinitionDeploymentId: "18"
+ processDefinitionDescription: "This is a simple invoice approval process that allows a person to assign a dedicated approver for the the invoice. It will then be routed to the Accounting department for payment preparation. Once payment is prepared the invoice will be stored in a specific folder and an email notification will be sent."
+ processDefinitionId: "InvoiceApprovalProcess:2:21"
+ processDefinitionKey: "InvoiceApprovalProcess"
+ processDefinitionName: "Invoice Approval Process"
+ processDefinitionVersion: 2
+ processInstanceId: "11337"
+ processInstanceName: null
+ processInstanceStartUserId: "1"
+ taskDefinitionKey: "clarifyInvoice"
#### getTaskChecklist(id: string): Observable``
+
Get all the sub-task instances for a Task Instance, also called the check list:
```ts
@@ -79,48 +79,47 @@ this.tasklistService.getTaskChecklist(parentTaskId).subscribe( (subTasks: TaskDe
The response is an array of `TaskDetailsModel` representing the sub-tasks:
-```
-Sub Tasks:
- 0:
- adhocTaskCanBeReassigned: false
- assignee: UserProcessModel {pictureId: null, id: 1, email: "admin@app.activiti.com", firstName: null, lastName: "Administrator"}
- category: "2"
- created: "2017-10-29T07:29:28.881+0000"
- description: null
- dueDate: null
- duration: null
- endDate: null
- executionId: null
- formKey: null
- id: "74745"
- initiatorCanCompleteTask: false
- involvedPeople: undefined
- managerOfCandidateGroup: false
- memberOfCandidateGroup: false
- memberOfCandidateUsers: false
- name: "Double check invoice amount"
- parentTaskId: "15303"
- parentTaskName: "Clarify Invoice - Invoice-10292.pdf"
- priority: 50
- processDefinitionCategory: null
- processDefinitionDeploymentId: null
- processDefinitionDescription: null
- processDefinitionId: null
- processDefinitionKey: null
- processDefinitionName: null
- processDefinitionVersion: 0
- processInstanceId: null
- processInstanceName: null
- processInstanceStartUserId: null
- taskDefinitionKey: null
- 1 :
- {processDefinitionVersion: 0, id: "74746", name: "Verify with the person that did the purchase", priority: 50, assignee: UserProcessModel, …}
-```
+ Sub Tasks:
+ 0:
+ adhocTaskCanBeReassigned: false
+ assignee: UserProcessModel {pictureId: null, id: 1, email: "admin@app.activiti.com", firstName: null, lastName: "Administrator"}
+ category: "2"
+ created: "2017-10-29T07:29:28.881+0000"
+ description: null
+ dueDate: null
+ duration: null
+ endDate: null
+ executionId: null
+ formKey: null
+ id: "74745"
+ initiatorCanCompleteTask: false
+ involvedPeople: undefined
+ managerOfCandidateGroup: false
+ memberOfCandidateGroup: false
+ memberOfCandidateUsers: false
+ name: "Double check invoice amount"
+ parentTaskId: "15303"
+ parentTaskName: "Clarify Invoice - Invoice-10292.pdf"
+ priority: 50
+ processDefinitionCategory: null
+ processDefinitionDeploymentId: null
+ processDefinitionDescription: null
+ processDefinitionId: null
+ processDefinitionKey: null
+ processDefinitionName: null
+ processDefinitionVersion: 0
+ processInstanceId: null
+ processInstanceName: null
+ processInstanceStartUserId: null
+ taskDefinitionKey: null
+ 1 :
+ {processDefinitionVersion: 0, id: "74746", name: "Verify with the person that did the purchase", priority: 50, assignee: UserProcessModel, …}
Looking at the `TaskDetailsModel` for a sub-task we can see that it has a parent task ID that matches what we specified
when calling this method.
#### getTasks(requestNode: TaskQueryRequestRepresentationModel): Observable``
+
Get tasks matching passed in query definition:
```ts
@@ -161,22 +160,21 @@ pooled tasks (i.e. tasks that needs to be claimed by a user), then use `candidat
A `TaskListModel` object is returned for a successful query and the `data` property is an array of
`TaskDetailsModel`:
-```
-data:
- 0: {id: "75010", name: "Approve Invoice - Invoice-10202.pdf", description: null, category: null, assignee: {…}, …}
- 1: {id: "74746", name: "Verify with the person that did the purchase", description: null, category: "2", assignee: {…}, …}
- 2: {id: "74745", name: "Double check invoice amount", description: null, category: "2", assignee: {…}, …}
- 3: {id: "20686", name: "Sample checklist task 1", description: null, category: "2", assignee: {…}, …}
- 4: {id: "15303", name: "Clarify Invoice - Invoice-20302.pdf", description: null, category: null, assignee: {…}, …}
-length: 5
-size: 5
-start: 0
-total: 10
-```
+ data:
+ 0: {id: "75010", name: "Approve Invoice - Invoice-10202.pdf", description: null, category: null, assignee: {…}, …}
+ 1: {id: "74746", name: "Verify with the person that did the purchase", description: null, category: "2", assignee: {…}, …}
+ 2: {id: "74745", name: "Double check invoice amount", description: null, category: "2", assignee: {…}, …}
+ 3: {id: "20686", name: "Sample checklist task 1", description: null, category: "2", assignee: {…}, …}
+ 4: {id: "15303", name: "Clarify Invoice - Invoice-20302.pdf", description: null, category: null, assignee: {…}, …}
+ length: 5
+ size: 5
+ start: 0
+ total: 10
We can see that this query resulted in 10 tasks (see `total`), but only 5 were returned as we set `size` to `5`.
#### getTotalTasks(requestNode: TaskQueryRequestRepresentationModel): Observable``
+
Get total number of tasks matching passed in query definition:
```ts
@@ -202,16 +200,15 @@ this.tasklistService.getTotalTasks(taskQuery).subscribe( (response: any) => {
This is pretty much the same type of query as the `getTasks` method, except that here we just
return how many Task Instances it matched in the `total` property:
-```
-data:[]
-size: 0
-start: 0
-total: 10
-```
+ data:[]
+ size: 0
+ start: 0
+ total: 10
When you call this method it always sets the `size` property to `0`.
#### findTasksByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable``
+
Find and return Task Instances by state `open` or `completed` and query model:
```ts
@@ -235,6 +232,7 @@ this.tasklistService.findTasksByState(taskQuery, taskState).subscribe( (taskList
console.log('Error: ', error);
});
```
+
The number of tasks that are returned is controlled by the `size` property.
This is a convenience method on top of the `getTasks` method. It overwrites the `requestNode.state` property
@@ -242,6 +240,7 @@ with passed in `state` before making the call to `getTasks`.
For an example of the response see the `getTasks` method.
#### findAllTaskByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable``
+
Find and return all Task Instances by state `open` or `completed` and query model:
```ts
@@ -274,6 +273,7 @@ passed in `state` before making any other calls. Before making the `getTasks` ca
**Note** that this can return a lot of data if you are not careful.
#### findAllTasksWithoutState(requestNode: TaskQueryRequestRepresentationModel): Observable``
+
Find and return all Task Instances that matches query model, regardless of state:
```ts
@@ -305,6 +305,7 @@ Internally it basically calls `findTasksByState(requestNode, 'open')` and
**Note** that this can return a lot of data if you are not careful.
#### assignTaskByUserId(taskId: string, userId: number): Observable``
+
Assign a Task Instance to a user via the User ID:
```ts
@@ -320,6 +321,7 @@ this.tasklistService.assignTaskByUserId(taskId, userId).subscribe( (taskInstance
The user ID identifies a User in APS.
#### assignTask(taskId: string, requestNode: any): Observable``
+
Assign a task to a user via a user object with an `id` property, for example:
```ts
@@ -335,7 +337,8 @@ this.tasklistService.assignTask(taskId, user).subscribe( (taskInstance: TaskDeta
This method does the same as the `assignTaskByUserId` method, the only difference is that this
method can be used when you have an object where the User ID is contained in an `id` property.
-#### claimTask(taskId: string): Observable``
+#### claimTask(taskId: string): Observable``
+
Claim a pooled task (i.e. candidate task) as current user so it can be worked on and later on completed:
```ts
@@ -348,10 +351,11 @@ this.tasklistService.claimTask(taskId).subscribe( (taskInstance: TaskDetailsMode
```
The response will be `null` if the task was claimed successfully.
-
+
The task assignment changes from `candidate` to `assignee`.
-#### unclaimTask(taskId: string): Observable``
+#### unclaimTask(taskId: string): Observable``
+
Return a claimed task to the pool (i.e. make it a candidate task):
```ts
@@ -362,10 +366,11 @@ this.tasklistService.unclaimTask(taskId).subscribe( (taskInstance: TaskDetailsMo
console.log('Error: ', error);
});
```
-
+
The task assignment changes from `assignee` to `candidate`.
-#### completeTask(taskId: string)
+#### completeTask(taskId: string)
+
Complete a Task Instance as current user and progress Process Instance:
```ts
@@ -377,9 +382,10 @@ This only works if the Task Instance has only one Outcome (i.e. the default `Com
If the Task Instance has multiple Outcomes, such as Approve and Reject, then this method does not
work, and the Task Instance has to be completed via its associated form. Otherwise you will see an error such as:
-*ERROR Error: Uncaught (in promise): Error: {"message":"Task must be completed using it's form","messageKey":"GENERAL.ERROR.BAD-REQUEST"}*
+_ERROR Error: Uncaught (in promise): Error: {"message":"Task must be completed using it's form","messageKey":"GENERAL.ERROR.BAD-REQUEST"}_
+
+#### updateTask(taskId: any, updated): Observable``
-#### updateTask(taskId: any, updated): Observable``
Update name, description, and due date for a Task Instance:
```ts
@@ -395,43 +401,43 @@ this.tasklistService.updateTask(taskId, updateData).subscribe( (updatedTaskDetai
console.log('Error: ', error);
});
```
+
The response is all info about the updated Task Instance, in this example a stand-alone task was updated so there
is no associated process:
-```
-adhocTaskCanBeReassigned: false
-assignee: undefined
-category: null
-created: Mon Nov 13 2017 16:34:49 GMT+0000 (GMT) {}
-description: "Updated description"
-dueDate: Sat Feb 10 2018 11:00:00 GMT+0000 (GMT) {}
-duration: NaN
-endDate: null
-executionId: null
-formKey: "5005"
-id: "80002"
-initiatorCanCompleteTask: false
-managerOfCandidateGroup: false
-memberOfCandidateGroup: false
-memberOfCandidateUsers: false
-name: "Updated name"
-parentTaskId: null
-parentTaskName: null
-priority: 50
-processDefinitionCategory: null
-processDefinitionDeploymentId: null
-processDefinitionDescription: null
-processDefinitionId: null
-processDefinitionKey: null
-processDefinitionName: null
-processDefinitionVersion: 0
-processInstanceId: null
-processInstanceName: null
-processInstanceStartUserId: null
-taskDefinitionKey: null
-```
+ adhocTaskCanBeReassigned: false
+ assignee: undefined
+ category: null
+ created: Mon Nov 13 2017 16:34:49 GMT+0000 (GMT) {}
+ description: "Updated description"
+ dueDate: Sat Feb 10 2018 11:00:00 GMT+0000 (GMT) {}
+ duration: NaN
+ endDate: null
+ executionId: null
+ formKey: "5005"
+ id: "80002"
+ initiatorCanCompleteTask: false
+ managerOfCandidateGroup: false
+ memberOfCandidateGroup: false
+ memberOfCandidateUsers: false
+ name: "Updated name"
+ parentTaskId: null
+ parentTaskName: null
+ priority: 50
+ processDefinitionCategory: null
+ processDefinitionDeploymentId: null
+ processDefinitionDescription: null
+ processDefinitionId: null
+ processDefinitionKey: null
+ processDefinitionName: null
+ processDefinitionVersion: 0
+ processInstanceId: null
+ processInstanceName: null
+ processInstanceStartUserId: null
+ taskDefinitionKey: null
#### createNewTask(task: TaskDetailsModel): Observable``
+
Create a new stand-alone Task Instance that is not associated with a Process Instance:
```ts
@@ -452,45 +458,44 @@ and that is not assigned to a user (i.e. `assignee: null`).
The response looks like this, we can see that an ID was generated for the Task Instance:
-```
-Created task details:
- adhocTaskCanBeReassigned: false
- assignee: null
- category: null
- created: Mon Nov 13 2017 16:34:49 GMT+0000 (GMT) {}
- description: "A new stand-alone task"
- dueDate: null
- duration: null
- endDate: null
- executionId: null
- formKey: null
- id: "80002"
- initiatorCanCompleteTask: false
- involvedPeople: undefined
- managerOfCandidateGroup: false
- memberOfCandidateGroup: false
- memberOfCandidateUsers: false
- name: "Some Task"
- parentTaskId: null
- parentTaskName: null
- priority: 50
- processDefinitionCategory: null
- processDefinitionDeploymentId: null
- processDefinitionDescription: null
- processDefinitionId: null
- processDefinitionKey: null
- processDefinitionName: null
- processDefinitionVersion: 0
- processInstanceId: null
- processInstanceName: null
- processInstanceStartUserId: null
- taskDefinitionKey: null
-```
+ Created task details:
+ adhocTaskCanBeReassigned: false
+ assignee: null
+ category: null
+ created: Mon Nov 13 2017 16:34:49 GMT+0000 (GMT) {}
+ description: "A new stand-alone task"
+ dueDate: null
+ duration: null
+ endDate: null
+ executionId: null
+ formKey: null
+ id: "80002"
+ initiatorCanCompleteTask: false
+ involvedPeople: undefined
+ managerOfCandidateGroup: false
+ memberOfCandidateGroup: false
+ memberOfCandidateUsers: false
+ name: "Some Task"
+ parentTaskId: null
+ parentTaskName: null
+ priority: 50
+ processDefinitionCategory: null
+ processDefinitionDeploymentId: null
+ processDefinitionDescription: null
+ processDefinitionId: null
+ processDefinitionKey: null
+ processDefinitionName: null
+ processDefinitionVersion: 0
+ processInstanceId: null
+ processInstanceName: null
+ processInstanceStartUserId: null
+ taskDefinitionKey: null
See the `attachFormToATask` method for how to attach a form to the User Task. And see the `assignTaskByUserId` method
for how to assign a user to the new Task Instance.
#### attachFormToATask(taskId: string, formId: number): Observable``
+
Attach a form to a User Task:
```ts
@@ -510,6 +515,7 @@ in APS when you work with it). See the `getFormList` method for how fetch a list
The response will be `null` if form was attached successfully to task.
#### getFormList(): Observable`