From 04e50eeabdc7cd75dc21b9afd2cdbe528aef1933 Mon Sep 17 00:00:00 2001 From: Andy Stark <30621568+therealandeeee@users.noreply.github.com> Date: Thu, 24 May 2018 17:10:35 +0100 Subject: [PATCH] [ADF-2764] Updated process services docs with latest features (#3390) --- docs/process-services/README.md | 61 ++--- docs/process-services/apps-list.component.md | 11 +- docs/process-services/checklist.component.md | 11 +- .../create-process-attachment.component.md | 7 +- .../create-task-attachment.component.md | 15 +- docs/process-services/filter.model.md | 1 + .../process-services/people-list.component.md | 17 +- .../people-search.component.md | 11 +- docs/process-services/people.component.md | 15 +- .../process-attachment-list.component.md | 16 +- .../process-comments.component.md | 9 +- .../process-filter.service.md | 62 +++-- .../process-filters.component.md | 34 ++- .../process-instance-details.component.md | 15 +- .../process-instance-header.component.md | 11 +- .../process-instance-tasks.component.md | 11 +- .../process-list.component.md | 38 +-- docs/process-services/process.service.md | 98 +++---- .../select-apps-dialog.component.md | 1 + .../start-process.component.md | 29 ++- docs/process-services/start-task.component.md | 9 +- .../task-attachment-list.component.md | 17 +- .../task-details.component.md | 56 ++-- docs/process-services/task-details.model.md | 1 + docs/process-services/task-filter.service.md | 78 +++--- .../task-filters.component.md | 36 ++- .../process-services/task-header.component.md | 13 +- docs/process-services/task-list.component.md | 62 +++-- .../task-standalone.component.md | 25 +- docs/process-services/tasklist.service.md | 243 ++++++++++-------- .../components/process-list.component.ts | 10 +- tools/doc/tools/tsInfo.js | 4 +- tools/doc/tools/tsInfo.ts | 4 +- 33 files changed, 576 insertions(+), 455 deletions(-) diff --git a/docs/process-services/README.md b/docs/process-services/README.md index 5cd0bf82a7..7c99bc99ff 100644 --- a/docs/process-services/README.md +++ b/docs/process-services/README.md @@ -11,50 +11,43 @@ for more information about installing and using the source code. | Name | Description | Source link | | ---- | ----------- | ----------- | -| [Apps list component](apps-list.component.md) | Shows all available apps. | [Source](../../lib/process-services/app-list/apps-list.component.ts) | -| [Create process attachment component](create-process-attachment.component.md) | Displays Upload Component (Drag and Click) to upload the attachment to a specified process instance | [Source](../../lib/process-services/attachment/create-process-attachment.component.ts) | -| [Create task attachment component](create-task-attachment.component.md) | Displays Upload Component (Drag and Click) to upload the attachment to a specified task | [Source](../../lib/process-services/attachment/create-task-attachment.component.ts) | -| [Process attachment list component](process-attachment-list.component.md) | Displays attached documents on a specified process instance | [Source](../../lib/process-services/attachment/process-attachment-list.component.ts) | -| [Task attachment list component](task-attachment-list.component.md) | Displays attached documents on a specified task. | [Source](../../lib/process-services/attachment/task-attachment-list.component.ts) | -| [People component](people.component.md) | Displays users involved with a specified task | [Source](../../lib/process-services/people/components/people/people.component.ts) | -| [People list component](people-list.component.md) | Shows a list of users (people). | [Source](../../lib/process-services/people/components/people-list/people-list.component.ts) | -| [People search component](people-search.component.md) | Searches users/people. | [Source](../../lib/process-services/people/components/people-search/people-search.component.ts) | -| [Process comments component](process-comments.component.md) | Displays comments associated with a particular process instance and allows the user to add new comments. | [Source](../../lib/process-services/process-comments/process-comments.component.ts) | -| [Process filters component](process-filters.component.md) | Collection of criteria used to filter process instances, which may be customized by users. | [Source](../../lib/process-services/process-list/components/process-filters.component.ts) | -| [Process instance details component](process-instance-details.component.md) | Displays detailed information on a specified process instance | [Source](../../lib/process-services/process-list/components/process-instance-details.component.ts) | -| [Process instance header component](process-instance-header.component.md) | Sub-component of the process details component, which renders some general information about the selected process. | [Source](../../lib/process-services/process-list/components/process-instance-header.component.ts) | -| [Process instance tasks component](process-instance-tasks.component.md) | Lists both the active and completed tasks associated with a particular process instance | [Source](../../lib/process-services/process-list/components/process-instance-tasks.component.ts) | | [Process list component](process-list.component.md) | Renders a list containing all the process instances matched by the parameters specified. | [Source](../../lib/process-services/process-list/components/process-list.component.ts) | -| [Start process component](start-process.component.md) | Starts a process. | [Source](../../lib/process-services/process-list/components/start-process.component.ts) | -| [Checklist component](checklist.component.md) | Shows the checklist task functionality. | [Source](../../lib/process-services/task-list/components/checklist.component.ts) | -| [Start task component](start-task.component.md) | Creates/Starts new task for the specified app | [Source](../../lib/process-services/task-list/components/start-task.component.ts) | -| [Task details component](task-details.component.md) | Shows the details of the task ID passed in as input. | [Source](../../lib/process-services/task-list/components/task-details.component.ts) | -| [Task filters component](task-filters.component.md) | Shows all available filters. | [Source](../../lib/process-services/task-list/components/task-filters.component.ts) | -| [Task header component](task-header.component.md) | Shows all the information related to a task. | [Source](../../lib/process-services/task-list/components/task-header.component.ts) | -| [Task list component](task-list.component.md) | Renders a list containing all the tasks matched by the parameters specified. | [Source](../../lib/process-services/task-list/components/task-list.component.ts) | -| [Task standalone component](task-standalone.component.md) | This component can be used when there is no form attached to a task. | [Source](../../lib/process-services/task-list/components/task-standalone.component.ts) | +| _Apps list component_ | _Not currently documented_ | [Source](../../lib/process-services/app-list/apps-list.component.ts) | +| _Create process attachment component_ | _Not currently documented_ | [Source](../../lib/process-services/attachment/create-process-attachment.component.ts) | +| _Create task attachment component_ | _Not currently documented_ | [Source](../../lib/process-services/attachment/create-task-attachment.component.ts) | +| _Process attachment list component_ | _Not currently documented_ | [Source](../../lib/process-services/attachment/process-attachment-list.component.ts) | +| _Task attachment list component_ | _Not currently documented_ | [Source](../../lib/process-services/attachment/task-attachment-list.component.ts) | +| _People component_ | _Not currently documented_ | [Source](../../lib/process-services/people/components/people/people.component.ts) | +| _People list component_ | _Not currently documented_ | [Source](../../lib/process-services/people/components/people-list/people-list.component.ts) | +| _People search component_ | _Not currently documented_ | [Source](../../lib/process-services/people/components/people-search/people-search.component.ts) | +| _Process comments component_ | _Not currently documented_ | [Source](../../lib/process-services/process-comments/process-comments.component.ts) | +| _Process filters component_ | _Not currently documented_ | [Source](../../lib/process-services/process-list/components/process-filters.component.ts) | +| _Process instance details component_ | _Not currently documented_ | [Source](../../lib/process-services/process-list/components/process-instance-details.component.ts) | +| _Process instance header component_ | _Not currently documented_ | [Source](../../lib/process-services/process-list/components/process-instance-header.component.ts) | +| _Process instance tasks component_ | _Not currently documented_ | [Source](../../lib/process-services/process-list/components/process-instance-tasks.component.ts) | +| _Start process component_ | _Not currently documented_ | [Source](../../lib/process-services/process-list/components/start-process.component.ts) | +| _Checklist component_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/components/checklist.component.ts) | +| _Start task component_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/components/start-task.component.ts) | +| _Task details component_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/components/task-details.component.ts) | +| _Task filters component_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/components/task-filters.component.ts) | +| _Task header component_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/components/task-header.component.ts) | +| _Task list component_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/components/task-list.component.ts) | +| _Task standalone component_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/components/task-standalone.component.ts) | ## Directives | Name | Description | Source link | | ---- | ----------- | ----------- | -| [Process audit directive](process-audit.directive.md) | Fetches the Process Audit information the PDF or JSON format. | [Source](../../lib/process-services/process-list/components/process-audit.directive.ts) | -| [Task audit directive](task-audit.directive.md) | Fetches the Task Audit information in PDF or JSON format. | [Source](../../lib/process-services/task-list/components/task-audit.directive.ts) | - -## Models - -| Name | Description | Source link | -| ---- | ----------- | ----------- | -| [Filter model](filter.model.md) | Contains classes related to filters in Process Services. | [Source](../../lib/process-services/task-list/models/filter.model.ts) | -| [Task details model](task-details.model.md) | Information about a task. | [Source](../../lib/process-services/task-list/models/task-details.model.ts) | +| _Process audit directive_ | _Not currently documented_ | [Source](../../lib/process-services/process-list/components/process-audit.directive.ts) | +| _Task audit directive_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/components/task-audit.directive.ts) | ## Services | Name | Description | Source link | | ---- | ----------- | ----------- | -| [Process filter service](process-filter.service.md) | Manage Process Filters, which are pre-configured Process Instance queries. | [Source](../../lib/process-services/process-list/services/process-filter.service.ts) | -| [Process service](process.service.md) | Manages Process Instances, Process Variables, and Process Audit Log. | [Source](../../lib/process-services/process-list/services/process.service.ts) | -| [Task filter service](task-filter.service.md) | Manage Task Filters, which are pre-configured Task Instance queries. | [Source](../../lib/process-services/task-list/services/task-filter.service.ts) | -| [Tasklist service](tasklist.service.md) | Manages Task Instances. | [Source](../../lib/process-services/task-list/services/tasklist.service.ts) | +| _Process filter service_ | _Not currently documented_ | [Source](../../lib/process-services/process-list/services/process-filter.service.ts) | +| _Process service_ | _Not currently documented_ | [Source](../../lib/process-services/process-list/services/process.service.ts) | +| _Task filter service_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/services/task-filter.service.ts) | +| _Tasklist service_ | _Not currently documented_ | [Source](../../lib/process-services/task-list/services/tasklist.service.ts) | diff --git a/docs/process-services/apps-list.component.md b/docs/process-services/apps-list.component.md index 1b56ea37df..20866816ad 100644 --- a/docs/process-services/apps-list.component.md +++ b/docs/process-services/apps-list.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Apps List Component Shows all available apps. @@ -34,15 +35,15 @@ If we intend to show a custom template if there are no apps present ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| layoutType | `string` | `AppsListComponent.LAYOUT_GRID` | (**required**) Defines the layout of the apps. There are two possible values, "GRID" and "LIST". | -| filtersAppId | `any[]` | | Provides a way to filter the apps to show. | +| -- | -- | -- | -- | +| filtersAppId | `any[]` | | Provides a way to filter the apps to show. | +| layoutType | `string` | [`AppsListComponent`](../process-services/apps-list.component.md).LAYOUT_GRID | (**required**) Defines the layout of the apps. There are two possible values, "GRID" and "LIST". | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| appClick | `EventEmitter` | Emitted when an app entry is clicked. | +| -- | -- | -- | +| appClick | [`EventEmitter`](../../lib/process-services/task-list/models/filter.model.ts) | Emitted when an app entry is clicked. | | error | `EventEmitter` | Emitted when an error occurs. | ## Details diff --git a/docs/process-services/checklist.component.md b/docs/process-services/checklist.component.md index 61e0b0da94..a91fd58517 100644 --- a/docs/process-services/checklist.component.md +++ b/docs/process-services/checklist.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Checklist Component Shows the checklist task functionality. @@ -21,15 +22,15 @@ 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. | -| readOnly | `boolean` | `false` | Toggle readonly state of the form. All form widgets will render as readonly if enabled. | -| assignee | `string` | | (required) The assignee id that the subtasks are assigned to. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| checklistTaskCreated | `EventEmitter` | Emitted when a new checklist task is created. | +| -- | -- | -- | +| checklistTaskCreated | [`EventEmitter`](../process-services/task-details.model.md) | Emitted when a new checklist task is created. | | checklistTaskDeleted | `EventEmitter` | Emitted when a checklist task is deleted. | | error | `EventEmitter` | Emitted when an error occurs. | diff --git a/docs/process-services/create-process-attachment.component.md b/docs/process-services/create-process-attachment.component.md index eede0fb236..bff3807850 100644 --- a/docs/process-services/create-process-attachment.component.md +++ b/docs/process-services/create-process-attachment.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Create Process Attachment component Displays Upload Component (Drag and Click) to upload the attachment to a specified process instance @@ -23,12 +24,12 @@ Displays Upload Component (Drag and Click) to upload the attachment to a specifi ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| processInstanceId | `string` | | (required) The ID of the process instance to display. | +| -- | -- | -- | -- | +| processInstanceId | `string` | | (required) The ID of the process instance to display. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | +| -- | -- | -- | | error | `EventEmitter` | Emitted when an error occurs while creating or uploading an attachment from the user within the component. | | success | `EventEmitter` | Emitted when an attachment is successfully created or uploaded from within the component. | diff --git a/docs/process-services/create-task-attachment.component.md b/docs/process-services/create-task-attachment.component.md index e417e007c0..ca2315e111 100644 --- a/docs/process-services/create-task-attachment.component.md +++ b/docs/process-services/create-task-attachment.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Create Task Attachment Component Displays Upload Component (Drag and Click) to upload the attachment to a specified task @@ -22,13 +23,13 @@ Displays Upload Component (Drag and Click) to upload the attachment to a specifi ### Properties -| Name | Type | Description | -| ---- | ---- | ----------- | -| taskId | string | (**required**): The numeric ID of the task to display | +| Name | Type | Default value | Description | +| -- | -- | -- | -- | +| taskId | `string` | | (required) The numeric ID of the task to display. | ### Events -| Name | Description | -| ---- | ----------- | -| error | Raised when the error occurred while creating/uploading the attachment by the user from within the component | -| success | Raised when the attachment created/uploaded successfully from within the component | +| Name | Type | Description | +| -- | -- | -- | +| error | `EventEmitter` | Emitted when an error occurs while creating or uploading an attachment from the user within the component. | +| success | `EventEmitter` | Emitted when an attachment is created or uploaded successfully from within the component. | diff --git a/docs/process-services/filter.model.md b/docs/process-services/filter.model.md index 954ca64466..b50eb56a80 100644 --- a/docs/process-services/filter.model.md +++ b/docs/process-services/filter.model.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Filter model Contains classes related to filters in Process Services. diff --git a/docs/process-services/people-list.component.md b/docs/process-services/people-list.component.md index 6131c064eb..150b78997a 100644 --- a/docs/process-services/people-list.component.md +++ b/docs/process-services/people-list.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # People list component Shows a list of users (people). @@ -41,7 +42,7 @@ export class SomeComponent implements OnInit { } ``` -In the component template use the people list component: +In the component template use the [people list component](../process-services/people-list.component.md): @@ -68,7 +69,7 @@ In the component template use the people list component: -Note that the people list component is based on the +Note that the [people list component](../process-services/people-list.component.md) is based on the [Datatable component](../core/datatable.component.md). ## Class members @@ -76,13 +77,13 @@ Note that the people list component is based on the ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| users | `any[]` | | The array of user data used to populate the people list. | -| actions | `boolean` | `false` | Toggles whether or not actions should be visible, i.e. the 'Three-Dots' menu. | +| -- | -- | -- | -- | +| actions | `boolean` | false | Toggles whether or not actions should be visible, i.e. the 'Three-Dots' menu. | +| users | [`UserProcessModel[]`](../core/user-process.model.md) | | The array of user data used to populate the people list. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| clickRow | `EventEmitter` | Emitted when the user clicks a row in the people list. | -| clickAction | `EventEmitter` | Emitted when the user clicks in the 'Three Dots' drop down menu for a row. | +| -- | -- | -- | +| clickAction | [`EventEmitter`](../../lib/process-services/task-list/models/user-event.model.ts) | Emitted when the user clicks in the 'Three Dots' drop down menu for a row. | +| clickRow | [`EventEmitter`](../core/user-process.model.md) | Emitted when the user clicks a row in the people list. | diff --git a/docs/process-services/people-search.component.md b/docs/process-services/people-search.component.md index bdae321717..58945b7318 100644 --- a/docs/process-services/people-search.component.md +++ b/docs/process-services/people-search.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # People Search component Searches users/people. @@ -17,16 +18,16 @@ Searches users/people. ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| results | `Observable` | | The parameters to show people list. | +| -- | -- | -- | -- | +| results | [`Observable`](../core/user-process.model.md) | | Parameters for displaying the list. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | +| -- | -- | -- | +| closeSearch | `EventEmitter` | Emitted when the "close" button is clicked. | | searchPeople | `EventEmitter` | Emitted when a search is performed with a new keyword. | -| success | `EventEmitter` | Emitted when a user is selected and the action button is clicked. | -| closeSearch | `EventEmitter<{}>` | Emitted when the "close" button is clicked. | +| success | [`EventEmitter`](../core/user-process.model.md) | Emitted when a user is selected and the action button is clicked. | ## Details diff --git a/docs/process-services/people.component.md b/docs/process-services/people.component.md index fa547244f0..28e79e6005 100644 --- a/docs/process-services/people.component.md +++ b/docs/process-services/people.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # People Component Displays users involved with a specified task @@ -12,6 +13,8 @@ Displays users involved with a specified task - [Basic Usage](#basic-usage) +- [Class members](#class-members) + - [Properties](#properties) - [Details](#details) @@ -37,21 +40,21 @@ Displays users involved with a specified task ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| people | `any[]` | `[]` | The array of User objects to display. | -| taskId | `string` | `''` | The numeric ID of the task. | -| readOnly | `boolean` | `false` | Should the data be read-only? | +| -- | -- | -- | -- | +| people | [`UserProcessModel[]`](../core/user-process.model.md) | \[] | The array of User objects to display. | +| readOnly | `boolean` | false | Should the data be read-only? | +| taskId | `string` | "" | The numeric ID of the task. | ## Details ### How to customize the people component behavior -The people component provide two methods to customize the behavior: +The [people component](../process-services/people.component.md) provide two methods to customize the behavior: - involveUserAndCloseSearch: The selected user is going to be added and the search section closed - involveUserWithoutCloseSearch: The selected user is going to be added without close the search section -In this way will be easy customize the people component to involve the user with the single or double click event: +In this way will be easy customize the [people component](../process-services/people.component.md) to involve the user with the single or double click event: ### Involve People single click and close search diff --git a/docs/process-services/process-attachment-list.component.md b/docs/process-services/process-attachment-list.component.md index d145c373bc..d3b090d777 100644 --- a/docs/process-services/process-attachment-list.component.md +++ b/docs/process-services/process-attachment-list.component.md @@ -19,7 +19,7 @@ Displays attached documents on a specified process instance ``` -Make sure to override the UploadService with the ProcessUploadService +Make sure to override the [UploadService](../core/upload.service.md) with the [ProcessUploadService](../../lib/process-services/task-list/services/process-upload.service.ts) ```ts import { UploadService } from '@alfresco/adf-core'; @@ -41,17 +41,17 @@ export class MyCustomProcessAttachmentComponent { ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| processInstanceId | `string` | | (**required**) The ID of the process instance to display. | -| disabled | `boolean` | `false` | Disable/Enable read-only mode for attachment list. | +| -- | -- | -- | -- | +| disabled | `boolean` | false | Disable/Enable read-only mode for attachment list. | +| processInstanceId | `string` | | (**required**) The ID of the process instance to display. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| attachmentClick | `EventEmitter<{}>` | Emitted when the attachment is double-clicked or the view option is selected from the context menu by the user from within the component. Returns a Blob representing the object that was clicked. | -| success | `EventEmitter<{}>` | Emitted when the attachment list has fetched all the attachments. Returns a list of attachments. | +| -- | -- | -- | +| attachmentClick | `EventEmitter` | Emitted when the attachment is double-clicked or the view option is selected from the context menu by the user from within the component. Returns a Blob representing the object that was clicked. | | error | `EventEmitter` | Emitted when the attachment list is not able to fetch the attachments (eg, following a network error). | +| success | `EventEmitter` | Emitted when the attachment list has fetched all the attachments. Returns a list of attachments. | ## Details @@ -91,4 +91,4 @@ If the List is empty, the custom no-content template we passed is displayed. A default template will be used if you don't supply a custom one to override it: -![default-no-content-template-sample](../docassets/images/default-no-content-template.png) \ No newline at end of file +![default-no-content-template-sample](../docassets/images/default-no-content-template.png) diff --git a/docs/process-services/process-comments.component.md b/docs/process-services/process-comments.component.md index 658bdbcf29..91282fad53 100644 --- a/docs/process-services/process-comments.component.md +++ b/docs/process-services/process-comments.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Process Instance Comments component Displays comments associated with a particular process instance and allows the user to add new comments. @@ -19,12 +20,12 @@ Displays comments associated with a particular process instance and allows the u ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| processInstanceId | `string` | | (**required**) The numeric ID of the process instance to display comments for. | -| readOnly | `boolean` | `true` | Should the comments be read-only? | +| -- | -- | -- | -- | +| processInstanceId | `string` | | (**required**) The numeric ID of the process instance to display comments for. | +| readOnly | `boolean` | true | Should the comments be read-only? | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | +| -- | -- | -- | | error | `EventEmitter` | Emitted when an error occurs. | diff --git a/docs/process-services/process-filter.service.md b/docs/process-services/process-filter.service.md index dd1aa91ec5..77b91bb32a 100644 --- a/docs/process-services/process-filter.service.md +++ b/docs/process-services/process-filter.service.md @@ -12,34 +12,41 @@ Manage Process Filters, which are pre-configured Process Instance queries. ### Methods -- `getProcessFilters(appId: number): Observable` - Gets all filters defined for a Process App. - - `appId` - ID of the target app -- `getProcessFilterById(filterId: number, appId?: number): Observable` - Retrieves the process filter by ID. - - `filterId` - ID of the filter - - `appId` - (Optional) ID of the target app -- `getProcessFilterByName(filterName: string, appId?: number): Observable` - Retrieves the process filter by name. - - `filterName` - Name of the filter - - `appId` - (Optional) ID of the target app -- `createDefaultFilters(appId: number): Observable` - Creates and returns the default filters for an app. - - `appId` - ID of the target app -- `getRunningFilterInstance(appId: number): FilterProcessRepresentationModel` - Creates and returns a filter that matches "running" process instances. - - `appId` - ID of the target app -- `addProcessFilter(filter: FilterProcessRepresentationModel): Observable` - Adds a filter. - - `filter` - The filter to add -- `callApiProcessFilters(appId?: number): any` - Calls `getUserProcessInstanceFilters` from the Alfresco JS API. - - `appId` - (Optional) ID of the target app +- **addProcessFilter**(filter: [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) = `null`): [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts)
+ Adds a filter. + - _filter:_ [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) - The filter to add + - **Returns** [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts) - The filter just added +- **callApiProcessFilters**(appId?: `number` = `null`): `Promise`
+ Calls `getUserProcessInstanceFilters` from the Alfresco JS API. + - _appId:_ `number` - (Optional) ID of the target app + - **Returns** `Promise` - List of filter details +- **createDefaultFilters**(appId: `number` = `null`): [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts)
+ Creates and returns the default filters for an app. + - _appId:_ `number` - ID of the target app + - **Returns** [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts) - Default filters just created +- **getProcessFilterById**(filterId: `number` = `null`, appId?: `number` = `null`): [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts)
+ Retrieves the process filter by ID. + - _filterId:_ `number` - ID of the filter + - _appId:_ `number` - (Optional) ID of the target app + - **Returns** [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts) - Details of the filter +- **getProcessFilterByName**(filterName: `string` = `null`, appId?: `number` = `null`): [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts)
+ Retrieves the process filter by name. + - _filterName:_ `string` - Name of the filter + - _appId:_ `number` - (Optional) ID of the target app + - **Returns** [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts) - Details of the filter +- **getProcessFilters**(appId: `number` = `null`): [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts)
+ Gets all filters defined for a Process App. + - _appId:_ `number` - ID of the target app + - **Returns** [`Observable`](../../lib/process-services/process-list/models/filter-process.model.ts) - Array of filter details +- **getRunningFilterInstance**(appId: `number` = `null`): [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)
+ Creates and returns a filter that matches "running" process instances. + - _appId:_ `number` - ID of the target app + - **Returns** [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) - Filter just created ## Details The methods of this service generally return an instance of -`FilterProcessRepresentationModel` or an array of instances. For example, you +[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) or an array of instances. For example, you could use `getProcessFilters` as follows: ```ts @@ -52,7 +59,7 @@ this.processFilterService.getProcessFilters(processAppId) }); ``` -The response is an array of `FilterProcessRepresentationModel` objects: +The response is an array of [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) objects: filters: 0: {id: 15, appId: 2, name: "Running", recent: true, icon: "glyphicon-random", …} @@ -65,8 +72,7 @@ The response is an array of `FilterProcessRepresentationModel` objects: You can use the returned filters to get matching process instances for the process app with ID 2, such as 'Running', 'Completed', 'All', etc. - ## See also -- [Process Filters component](process-filters.component.md) -- [Task Filter service](task-filter.service.md) +- [Process Filters component](process-filters.component.md) +- [Task Filter service](task-filter.service.md) diff --git a/docs/process-services/process-filters.component.md b/docs/process-services/process-filters.component.md index 6ae73cafca..4f26f14182 100644 --- a/docs/process-services/process-filters.component.md +++ b/docs/process-services/process-filters.component.md @@ -2,10 +2,28 @@ Added: v2.0.0 Status: Active --- + # Process Filters Component Collection of criteria used to filter process instances, which may be customized by users. +## Contents + +- [Basic Usage](#basic-usage) + +- [Class members](#class-members) + + - [Properties](#properties) + - [Events](#events) + +- [Details](#details) + + - [How filter the activiti process filters](#how-filter-the-activiti-process-filters) + - [FilterParamsModel](#filterparamsmodel) + - [How to create an accordion menu with the processes filter](#how-to-create-an-accordion-menu-with-the-processes-filter) + +- [See also](#see-also) + ## Basic Usage ```html @@ -19,19 +37,19 @@ Collection of criteria used to filter process instances, which may be customized ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| filterParam | `FilterProcessRepresentationModel` | | The parameters to filter the task filter. If there is no match then the default one (ie, the first filter in the list) is selected. | -| appId | `number` | | 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. | -| showIcon | `boolean` | `true` | Toggle to show or hide the filter's icon. | +| -- | -- | -- | -- | +| appId | `number` | | 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. | +| filterParam | [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) | | The parameters to filter the task filter. If there is no match then the default one (ie, the first filter in the list) is selected. | +| showIcon | `boolean` | true | Toggle to show or hide the filter's icon. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | +| -- | -- | -- | +| error | `EventEmitter` | Emitted when an error occurs. | | filterClick | `EventEmitter` | Emitted when the user selects a filter from the list. | | success | `EventEmitter` | Emitted when the list of filters has been successfully loaded from the server. | -| error | `EventEmitter` | Emitted when an error occurs. | ## Details @@ -51,7 +69,7 @@ If both `appId` and `appName` are specified then `appName` will take precedence ``` -You can use inside the filterParam one of the properties defined by [FilterParamsModel](#filterparamsmodel) (see below). +You can use inside the filterParam one of the properties defined by [`FilterParamsModel`](../../lib/process-services/task-list/models/filter.model.ts) (see below). ### FilterParamsModel diff --git a/docs/process-services/process-instance-details.component.md b/docs/process-services/process-instance-details.component.md index 743412c1df..f67bf60a65 100644 --- a/docs/process-services/process-instance-details.component.md +++ b/docs/process-services/process-instance-details.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Process Details component Displays detailed information on a specified process instance @@ -19,16 +20,16 @@ Displays detailed information on a specified process instance ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| processInstanceId | `string` | | (required) The numeric ID of the process instance to display. | -| showTitle | `boolean` | `true` | Toggles whether to show or hide the title. | -| showRefreshButton | `boolean` | `true` | Toggles whether to show or hide the refresh button. | +| -- | -- | -- | -- | +| processInstanceId | `string` | | (required) The numeric ID of the process instance to display. | +| showRefreshButton | `boolean` | true | Toggles whether to show or hide the refresh button. | +| showTitle | `boolean` | true | Toggles whether to show or hide the title. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| processCancelled | `EventEmitter` | Emitted when the current process is cancelled by the user from within the component. | +| -- | -- | -- | | error | `EventEmitter` | Emitted when an error occurs. | -| taskClick | `EventEmitter` | Emitted when a task is clicked. | +| processCancelled | `EventEmitter` | Emitted when the current process is cancelled by the user from within the component. | | showProcessDiagram | `EventEmitter` | Emitted when the "show diagram" button is clicked. | +| taskClick | [`EventEmitter`](../../lib/process-services/task-list/models/task-details.event.ts) | Emitted when a task is clicked. | diff --git a/docs/process-services/process-instance-header.component.md b/docs/process-services/process-instance-header.component.md index 3e752d3507..ce93baae5b 100644 --- a/docs/process-services/process-instance-header.component.md +++ b/docs/process-services/process-instance-header.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Process Instance Details Header component Sub-component of the process details component, which renders some general information about the selected process. @@ -21,23 +22,23 @@ Sub-component of the process details component, which renders some general infor ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| processInstance | `ProcessInstance` | | (**required**) Full details of the process instance to display information about. | +| -- | -- | -- | -- | +| processInstance | [`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts) | | (**required**) Full details of the process instance to display information about. | ## Customise the properties showed + By default all the properties are showed : -***status***, ***ended***, ***category***, ***businessKey***, ***assignee***, ***created***,***id***, ***description***. +**_status_**, **_ended_**, **_category_**, **_businessKey_**, **_assignee_**, **_created_**,**_id_**, **_description_**. It is possible to customise the showed properties via "app.config.json". This is how the configuration looks like: ```json - "adf-process-instance-header": { "presets": { "properties" : [ "status", "ended", "created", "id"] } } - ``` + In this way only the listed properties will be showed. diff --git a/docs/process-services/process-instance-tasks.component.md b/docs/process-services/process-instance-tasks.component.md index b90cf627dc..81cddc0b2e 100644 --- a/docs/process-services/process-instance-tasks.component.md +++ b/docs/process-services/process-instance-tasks.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Process Instance Tasks component Lists both the active and completed tasks associated with a particular process instance @@ -20,13 +21,13 @@ Lists both the active and completed tasks associated with a particular process i ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| processInstanceDetails | `ProcessInstance` | | (**required**) The ID of the process instance to display tasks for. | -| showRefreshButton | `boolean` | `true` | Toggles whether to show a refresh button next to the list of tasks to allow it to be updated from the server. | +| -- | -- | -- | -- | +| processInstanceDetails | [`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts) | | (**required**) The ID of the process instance to display tasks for. | +| showRefreshButton | `boolean` | true | Toggles whether to show a refresh button next to the list of tasks to allow it to be updated from the server. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | +| -- | -- | -- | | error | `EventEmitter` | Emitted when an error occurs. | -| taskClick | `EventEmitter` | Emitted when a task is clicked. | +| taskClick | [`EventEmitter`](../../lib/process-services/task-list/models/task-details.event.ts) | Emitted when a task is clicked. | diff --git a/docs/process-services/process-list.component.md b/docs/process-services/process-list.component.md index b75042a35b..49c5ee528a 100644 --- a/docs/process-services/process-list.component.md +++ b/docs/process-services/process-list.component.md @@ -1,7 +1,7 @@ --- Added: v2.0.0 Status: Active -Last reviewed: 2018-04-16 +Last reviewed: 2018-05-24 --- # Process Instance List @@ -23,28 +23,28 @@ Renders a list containing all the process instances matched by the parameters sp ### Properties -| Name | Type | Default | Description | -| ---- | ---- | ------- | ----------- | -| appId | number | | The id of the app. | -| processDefinitionKey | string | | The processDefinitionKey of the process. | -| presetColumn | string | | Name of a custom schema to fetch from `app.config.json`. | -| state | string | | Define state of the processes. Possible values are `running`, `completed` and `all` | -| sort | string | | Define sort of the processes. Possible values are `created-desc`, `created-asc`, `ended-desc`, `ended-asc` | -| name | string | | The name of the list. | -| page | number | 0 | The page of the processes to fetch. | -| size | number | 25 | The number of processes to fetch. | -| data | DataTableAdapter | | Data source to define the datatable. | -| multiselect | boolean | false | Toggles multiple row selection, renders checkboxes at the beginning of each 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. | -| selectFirstRow | boolean | true | Toggles default selection of the first row. | +| Name | Type | Default value | Description | +| -- | -- | -- | -- | +| appId | `number` | | The id of the app. | +| data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | | Data source to define the datatable. | +| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row | +| name | `string` | | The name of the list. | +| page | `number` | 0 | The page number of the processes to fetch. | +| presetColumn | `string` | | Name of a custom schema to fetch from `app.config.json`. | +| processDefinitionKey | `string` | | The processDefinitionKey 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. | +| size | `number` | [`PaginationComponent`](../core/pagination.component.md).DEFAULT_PAGINATION.maxItems | The number of processes to fetch in each page. | +| sort | `string` | | Defines the sort ordering of the list. Possible values are `created-desc`, `created-asc`, `ended-desc`, `ended-asc`. | +| state | `string` | | Defines the state of the processes. Possible values are `running`, `completed` and `all` | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| rowClick | `EventEmitter` | Emitted when a row in the process list is clicked | -| success | `EventEmitter` | Emitted when the list of process instances has been loaded successfully from the server | -| error | `EventEmitter` | Emitted when an error is encountered loading the list of process instances from the server | +| -- | -- | -- | +| error | `EventEmitter` | Emitted when an error occurs while loading the list of process instances from the server. | +| rowClick | `EventEmitter` | Emitted when a row in the process list is clicked. | +| success | [`EventEmitter`](../../lib/process-services/process-list/models/process-list.model.ts) | Emitted when the list of process instances has been loaded successfully from the server. | ## Details diff --git a/docs/process-services/process.service.md b/docs/process-services/process.service.md index 919dc5f99b..33e1b7f1e5 100644 --- a/docs/process-services/process.service.md +++ b/docs/process-services/process.service.md @@ -12,50 +12,58 @@ Manages Process Instances, Process Variables, and Process Audit Log. ### Methods -- `getProcessInstances(requestNode: ProcessFilterParamRepresentationModel, processDefinitionKey?: string): Observable` - Get process instances for a filter and optionally a process definition. - - `requestNode` - Filter for instances - - `processDefinitionKey` - (Optional) Limits returned instances to a process definition -- `fetchProcessAuditPdfById(processId: string): Observable` - Fetches the Process Audit information as a pdf - - `processId` - ID of the target process -- `fetchProcessAuditJsonById(processId: string): Observable` - Fetches the Process Audit information in a json format. - - `processId` - ID of the target process -- `getProcess(processInstanceId: string): Observable` - Gets Process Instance metadata. - - `processInstanceId` - ID of the target process -- `getProcessTasks(processInstanceId: string, state?: string): Observable` - Gets task instances for a process instance. - - `processInstanceId` - ID of the process instance - - `state` - (Optional) Task state filter (can be "active" or "completed") -- `getProcessDefinitions(appId?: number): Observable` - Gets process definitions associated with an app. - - `appId` - (Optional) ID of a target app -- `getProcessDefinitionVersions(appId?: number): Observable` - Gets the versions of process definitions associated with an app. - - `appId` - (Optional) ID of a target app -- `startProcess(processDefinitionId: string, name: string, outcome?: string, startFormValues?: FormValues, variables?: ProcessInstanceVariable[]): Observable` - Starts a process based on a process definition, name, form values or variables. - - `processDefinitionId` - Process definition ID - - `name` - Process name - - `outcome` - (Optional) Process outcome - - `startFormValues` - (Optional) Values for the start form - - `variables` - (Optional) Array of process instance variables -- `cancelProcess(processInstanceId: string): Observable` - Cancels a process instance. - - `processInstanceId` - ID of process to cancel -- `getProcessInstanceVariables(processInstanceId: string): Observable` - Gets the variables for a process instance. - - `processInstanceId` - ID of the target process -- `createOrUpdateProcessInstanceVariables(processInstanceId: string, variables: ProcessInstanceVariable[]): Observable` - Creates or updates variables for a process instance. - - `processInstanceId` - ID of the target process - - `variables` - Variables to update -- `deleteProcessInstanceVariable(processInstanceId: string, variableName: string): Observable` - Deletes a variable for a process instance. - - `processInstanceId` - ID of the target process - - `variableName` - Name of the variable to delete +- **cancelProcess**(processInstanceId: `string` = `null`): `Observable`
+ Cancels a process instance. + - _processInstanceId:_ `string` - ID of process to cancel + - **Returns** `Observable` - Null response notifying when the operation is complete +- **createOrUpdateProcessInstanceVariables**(processInstanceId: `string` = `null`, variables: [`ProcessInstanceVariable[]`](../../lib/process-services/process-list/models/process-instance-variable.model.ts) = `null`): [`Observable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts)
+ Creates or updates variables for a process instance. + - _processInstanceId:_ `string` - ID of the target process + - _variables:_ [`ProcessInstanceVariable[]`](../../lib/process-services/process-list/models/process-instance-variable.model.ts) - Variables to update + - **Returns** [`Observable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts) - Array of instance variable info +- **deleteProcessInstanceVariable**(processInstanceId: `string` = `null`, variableName: `string` = `null`): `Observable`
+ Deletes a variable for a process instance. + - _processInstanceId:_ `string` - ID of the target process + - _variableName:_ `string` - Name of the variable to delete + - **Returns** `Observable` - Null response notifying when the operation is complete +- **fetchProcessAuditJsonById**(processId: `string` = `null`): `Observable`
+ Fetches the Process Audit information in a JSON format. + - _processId:_ `string` - ID of the target process + - **Returns** `Observable` - JSON data +- **fetchProcessAuditPdfById**(processId: `string` = `null`): `Observable`
+ Fetches the Process Audit information as a PDF. + - _processId:_ `string` - ID of the target process + - **Returns** `Observable` - Binary PDF data +- **getProcess**(processInstanceId: `string` = `null`): [`Observable`](../../lib/process-services/process-list/models/process-instance.model.ts)
+ Gets Process Instance metadata. + - _processInstanceId:_ `string` - ID of the target process + - **Returns** [`Observable`](../../lib/process-services/process-list/models/process-instance.model.ts) - Metadata for the instance +- **getProcessDefinitions**(appId?: `number` = `null`): [`Observable`](../../lib/process-services/process-list/models/process-definition.model.ts)
+ Gets process definitions associated with an app. + - _appId:_ `number` - (Optional) ID of a target app + - **Returns** [`Observable`](../../lib/process-services/process-list/models/process-definition.model.ts) - Array of process definitions +- **getProcessInstanceVariables**(processInstanceId: `string` = `null`): [`Observable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts)
+ Gets the variables for a process instance. + - _processInstanceId:_ `string` - ID of the target process + - **Returns** [`Observable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts) - Array of instance variable info +- **getProcessInstances**(requestNode: [`ProcessFilterParamRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) = `null`, processDefinitionKey?: `string` = `null`): [`Observable`](../../lib/process-services/process-list/models/process-list.model.ts)
+ Gets process instances for a filter and optionally a process definition. + - _requestNode:_ [`ProcessFilterParamRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) - Filter for instances + - _processDefinitionKey:_ `string` - (Optional) Limits returned instances to a process definition + - **Returns** [`Observable`](../../lib/process-services/process-list/models/process-list.model.ts) - List of process instances +- **getProcessTasks**(processInstanceId: `string` = `null`, state?: `string` = `null`): [`Observable`](../process-services/task-details.model.md)
+ 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`](../process-services/task-details.model.md) - Array of task instance details +- **startProcess**(processDefinitionId: `string` = `null`, name: `string` = `null`, outcome?: `string` = `null`, startFormValues?: [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) = `null`, variables?: [`ProcessInstanceVariable[]`](../../lib/process-services/process-list/models/process-instance-variable.model.ts) = `null`): [`Observable`](../../lib/process-services/process-list/models/process-instance.model.ts)
+ Starts a process based on a process definition, name, form values or variables. + - _processDefinitionId:_ `string` - Process definition ID + - _name:_ `string` - Process name + - _outcome:_ `string` - (Optional) Process outcome + - _startFormValues:_ [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) - (Optional) Values for the start form + - _variables:_ [`ProcessInstanceVariable[]`](../../lib/process-services/process-list/models/process-instance-variable.model.ts) - (Optional) Array of process instance variables + - **Returns** [`Observable`](../../lib/process-services/process-list/models/process-instance.model.ts) - Details of the process instance just started ## Details @@ -99,7 +107,7 @@ this.processService.startProcess(processDefinitionId, name, outcome, startFormVa }); ``` -A `ProcessInstance` object is returned for a successfully started process. This implements the +A [`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts) object is returned for a successfully started process. This implements the [ProcessInstanceRepresentation interface](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/ProcessInstanceRepresentation.md). You can start the process with process variables instead of form field values using diff --git a/docs/process-services/select-apps-dialog.component.md b/docs/process-services/select-apps-dialog.component.md index 248d7499a1..0c28697268 100644 --- a/docs/process-services/select-apps-dialog.component.md +++ b/docs/process-services/select-apps-dialog.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Select app Component Show all available apps and return the selected app. diff --git a/docs/process-services/start-process.component.md b/docs/process-services/start-process.component.md index 3a7f920c6b..913d60a3d6 100644 --- a/docs/process-services/start-process.component.md +++ b/docs/process-services/start-process.component.md @@ -10,6 +10,24 @@ Starts a process. ![adf-start-process ](../docassets/images/startProcess.png) +## Contents + +- [Basic Usage](#basic-usage) + +- [Class members](#class-members) + + - [Properties](#properties) + - [Events](#events) + +- [Details](#details) + + - [Starting a process with a default name and pre-selected process definition name](#starting-a-process-with-a-default-name-and-pre-selected-process-definition-name) + - [Starting a process not included in an app](#starting-a-process-not-included-in-an-app) + - [Custom data example](#custom-data-example) + - [Attaching a File to the start form of the process](#attaching-a-file-to-the-start-form-of-the-process) + +- [See also](#see-also) + ## Basic Usage ```html @@ -27,17 +45,17 @@ Starts a process. | appId | `number` | (optional): Limit the list of processes which can be started to those contained in the specified app | | name | `string` | (optional) name to assign to the current process | | processDefinitionName | `string` | (optional) definition name of the process to start | -| variables | `ProcessInstanceVariable[]` | Variables in input to the process [RestVariable](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-activiti-rest-api/docs/RestVariable.md) | -| values | `FormValues` | Parameter to pass form field values in the start form if is associated | +| variables | [`ProcessInstanceVariable[]`](../../lib/process-services/process-list/models/process-instance-variable.model.ts) | Variables in input to the process [RestVariable](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-activiti-rest-api/docs/RestVariable.md) | +| values | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | Parameter to pass form field values in the start form if is associated | | showSelectProcessDropdown | `boolean` | hide or show the process selection drodown, true by default | ### Events | Name | Type | Description | | ---- | ---- | ----------- | -| start | `EventEmitter` | Emitted when the process starts | -| cancel | `EventEmitter` | Emitted when the process is canceled | -| error | `EventEmitter` | Emitted when the start process operation fails | +| start | [`EventEmitter`](../../lib/process-services/process-list/models/process-instance.model.ts) | Emitted when the process starts | +| cancel | [`EventEmitter`](../../lib/process-services/process-list/models/process-instance.model.ts) | Emitted when the process is canceled | +| error | [`EventEmitter`](../../lib/process-services/process-list/models/process-instance.model.ts) | Emitted when the start process operation fails | ## Details @@ -143,7 +161,6 @@ const values: FormValues = { }); ``` - Note that in the object above, the key `file` is the name of the attach file field in the start form of the process. The value of the `file` property must be a [MinimalNodeEntryEntity](../content-services/document-library.model.md): diff --git a/docs/process-services/start-task.component.md b/docs/process-services/start-task.component.md index a4a019840e..859dce1dbe 100644 --- a/docs/process-services/start-task.component.md +++ b/docs/process-services/start-task.component.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Start Task Component Creates/Starts new task for the specified app @@ -21,13 +22,13 @@ Creates/Starts new task for the specified app ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| appId | `number` | | (required) The id of the app. | +| -- | -- | -- | -- | +| appId | `number` | | (required) The id of the app. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| success | `EventEmitter` | Emitted when the task is successfully created. | +| -- | -- | -- | | cancel | `EventEmitter` | Emitted when the cancel button is clicked by the user. | | error | `EventEmitter` | Emitted when an error occurs. | +| success | `EventEmitter` | Emitted when the task is successfully created. | diff --git a/docs/process-services/task-attachment-list.component.md b/docs/process-services/task-attachment-list.component.md index 34a9b26814..d6d6a92ec0 100644 --- a/docs/process-services/task-attachment-list.component.md +++ b/docs/process-services/task-attachment-list.component.md @@ -3,6 +3,7 @@ Added: v2.0.0 Status: Active Last reviewed: 2018-03-13 --- + # Task Attachment List Component Displays attached documents on a specified task. @@ -23,17 +24,17 @@ Displays attached documents on a specified task. ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| taskId | `string` | | (**required**) The ID of the task to display. | -| disabled | `boolean` | `false` | Disable/Enable read only mode for attachement list. | +| -- | -- | -- | -- | +| disabled | `boolean` | false | Disable/Enable read only mode for attachement list. | +| taskId | `string` | | (**required**) The ID of the task to display. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| attachmentClick | `EventEmitter<{}>` | Emitted when the attachment is double-clicked or a view option is selected from the context menu by the user from within the component. Returns a Blob representing the clicked object. | -| success | `EventEmitter<{}>` | Emitted when the attachment list has fetched all the attachments. Returns a list of attachments. | +| -- | -- | -- | +| attachmentClick | `EventEmitter` | Emitted when the attachment is double-clicked or a view option is selected from the context menu by the user from within the component. Returns a Blob representing the clicked object. | | error | `EventEmitter` | Emitted when an error occurs while fetching the attachments. | +| success | `EventEmitter` | Emitted when the attachment list has fetched all the attachments. Returns a list of attachments. | ## Details @@ -74,7 +75,7 @@ import { UploadService } from '@alfresco/adf-core'; import { TaskUploadService } from '@alfresco/adf-process-services'; ``` -Make sure you override the `UploadService` with the `TaskUploadService` +Make sure you override the [`UploadService`](../core/upload.service.md) with the [`TaskUploadService`](../../lib/process-services/task-list/services/task-upload.service.ts) ```ts @Component({ @@ -92,4 +93,4 @@ export class MyCustomTaskAttachmentComponent { If the List is empty, the custom no-content template we passed is displayed. -![custom-no-content-drag-drop-template-sample](../docassets/images/custom-no-content-drag-drop-template.png) \ No newline at end of file +![custom-no-content-drag-drop-template-sample](../docassets/images/custom-no-content-drag-drop-template.png) diff --git a/docs/process-services/task-details.component.md b/docs/process-services/task-details.component.md index 63ea93c3e0..4e2ae1f9c2 100644 --- a/docs/process-services/task-details.component.md +++ b/docs/process-services/task-details.component.md @@ -21,43 +21,43 @@ Shows the details of the task ID passed in as input. ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| debugMode | `boolean` | `false` | Toggles debug mode. | -| taskId | `string` | | (**required**) The id of the task whose details we are asking for. | -| showNextTask | `boolean` | `true` | Automatically renders the next task when the current one is completed. | -| 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. | -| showComments | `boolean` | `true` | Toggles `Comments` feature for the Header component. | -| showChecklist | `boolean` | `true` | Toggles `Checklist` feature for the Header component. | -| showFormTitle | `boolean` | `true` | Toggles rendering of the form title. | -| showFormCompleteButton | `boolean` | `true` | Toggles rendering of the `Complete` outcome button. | -| showFormSaveButton | `boolean` | `true` | Toggles rendering of the `Save` outcome button. | -| readOnlyForm | `boolean` | `false` | Toggles read-only state of the form. All form widgets render as read-only if enabled. | -| showFormRefreshButton | `boolean` | `true` | Toggles rendering of the `Refresh` button. | -| fieldValidators | `any[]` | `[]` | Field validators for use with the form. | +| -- | -- | -- | -- | +| debugMode | `boolean` | false | Toggles debug mode. | +| fieldValidators | [`FormFieldValidator[]`](../../lib/core/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` | true | 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 | -| ---- | ---- | ----------- | -| formSaved | `EventEmitter` | Emitted when the form is submitted with the `Save` or custom outcomes. | -| formCompleted | `EventEmitter` | Emitted when the form is submitted with the `Complete` outcome. | -| formContentClicked | `EventEmitter` | Emitted when the form field content is clicked. | -| formLoaded | `EventEmitter` | Emitted when the form is loaded or reloaded. | -| taskCreated | `EventEmitter` | Emitted when a checklist task is created. | -| taskDeleted | `EventEmitter` | Emitted when a checklist task is deleted. | -| error | `EventEmitter` | Emitted when an error occurs. | -| executeOutcome | `EventEmitter` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. | -| assignTask | `EventEmitter` | Emitted when a task is assigned. | -| claimedTask | `EventEmitter` | Emitted when a task is claimed. | -| unClaimedTask | `EventEmitter` | Emitted when a task is unclaimed. | +| -- | -- | -- | +| assignTask | `EventEmitter` | Emitted when a task is assigned. | +| claimedTask | `EventEmitter` | Emitted when a task is claimed. | +| error | `EventEmitter` | Emitted when an error occurs. | +| executeOutcome | [`EventEmitter`](../../lib/core/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`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Complete` outcome. | +| formContentClicked | [`EventEmitter`](../../lib/core/form/components/widgets/core/content-link.model.ts) | Emitted when the form field content is clicked. | +| formLoaded | [`EventEmitter`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is loaded or reloaded. | +| formSaved | [`EventEmitter`](../../lib/core/form/components/widgets/core/form.model.ts) | Emitted when the form is submitted with the `Save` or custom outcomes. | +| taskCreated | [`EventEmitter`](../process-services/task-details.model.md) | Emitted when a checklist task is created. | +| taskDeleted | `EventEmitter` | Emitted when a checklist task is deleted. | +| unClaimedTask | `EventEmitter` | Emitted when a task is unclaimed. | ## Details ### Custom 'empty Task Details' template -By default the Task Details component shows a simple "No Tasks" message when there are +By default the [Task Details component](../process-services/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 example: diff --git a/docs/process-services/task-details.model.md b/docs/process-services/task-details.model.md index 7ec31f6564..5a174aac38 100644 --- a/docs/process-services/task-details.model.md +++ b/docs/process-services/task-details.model.md @@ -2,6 +2,7 @@ Added: v2.0.0 Status: Active --- + # Task Details model Information about a task. diff --git a/docs/process-services/task-filter.service.md b/docs/process-services/task-filter.service.md index 5369ea0d4b..526be8b118 100644 --- a/docs/process-services/task-filter.service.md +++ b/docs/process-services/task-filter.service.md @@ -11,42 +11,52 @@ Manage Task Filters, which are pre-configured Task Instance queries. ### Methods -- `createDefaultFilters(appId: number): Observable` - Creates and returns the default filters for a process app. - - `appId` - ID of the target app -- `getTaskListFilters(appId?: number): Observable` - Gets all task filters for a process app. - - `appId` - (Optional) Optional ID for a specific app -- `getTaskFilterById(filterId: number, appId?: number): Observable` - Gets a task filter by ID. - - `filterId` - ID of the filter - - `appId` - (Optional) ID of the app for the filter -- `getTaskFilterByName(taskName: string, appId?: number): Observable` - Gets a task filter by name. - - `taskName` - Name of the filter - - `appId` - (Optional) ID of the app for the filter -- `addFilter(filter: FilterRepresentationModel): Observable` - Adds a new task filter - - `filter` - The new filter to add -- `callApiTaskFilters(appId?: number): any` - Calls `getUserTaskFilters` from the Alfresco JS API. - - `appId` - (Optional) ID of the target app -- `getInvolvedTasksFilterInstance(appId: number): FilterRepresentationModel` - Creates and returns a filter for "Involved" task instances. - - `appId` - ID of the target app -- `getMyTasksFilterInstance(appId: number): FilterRepresentationModel` - Creates and returns a filter for "My Tasks" task instances. - - `appId` - ID of the target app -- `getQueuedTasksFilterInstance(appId: number): FilterRepresentationModel` - Creates and returns a filter for "Queued Tasks" task instances. - - `appId` - ID of the target app -- `getCompletedTasksFilterInstance(appId: number): FilterRepresentationModel` - Creates and returns a filter for "Completed" task instances. - - `appId` - ID of the target app +- **addFilter**(filter: [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) = `null`): [`Observable`](../../lib/process-services/task-list/models/filter.model.ts)
+ Adds a new task filter + - _filter:_ [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The new filter to add + - **Returns** [`Observable`](../../lib/process-services/task-list/models/filter.model.ts) - Details of task filter just added +- **callApiTaskFilters**(appId?: `number` = `null`): `Promise`
+ Calls `getUserTaskFilters` from the Alfresco JS API. + - _appId:_ `number` - (Optional) ID of the target app + - **Returns** `Promise` - List of task filters +- **createDefaultFilters**(appId: `number` = `null`): [`Observable`](../../lib/process-services/task-list/models/filter.model.ts)
+ Creates and returns the default filters for a process app. + - _appId:_ `number` - ID of the target app + - **Returns** [`Observable`](../../lib/process-services/task-list/models/filter.model.ts) - Array of default filters just created +- **getCompletedTasksFilterInstance**(appId: `number` = `null`): [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)
+ Creates and returns a filter for "Completed" task instances. + - _appId:_ `number` - ID of the target app + - **Returns** [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter +- **getInvolvedTasksFilterInstance**(appId: `number` = `null`): [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)
+ Creates and returns a filter for "Involved" task instances. + - _appId:_ `number` - ID of the target app + - **Returns** [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter +- **getMyTasksFilterInstance**(appId: `number` = `null`): [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)
+ Creates and returns a filter for "My Tasks" task instances. + - _appId:_ `number` - ID of the target app + - **Returns** [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter +- **getQueuedTasksFilterInstance**(appId: `number` = `null`): [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)
+ Creates and returns a filter for "Queued Tasks" task instances. + - _appId:_ `number` - ID of the target app + - **Returns** [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter +- **getTaskFilterById**(filterId: `number` = `null`, appId?: `number` = `null`): [`Observable`](../../lib/process-services/task-list/models/filter.model.ts)
+ Gets a task filter by ID. + - _filterId:_ `number` - ID of the filter + - _appId:_ `number` - (Optional) ID of the app for the filter + - **Returns** [`Observable`](../../lib/process-services/task-list/models/filter.model.ts) - Details of task filter +- **getTaskFilterByName**(taskName: `string` = `null`, appId?: `number` = `null`): [`Observable`](../../lib/process-services/task-list/models/filter.model.ts)
+ Gets a task filter by name. + - _taskName:_ `string` - Name of the filter + - _appId:_ `number` - (Optional) ID of the app for the filter + - **Returns** [`Observable`](../../lib/process-services/task-list/models/filter.model.ts) - Details of task filter +- **getTaskListFilters**(appId?: `number` = `null`): [`Observable`](../../lib/process-services/task-list/models/filter.model.ts)
+ Gets all task filters for a process app. + - _appId:_ `number` - (Optional) Optional ID for a specific app + - **Returns** [`Observable`](../../lib/process-services/task-list/models/filter.model.ts) - Array of task filter details ## Details -The methods of this service generally return an instance of `FilterRepresentationModel` or +The methods of this service generally return an instance of [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) or an array of instances. For example, you could use `getTaskListFilters` as follows: ```ts @@ -58,7 +68,7 @@ this.taskFilterService.getTaskListFilters(processAppId).subscribe( (filters: Fil }); ``` -The response is an array of `FilterRepresentationModel` objects: +The response is an array of [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) objects: filters: 0: {id: 10, appId: 2, name: "Involved Tasks", recent: true, icon: "glyphicon-align-left", …} diff --git a/docs/process-services/task-filters.component.md b/docs/process-services/task-filters.component.md index d4c7d6b78f..33abe69996 100644 --- a/docs/process-services/task-filters.component.md +++ b/docs/process-services/task-filters.component.md @@ -2,10 +2,28 @@ Added: v2.0.0 Status: Active --- + # Task Filters component Shows all available filters. +## Contents + +- [Basic Usage](#basic-usage) + +- [Class members](#class-members) + + - [Properties](#properties) + - [Events](#events) + +- [Details](#details) + + - [How filter the activiti task filters](#how-filter-the-activiti-task-filters) + - [FilterParamsModel](#filterparamsmodel) + - [How to create an accordion menu with the task filter](#how-to-create-an-accordion-menu-with-the-task-filter) + +- [See also](#see-also) + ## Basic Usage ```html @@ -17,19 +35,19 @@ Shows all available filters. ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| filterParam | `FilterParamsModel` | | Parameters to use for the task filter. If there is no match then the default filter (the first one the list) is selected. | -| appId | `number` | | 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. | -| hasIcon | `boolean` | `true` | Toggles display of the filter's icon. | +| -- | -- | -- | -- | +| appId | `number` | | 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. | +| filterParam | [`FilterParamsModel`](../../lib/process-services/task-list/models/filter.model.ts) | | Parameters to use for the task filter. If there is no match then the default filter (the first one the list) is selected. | +| hasIcon | `boolean` | true | Toggles display of the filter's icon. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| filterClick | `EventEmitter` | Emitted when a filter in the list is clicked. | -| success | `EventEmitter` | Emitted when the list is loaded. | +| -- | -- | -- | | error | `EventEmitter` | Emitted when an error occurs during loading. | +| filterClick | [`EventEmitter`](../../lib/process-services/task-list/models/filter.model.ts) | Emitted when a filter in the list is clicked. | +| success | `EventEmitter` | Emitted when the list is loaded. | ## Details @@ -41,7 +59,7 @@ Shows all available filters. ``` -You can use inside the filterParam one of the properties from [FilterParamsModel](#filterparamsmodel) (see below). +You can use inside the filterParam one of the properties from [`FilterParamsModel`](../../lib/process-services/task-list/models/filter.model.ts) (see below). ### FilterParamsModel diff --git a/docs/process-services/task-header.component.md b/docs/process-services/task-header.component.md index 678f067b55..fd6f56cfa5 100644 --- a/docs/process-services/task-header.component.md +++ b/docs/process-services/task-header.component.md @@ -23,14 +23,14 @@ Shows all the information related to a task. ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| formName | `string` | `null` | The name of the form. | -| taskDetails | `TaskDetailsModel` | | (required) Details related to the task. | +| -- | -- | -- | -- | +| formName | `string` | null | The name of the form. | +| taskDetails | [`TaskDetailsModel`](../process-services/task-details.model.md) | | (required) Details related to the task. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | +| -- | -- | -- | | claim | `EventEmitter` | Emitted when the task is claimed. | | unclaim | `EventEmitter` | Emitted when the task is unclaimed (ie, requeued). | @@ -41,19 +41,18 @@ 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"] } }, - ``` + With this configuration, only the four listed properties will be shown. ## See also diff --git a/docs/process-services/task-list.component.md b/docs/process-services/task-list.component.md index 1e67993e82..7d8834370c 100644 --- a/docs/process-services/task-list.component.md +++ b/docs/process-services/task-list.component.md @@ -8,6 +8,24 @@ Last reviewed: 2018-04-16 Renders a list containing all the tasks matched by the parameters specified. +## Contents + +- [Basic Usage](#basic-usage) + +- [Class members](#class-members) + + - [Properties](#properties) + - [Events](#events) + +- [Details](#details) + + - [Setting the column schema](#setting-the-column-schema) + - [Pagination strategy](#pagination-strategy) + - [DataTableAdapter example](#datatableadapter-example) + - [DataColumn Features](#datacolumn-features) + +- [See also](#see-also) + ## Basic Usage ```html @@ -23,30 +41,30 @@ Renders a list containing all the tasks matched by the parameters specified. ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| appId | `number` | | The id of the app. | -| processInstanceId | `string` | | The Instance Id of the process. | -| processDefinitionKey | `string` | | The Definition Key of the process. **Deprecated:** in 2.4.0 | -| state | `string` | | Current state of the process. Possible values are: `completed`, `active`. | +| -- | -- | -- | -- | +| 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). | -| sort | `string` | | Define the sort order of the processes. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` | -| name | `string` | | Name of the tasklist. | +| data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. | | 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. | -| data | `any` | | Data source object that represents the number and the type of the columns that you want to show. | -| 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. | -| presetColumn | `string` | | Custom preset column schema in JSON format. | -| multiselect | `boolean` | `false` | Toggles multiple row selection, renders checkboxes at the beginning of each row | -| page | `number` | `0` | The page number of the tasks to fetch. | -| size | `number` | See description | The number of tasks to fetch. Default value: 25. | +| 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. | +| processDefinitionKey | `string` | | **Deprecated:** 2.4.0 | +| processInstanceId | `string` | | The Instance Id of the process. | +| 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. | +| size | `number` | [`PaginationComponent`](../core/pagination.component.md).DEFAULT_PAGINATION.maxItems | The number of tasks to fetch. Default value: 25. | +| sort | `string` | | Define the sort order of the processes. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` | +| state | `string` | | Current state of the process. Possible values are: `completed`, `active`. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| rowClick | `EventEmitter` | Emitted when a task in the list is clicked | -| rowsSelected | `EventEmitter` | Emitted when rows are selected/unselected | -| success | `EventEmitter` | Emitted when the task list is loaded | -| error | `EventEmitter` | Emitted when an error occurs. | +| -- | -- | -- | +| error | `EventEmitter` | Emitted when an error occurs. | +| rowClick | `EventEmitter` | Emitted when a task in the list is clicked | +| rowsSelected | `EventEmitter` | Emitted when rows are selected/unselected | +| success | `EventEmitter` | Emitted when the task list is loaded | ## Details @@ -192,8 +210,8 @@ The Tasklist also supports pagination as shown in the example below: ### DataTableAdapter example -See the [DataTableAdapter](../core/datatable-adapter.interface.md) page for full details of the interface and its standard -implementation, ObjectDataTableAdapter. Below is an example of how you can set up the adapter for a +See the [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) page for full details of the interface and its standard +implementation, [ObjectDataTableAdapter](../../lib/core/datatable/data/object-datatable-adapter.ts). Below is an example of how you can set up the adapter for a typical tasklist. ```json @@ -207,10 +225,10 @@ typical tasklist. ### DataColumn Features -You can customize the styling of a column and also add features like tooltips and automatic translation of column titles. See the [DataColumn](../core/data-column.component.md) page for more information about these features. +You can customize the styling of a column and also add features like tooltips and automatic translation of column titles. See the [`DataColumn`](../../lib/core/datatable/data/data-column.model.ts) page for more information about these features. ## See also - [Data column component](../core/data-column.component.md) -- [DataTableAdapter](../core/datatable-adapter.interface.md) +- [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) - [Pagination component](../core/pagination.component.md) diff --git a/docs/process-services/task-standalone.component.md b/docs/process-services/task-standalone.component.md index 71396c68c8..2c62742a42 100644 --- a/docs/process-services/task-standalone.component.md +++ b/docs/process-services/task-standalone.component.md @@ -2,17 +2,11 @@ Added: v2.0.0 Status: Active --- + # Task Standalone component This component can be used when there is no form attached to a task. -## Contents - -- [Basic Usage](#basic-usage) - - - [Properties](#properties) - - [Events](#events) - ## Basic Usage ```html @@ -26,16 +20,15 @@ This component can be used when there is no form attached to a task. ### Properties | Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| taskName | `string` | | Name of the task | -| isCompleted | `boolean` | `false` | If true then Task completed message is shown and `Complete` and `Cancel` buttons are hidden | -| hasCompletePermission | `boolean` | `true` | Toggle rendering of the `Complete` button. | -| hideCancelButton | `boolean` | `true` | Toggle rendering of the `Cancel` button. | +| -- | -- | -- | -- | +| hasCompletePermission | `boolean` | true | Toggles rendering of the `Complete` button. | +| hideCancelButton | `boolean` | true | Toggles rendering of the `Cancel` button. | +| isCompleted | `boolean` | false | If true then Task completed message is shown and `Complete` and `Cancel` buttons are hidden. | +| taskName | `string` | | Name of the task. | ### Events | Name | Type | Description | -| ---- | ---- | ----------- | -| cancel | `EventEmitter` | Emitted when the `Cancel` button is clicked. | -| complete | `EventEmitter` | Emitted when the form associated with the task is completed. | - +| -- | -- | -- | +| cancel | `EventEmitter` | Emitted when the "Cancel" button is clicked. | +| complete | `EventEmitter` | Emitted when the form associated with the task is completed. | diff --git a/docs/process-services/tasklist.service.md b/docs/process-services/tasklist.service.md index 3d51600bad..416c4be988 100644 --- a/docs/process-services/tasklist.service.md +++ b/docs/process-services/tasklist.service.md @@ -12,86 +12,107 @@ Manages Task Instances. ### Methods -- `getFilterForTaskById(taskId: string, filterList: FilterRepresentationModel[]): Observable` - Gets all the filters in the list that belong to a task. - - `taskId` - ID of the target task - - `filterList` - List of filters to search through -- `isTaskRelatedToFilter(taskId: string, filter: FilterRepresentationModel): Observable` - Checks if a taskId is filtered with the given filter. - - `taskId` - ID of the target task - - `filter` - The filter you want to check -- `getTasks(requestNode: TaskQueryRequestRepresentationModel): Observable` - Gets all the tasks matching the supplied query. - - `requestNode` - Query to search for tasks -- `findTasksByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable` - Gets tasks matching a query and state value. - - `requestNode` - Query to search for tasks - - `state` - (Optional) Task state. Can be "open" or "completed". -- `findAllTaskByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable` - Gets all tasks matching a query and state value. - - `requestNode` - Query to search for tasks. - - `state` - (Optional) Task state. Can be "open" or "completed". -- `findAllTasksWithoutState(requestNode: TaskQueryRequestRepresentationModel): Observable` - Get all tasks matching the supplied query but ignoring the task state. - - `requestNode` - Query to search for tasks -- `getTaskDetails(taskId: string): Observable` - Gets details for a task. - - `taskId` - ID of the target task. -- `getTaskChecklist(id: string): Observable` - Gets the checklist for a task. - - `id` - ID of the target task -- `getFormList(): Observable` - Gets all available reusable forms. - -- `attachFormToATask(taskId: string, formId: number): Observable` - Attaches a form to a task. - - `taskId` - ID of the target task - - `formId` - ID of the form to add -- `addTask(task: TaskDetailsModel): Observable` - Adds a subtask (ie, a checklist task) to a parent task. - - `task` - The task to add -- `deleteTask(taskId: string): Observable` - Deletes a subtask (ie, a checklist task) from a parent task. - - `taskId` - The task to delete -- `completeTask(taskId: string): any` - Gives completed status to a task. - - `taskId` - ID of the target task -- `getTotalTasks(requestNode: TaskQueryRequestRepresentationModel): Observable` - Gets the total number of the tasks found by a query. - - `requestNode` - Query to search for tasks -- `createNewTask(task: TaskDetailsModel): Observable` - Creates a new standalone task. - - `task` - Details of the new task -- `assignTask(taskId: string, requestNode: any): Observable` - Assigns a task to a user or group. - - `taskId` - The task to assign - - `requestNode` - User or group to assign the task to -- `assignTaskByUserId(taskId: string, userId: number): Observable` - Assigns a task to a user. - - `taskId` - ID of the task to assign - - `userId` - ID of the user to assign the task to -- `claimTask(taskId: string): Observable` - Claims a task for the current user. - - `taskId` - ID of the task to claim -- `unclaimTask(taskId: string): Observable` - Unclaims a task for the current user. - - `taskId` - ID of the task to unclaim -- `updateTask(taskId: any, updated): Observable` - Updates the details (name, description, due date) for a task. - - `taskId` - ID of the task to update - - `updated` - Data to update the task (as a \`TaskUpdateRepresentation\` instance). -- `fetchTaskAuditPdfById(taskId: string): Observable` - Fetches the Task Audit information in PDF format. - - `taskId` - ID of the target task -- `fetchTaskAuditJsonById(taskId: string): Observable` - Fetch the Task Audit information in JSON format - - `taskId` - ID of the target task +- **addTask**(task: [`TaskDetailsModel`](../process-services/task-details.model.md) = `null`): [`Observable`](../process-services/task-details.model.md)
+ Adds a subtask (ie, a checklist task) to a parent task. + - _task:_ [`TaskDetailsModel`](../process-services/task-details.model.md) - The task to add + - **Returns** [`Observable`](../process-services/task-details.model.md) - The subtask that was added +- **assignTask**(taskId: `string` = `null`, requestNode: `any` = `null`): [`Observable`](../process-services/task-details.model.md)
+ 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`](../process-services/task-details.model.md) - Details of the assigned task +- **assignTaskByUserId**(taskId: `string` = `null`, userId: `number` = `null`): [`Observable`](../process-services/task-details.model.md)
+ Assigns a task to a user. + - _taskId:_ `string` - ID of the task to assign + - _userId:_ `number` - ID of the user to assign the task to + - **Returns** [`Observable`](../process-services/task-details.model.md) - Details of the assigned task +- **attachFormToATask**(taskId: `string` = `null`, formId: `number` = `null`): `Observable`
+ Attaches a form to a task. + - _taskId:_ `string` - ID of the target task + - _formId:_ `number` - ID of the form to add + - **Returns** `Observable` - Null response notifying when the operation is complete +- **claimTask**(taskId: `string` = `null`): [`Observable`](../process-services/task-details.model.md)
+ Claims a task for the current user. + - _taskId:_ `string` - ID of the task to claim + - **Returns** [`Observable`](../process-services/task-details.model.md) - Details of the claimed task +- **completeTask**(taskId: `string` = `null`): `Observable`
+ Gives completed status to a task. + - _taskId:_ `string` - ID of the target task + - **Returns** `Observable` - Null response notifying when the operation is complete +- **createNewTask**(task: [`TaskDetailsModel`](../process-services/task-details.model.md) = `null`): [`Observable`](../process-services/task-details.model.md)
+ Creates a new standalone task. + - _task:_ [`TaskDetailsModel`](../process-services/task-details.model.md) - Details of the new task + - **Returns** [`Observable`](../process-services/task-details.model.md) - Details of the newly created task +- **deleteTask**(taskId: `string` = `null`): [`Observable`](../process-services/task-details.model.md)
+ Deletes a subtask (ie, a checklist task) from a parent task. + - _taskId:_ `string` - The task to delete + - **Returns** [`Observable`](../process-services/task-details.model.md) - Null response notifying when the operation is complete +- **fetchTaskAuditJsonById**(taskId: `string` = `null`): `Observable`
+ Fetch the Task Audit information in JSON format + - _taskId:_ `string` - ID of the target task + - **Returns** `Observable` - JSON data +- **fetchTaskAuditPdfById**(taskId: `string` = `null`): `Observable`
+ Fetches the Task Audit information in PDF format. + - _taskId:_ `string` - ID of the target task + - **Returns** `Observable` - Binary PDF data +- **findAllTaskByState**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) = `null`, state?: `string` = `null`): [`Observable`](../../lib/process-services/task-list/models/task-list.model.ts)
+ Gets all tasks matching a query and state value. + - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks. + - _state:_ `string` - (Optional) Task state. Can be "open" or "completed". + - **Returns** [`Observable`](../../lib/process-services/task-list/models/task-list.model.ts) - List of tasks +- **findAllTasksWithoutState**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) = `null`): [`Observable`](../../lib/process-services/task-list/models/task-list.model.ts)
+ Gets all tasks matching the supplied query but ignoring the task state. + - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks + - **Returns** [`Observable`](../../lib/process-services/task-list/models/task-list.model.ts) - List of tasks +- **findTasksByState**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) = `null`, state?: `string` = `null`): [`Observable`](../../lib/process-services/task-list/models/task-list.model.ts)
+ Gets tasks matching a query and state value. + - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks + - _state:_ `string` - (Optional) Task state. Can be "open" or "completed". + - **Returns** [`Observable`](../../lib/process-services/task-list/models/task-list.model.ts) - List of tasks +- **getFilterForTaskById**(taskId: `string` = `null`, filterList: [`FilterRepresentationModel[]`](../../lib/process-services/task-list/models/filter.model.ts) = `null`): [`Observable`](../../lib/process-services/task-list/models/filter.model.ts)
+ Gets all the filters in the list that belong to a task. + - _taskId:_ `string` - ID of the target task + - _filterList:_ [`FilterRepresentationModel[]`](../../lib/process-services/task-list/models/filter.model.ts) - List of filters to search through + - **Returns** [`Observable`](../../lib/process-services/task-list/models/filter.model.ts) - Filters belonging to the task +- **getFormList**(): [`Observable`](../../lib/process-services/task-list/models/form.model.ts)
+ Gets all available reusable forms. + - **Returns** [`Observable`](../../lib/process-services/task-list/models/form.model.ts) - Array of form details +- **getTaskChecklist**(id: `string` = `null`): [`Observable`](../process-services/task-details.model.md)
+ Gets the checklist for a task. + - _id:_ `string` - ID of the target task + - **Returns** [`Observable`](../process-services/task-details.model.md) - Array of checklist task details +- **getTaskDetails**(taskId: `string` = `null`): [`Observable`](../process-services/task-details.model.md)
+ Gets details for a task. + - _taskId:_ `string` - ID of the target task. + - **Returns** [`Observable`](../process-services/task-details.model.md) - Task details +- **getTasks**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) = `null`): [`Observable`](../../lib/process-services/task-list/models/task-list.model.ts)
+ Gets all the tasks matching the supplied query. + - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks + - **Returns** [`Observable`](../../lib/process-services/task-list/models/task-list.model.ts) - List of tasks +- **getTotalTasks**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) = `null`): `Observable`
+ Gets the total number of the tasks found by a query. + - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks + - **Returns** `Observable` - Number of tasks +- **isTaskRelatedToFilter**(taskId: `string` = `null`, filter: [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) = `null`): [`Observable`](../../lib/process-services/task-list/models/filter.model.ts)
+ Checks if a taskId is filtered with the given filter. + - _taskId:_ `string` - ID of the target task + - _filter:_ [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The filter you want to check + - **Returns** [`Observable`](../../lib/process-services/task-list/models/filter.model.ts) - The filter if it is related or null otherwise +- **unclaimTask**(taskId: `string` = `null`): [`Observable`](../process-services/task-details.model.md)
+ Unclaims a task for the current user. + - _taskId:_ `string` - ID of the task to unclaim + - **Returns** [`Observable`](../process-services/task-details.model.md) - Null response notifying when the operation is complete +- **updateTask**(taskId: `any` = `null`, updated: `any` = `null`): [`Observable`](../process-services/task-details.model.md)
+ Updates the details (name, description, due date) for a task. + - _taskId:_ `any` - ID of the task to update + - _updated:_ `any` - Data to update the task (as a `TaskUpdateRepresentation` instance). + - **Returns** [`Observable`](../process-services/task-details.model.md) - Updated task details ## Details ### Task details -Several of the methods return one or more `TaskDetailsModel` instances corresponding +Several of the methods return one or more [`TaskDetailsModel`](../process-services/task-details.model.md) instances corresponding to tasks or subtasks matched by a query of some kind. For example, `getTaskDetails` could be used as shown below: @@ -104,45 +125,43 @@ this.tasklistService.getTaskDetails(taskInstanceId).subscribe( (taskInstance: Ta }); ``` -The resulting `TaskDetailsModel` object contains information like the following: +The resulting [`TaskDetailsModel`](../process-services/task-details.model.md) object contains information like the following: -``` - 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" ### Queries -Some of the methods run a search query contained in a `TaskQueryRequestRepresentationModel` and +Some of the methods run a search query contained in a [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) and return the matched tasks. Below is an example of how you might run a query using `getTasks`: ```ts @@ -181,8 +200,8 @@ The `assignment` property filters tasks based on how they are assigned (or not a Use `assignee` if you are interested in tasks that are assigned to a user. If you want to see pooled tasks (i.e. tasks that needs to be claimed by a user), then use `candidate`. -A successful query returns a `TaskListModel` with the `data` property set to an array of -`TaskDetailsModel`: +A successful query returns a [`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts) with the `data` property set to an array of +[`TaskDetailsModel`](../process-services/task-details.model.md): data: 0: {id: "75010", name: "Approve Invoice - Invoice-10202.pdf", description: null, category: null, assignee: {…}, …} diff --git a/lib/process-services/process-list/components/process-list.component.ts b/lib/process-services/process-list/components/process-list.component.ts index 5ece3420ce..659f68ed86 100644 --- a/lib/process-services/process-list/components/process-list.component.ts +++ b/lib/process-services/process-list/components/process-list.component.ts @@ -84,11 +84,11 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit @Input() name: string; - /* The page number of the processes to fetch. */ + /** The page number of the processes to fetch. */ @Input() page: number = 0; - /* The page number processes to fetch. */ + /** The number of processes to fetch in each page. */ @Input() size: number = PaginationComponent.DEFAULT_PAGINATION.maxItems; @@ -100,18 +100,18 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit @Input() data: DataTableAdapter; - /* Toggles multiple row selection, renders checkboxes at the beginning of each row */ + /** Toggles multiple row selection, which renders checkboxes at the beginning of each row */ @Input() multiselect: boolean = false; - /* Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, + /** 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. */ @Input() selectionMode: string = 'single'; // none|single|multiple - /* Toggles default selection of the first row */ + /** Toggles default selection of the first row */ @Input() selectFirstRow: boolean = true; diff --git a/tools/doc/tools/tsInfo.js b/tools/doc/tools/tsInfo.js index e5b2dceb91..de39e7cbf9 100644 --- a/tools/doc/tools/tsInfo.js +++ b/tools/doc/tools/tsInfo.js @@ -16,7 +16,9 @@ var nameExceptions = { "datatable.component": "DataTableComponent", "tasklist.service": "TaskListService", "text-mask.component": "InputMaskDirective", - "card-item-types.service": "CardItemTypeService" + "card-item-types.service": "CardItemTypeService", + "create-task-attachment.component": "AttachmentComponent", + "process-list.component": "ProcessInstanceListComponent" }; var undocMethodNames = { "ngOnChanges": 1 diff --git a/tools/doc/tools/tsInfo.ts b/tools/doc/tools/tsInfo.ts index ae77cfc591..e88c326b90 100644 --- a/tools/doc/tools/tsInfo.ts +++ b/tools/doc/tools/tsInfo.ts @@ -38,7 +38,9 @@ let nameExceptions = { "datatable.component": "DataTableComponent", "tasklist.service": "TaskListService", "text-mask.component": "InputMaskDirective", - "card-item-types.service": "CardItemTypeService" + "card-item-types.service": "CardItemTypeService", + "create-task-attachment.component": "AttachmentComponent", + "process-list.component": "ProcessInstanceListComponent" }