mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-7427] Process Services improvements and cleanup (#9664)
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
---
|
||||
Title: Bpm User model
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# [Bpm User model](../../../lib/process-services/src/lib/common/models/bpm-user.model.ts "Defined in bpm-user.model.ts")
|
||||
|
||||
Contains information about a Process Services user.
|
||||
|
||||
## Details
|
||||
|
||||
Instances of this class are returned by the methods of the
|
||||
[Bpm User service](../services/bpm-user.service.md). It implements the
|
||||
[`UserRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/activiti-rest-api/docs/UserRepresentation.md) interface, which is defined in the
|
||||
[Alfresco JS API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/UserRepresentation.md).
|
||||
|
||||
Note that the Typescript class for this model is in active development;
|
||||
it is likely to change and so its properties are not listed here. For the
|
||||
latest version of the class, see the
|
||||
[source file](https://github.com/Alfresco/alfresco-ng2-components/blob/develop/lib/core/userinfo/models/bpm-user.model.ts).
|
||||
|
||||
## See also
|
||||
|
||||
- [Bpm user service](../services/bpm-user.service.md)
|
||||
- [Ecm user model](ecm-user.model.md)
|
||||
- [People process service](../services/people-process.service.md)
|
@@ -24,4 +24,3 @@ latest version of the class, see the
|
||||
|
||||
- [Ecm user service](../services/ecm-user.service.md)
|
||||
- [People content service](../services/people-content.service.md)
|
||||
- [Bpm user model](bpm-user.model.md)
|
||||
|
@@ -1,24 +0,0 @@
|
||||
---
|
||||
Title: User Process model
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# [User Process model](../../../lib/process-services/src/lib/common/models/user-process.model.ts "Defined in user-process.model.ts")
|
||||
|
||||
Represents a Process Services user.
|
||||
|
||||
## Details
|
||||
|
||||
This class contains basic information about a Process Services user and
|
||||
is used throughout ADF to identify and list users (eg, to assign them to
|
||||
a task or to list them in search results).
|
||||
|
||||
Note that the Typescript class for this model is in active development;
|
||||
it is likely to change and so its properties are not listed here. For the
|
||||
latest version of the class, see the
|
||||
[source file](https://github.com/Alfresco/alfresco-ng2-components/blob/develop/lib/core/models/user-process.model.ts).
|
||||
|
||||
## See also
|
||||
|
||||
- [People process service](../services/people-process.service.md)
|
@@ -5,9 +5,9 @@ Status: Active
|
||||
Last reviewed: 2018-11-12
|
||||
---
|
||||
|
||||
# [Full name pipe](../../../lib/core/src/lib/pipes/full-name.pipe.ts "Defined in full-name.pipe.ts")
|
||||
# Full Name Pipe
|
||||
|
||||
Joins the first and last name properties from a [`UserProcessModel`](../../core/models/user-process.model.md) object into a single string.
|
||||
Joins the first and last name properties from the `UserLike` object into a single string.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
@@ -23,7 +23,7 @@ Joins the first and last name properties from a [`UserProcessModel`](../../core/
|
||||
|
||||
## Details
|
||||
|
||||
The pipe offers a convenient way to extract the name from a [User process model](../models/user-process.model.md) object.
|
||||
The pipe offers a convenient way to extract the name from a `UserLike` object.
|
||||
|
||||
## See also
|
||||
|
||||
|
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2018-11-19
|
||||
---
|
||||
|
||||
# [Time Ago pipe](../../../lib/core/src/lib/pipes/time-ago.pipe.ts "Defined in time-ago.pipe.ts")
|
||||
# Time Ago Pipe
|
||||
|
||||
Converts a recent past date into a number of days ago.
|
||||
|
||||
@@ -21,14 +21,14 @@ Converts a recent past date into a number of days ago.
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| locale | string | 'en-US' | A locale id for the locale format rules to use. |
|
||||
| Name | Type | Default value | Description |
|
||||
|--------|--------|---------------|-------------------------------------------------|
|
||||
| locale | string | 'en-US' | A locale id for the locale format rules to use. |
|
||||
|
||||
## Details
|
||||
|
||||
The pipe finds the difference between the input date and the current date. If it
|
||||
is less than seven days then then the date will be formatted as "X days ago".
|
||||
is less than seven days then the date will be formatted as "X days ago".
|
||||
Otherwise, the usual full date format is used.
|
||||
|
||||
By default, it localizes the date to the language that is currently in use by the app. Furthermore, a different locale id can be passed to the pipe to overwrite the locale id to set a custom one.
|
||||
|
@@ -5,9 +5,9 @@ Status: Active
|
||||
Last reviewed: 2018-11-12
|
||||
---
|
||||
|
||||
# [User Initial pipe](../../../lib/core/src/lib/pipes/user-initial.pipe.ts "Defined in user-initial.pipe.ts")
|
||||
# User Initials Pipe
|
||||
|
||||
Takes the name fields of a [`UserProcessModel`](../../core/models/user-process.model.md) object and extracts and formats the initials.
|
||||
Takes the name fields of a `UserLike` object and extracts and formats the initials.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
|
@@ -13,10 +13,6 @@ Gets details of the Process Services apps that are deployed for the user.
|
||||
|
||||
### Methods
|
||||
|
||||
- **getApplicationDetailsById**(appId: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>`<br/>
|
||||
Gets the details for a specific app ID number.
|
||||
- _appId:_ `number` - ID of the target app
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>` - Details of the app
|
||||
- **getDeployedApplications**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`[]>`<br/>
|
||||
Gets a list of deployed apps for this user.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`[]>` - The list of deployed apps
|
||||
|
@@ -13,18 +13,15 @@ Gets information about the current Process Services user.
|
||||
|
||||
### Methods
|
||||
|
||||
- **getCurrentUserInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmUserModel`](../../core/models/bpm-user.model.md)`>`<br/>
|
||||
- **getCurrentUserInfo**(): `Observable<UserRepresentation>`<br/>
|
||||
Gets information about the current user.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmUserModel`](../../core/models/bpm-user.model.md)`>` - User information object
|
||||
- **Returns** [`Observable`<UserRepresentation>` - User information object
|
||||
- **getCurrentUserProfileImage**(): `string`<br/>
|
||||
Gets the current user's profile image as a URL.
|
||||
- **Returns** `string` - URL string
|
||||
|
||||
## Details
|
||||
|
||||
The class returned by `getCurrentUserInfo` is detailed
|
||||
in the [Bpm User model docs](../models/bpm-user.model.md).
|
||||
|
||||
See the
|
||||
[getProfile](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/ProfileApi.md#getProfile)
|
||||
and
|
||||
@@ -34,4 +31,3 @@ methods in the Alfresco JS API for more information about the REST calls used by
|
||||
## See also
|
||||
|
||||
- [Ecm user service](../services/ecm-user.service.md)
|
||||
- [Bpm user model](../models/bpm-user.model.md)
|
||||
|
@@ -5,13 +5,11 @@ Status: Active
|
||||
Last reviewed: 2018-11-14
|
||||
---
|
||||
|
||||
# [Comment Process service](../../../lib/process-services/src/lib/process-comments/services/comment-process.service.ts "Defined in comment-process.service.ts")
|
||||
# Comment Process Service
|
||||
|
||||
Adds and retrieves comments for task and process instances in Process Services.
|
||||
|
||||
## Class members
|
||||
|
||||
### Methods
|
||||
## API
|
||||
|
||||
- **add**(id: `string`, message: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../../lib/core/src/lib/models/comment.model.ts)`>`<br/>
|
||||
Adds a comment to a process instance.
|
||||
@@ -22,13 +20,7 @@ Adds and retrieves comments for task and process instances in Process Services.
|
||||
Gets all comments that have been added to a process instance.
|
||||
- _id:_ `string` -
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../../lib/core/src/lib/models/comment.model.ts)`[]>` - Details for each comment
|
||||
- **getUserImage**(user: `any`): `string`<br/>
|
||||
|
||||
- _user:_ `any` -
|
||||
- **Returns** `string` -
|
||||
|
||||
## Details
|
||||
|
||||
See the Comments API section of the
|
||||
[Alfresco JS API docs](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-activiti-rest-api)
|
||||
for further details about the underlying REST API.
|
||||
- **getUserImage**(userId: `string`): `string`<br/>
|
||||
Gets the URL for the user image.
|
||||
- _userId:_ `string` -
|
||||
- **Returns** `string` - URL for the user image
|
||||
|
@@ -4,7 +4,7 @@ Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# [Form service](../../../lib/core/src/lib/form/services/form.service.ts "Defined in form.service.ts")
|
||||
# Form Service
|
||||
|
||||
Implements Process Services form methods
|
||||
|
||||
@@ -13,11 +13,9 @@ Implements Process Services form methods
|
||||
```ts
|
||||
import { FormService, FormEvent, FormFieldEvent } from '@alfresco/adf-core';
|
||||
|
||||
@Component(...)
|
||||
@Component()
|
||||
class MyComponent {
|
||||
|
||||
constructor(formService: FormService) {
|
||||
|
||||
formService.formLoaded.subscribe(
|
||||
(e: FormEvent) => {
|
||||
console.log(`Form loaded: ${e.form.id}`);
|
||||
@@ -29,9 +27,7 @@ class MyComponent {
|
||||
console.log(`Field value changed. Form: ${e.form.id}, Field: ${e.field.id}, Value: ${e.field.value}`);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@@ -173,33 +169,25 @@ class MyComponent {
|
||||
|
||||
- `userId` - ID of the target user
|
||||
|
||||
- [`getWorkflowUsers(filter: string, groupId?: string): Observable<UserProcessModel[]>`](../../core/models/user-process.model.md)
|
||||
- `getWorkflowUsers(filter: string, groupId?: string): Observable<LightUserRepresentation[]>`
|
||||
Gets a list of workflow users.
|
||||
|
||||
- `filter` - Filter to select specific users
|
||||
- `groupId` - (Optional) Group ID for the search
|
||||
|
||||
- [`getWorkflowGroups(filter: string, groupId?: string): Observable<GroupModel[]>`](../../../lib/core/src/lib/form/components/widgets/core/group.model.ts)
|
||||
Gets a list of groups in a workflow.
|
||||
|
||||
- `getWorkflowGroups(filter: string, groupId?: string): Observable<GroupModel[]>`
|
||||
Gets a list of groups in a workflow.
|
||||
- `filter` - Filter to select specific groups
|
||||
- `groupId` - (Optional) Group ID for the search
|
||||
|
||||
- `getFormId(res: any): string`
|
||||
Gets the ID of a form.
|
||||
|
||||
Gets the ID of a form.
|
||||
- `res` - Object representing a form
|
||||
|
||||
- `toJson(res: any): any`
|
||||
Creates a JSON representation of form data.
|
||||
|
||||
Creates a JSON representation of form data.
|
||||
- `res` - Object representing form data
|
||||
|
||||
- `toJsonArray(res: any): any`
|
||||
Creates a JSON array representation of form data.
|
||||
|
||||
Creates a JSON array representation of form data.
|
||||
- `res` - Object representing form data
|
||||
|
||||
- `handleError(error: any):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
|
||||
Reports an error message.
|
||||
- `error` - Data object with optional \`message\` and \`status\` fields for the error
|
||||
|
@@ -2,69 +2,47 @@
|
||||
Title: People Process service
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-05
|
||||
Last reviewed: 2024-05-14
|
||||
---
|
||||
|
||||
# [People Process service](../../../lib/process-services/src/lib/common/services/people-process.service.ts "Defined in people-process.service.ts")
|
||||
# People Process Service
|
||||
|
||||
Gets information about Process Services users.
|
||||
|
||||
## Class members
|
||||
## API
|
||||
|
||||
### Methods
|
||||
|
||||
- **getCurrentUserInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmUserModel`](../../core/models/bpm-user.model.md)`>`<br/>
|
||||
- **getCurrentUserInfo**(): `Observable<UserRepresentation>`<br/>
|
||||
Gets information about the current user.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmUserModel`](../../core/models/bpm-user.model.md)`>` - User information object
|
||||
- **Returns** `Observable<UserRepresentation>` - User information object
|
||||
- **getCurrentUserProfileImage**(): `string`<br/>
|
||||
Gets the current user's profile image as a URL.
|
||||
- **Returns** `string` - URL string
|
||||
- **getUserImage**(user: [`UserProcessModel`](../../core/models/user-process.model.md)): `string`<br/>
|
||||
Gets the profile picture URL for the specified user.
|
||||
- _user:_ [`UserProcessModel`](../../core/models/user-process.model.md) - The target user
|
||||
- **Returns** `string` - Profile picture URL
|
||||
- **getUserImage**(userId: string): `string`<br/>
|
||||
Gets a user's profile image as a URL.
|
||||
- _userId:_ `string` - User ID
|
||||
- **Returns** `string` - URL string
|
||||
- **getWorkflowGroups**(filter: `string`, groupId?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`GroupModel`](../../../lib/core/src/lib/form/components/widgets/core/group.model.ts)`[]>`<br/>
|
||||
Gets a list of groups in a workflow.
|
||||
- _filter:_ `string` - Filter to select specific groups
|
||||
- _groupId:_ `string` - (Optional) Group ID for the search
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`GroupModel`](../../../lib/core/src/lib/form/components/widgets/core/group.model.ts)`[]>` - Array of groups
|
||||
- **getWorkflowUsers**(taskId?: `string`, searchWord?: `string`, groupId?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../../core/models/user-process.model.md)`[]>`<br/>
|
||||
- **getWorkflowUsers**(taskId?: `string`, searchWord?: `string`, groupId?: `string`): `Observable<LightUserRepresentation[]>`<br/>
|
||||
Gets information about users across all tasks.
|
||||
- _taskId:_ `string` - (Optional) ID of the task
|
||||
- _searchWord:_ `string` - (Optional) Filter text to search for
|
||||
- _groupId:_ `string` - (Optional)
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../../core/models/user-process.model.md)`[]>` - Array of user information objects
|
||||
- **involveUserWithTask**(taskId: `string`, idToInvolve: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../../core/models/user-process.model.md)`[]>`<br/>
|
||||
- **Returns** `Observable<LightUserRepresentation[]>` - Array of user information objects
|
||||
- **involveUserWithTask**(taskId: `string`, idToInvolve: `string`): `Observable<LightUserRepresentation[]>`<br/>
|
||||
Sets a user to be involved with a task.
|
||||
- _taskId:_ `string` - ID of the target task
|
||||
- _idToInvolve:_ `string` - ID of the user to involve
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../../core/models/user-process.model.md)`[]>` - Empty response when the update completes
|
||||
- **removeInvolvedUser**(taskId: `string`, idToRemove: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../../core/models/user-process.model.md)`[]>`<br/>
|
||||
- **Returns** `Observable<LightUserRepresentation>` - Empty response when the update completes
|
||||
- **removeInvolvedUser**(taskId: `string`, idToRemove: `string`): `Observable<LightUserRepresentation[]>`<br/>
|
||||
Removes a user who is currently involved with a task.
|
||||
- _taskId:_ `string` - ID of the target task
|
||||
- _idToRemove:_ `string` - ID of the user to remove
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../../core/models/user-process.model.md)`[]>` - Empty response when the update completes
|
||||
|
||||
## Details
|
||||
|
||||
Use `getWorkflowUsers` to find users across all tasks, optionally filtering by the `searchWord`
|
||||
in the task name. The `taskId` parameter, if used, specifies a task to be _excluded_ from the
|
||||
results. You would typically use this feature to find new users to assign to a task, in which
|
||||
case you would want to exclude users already assigned to that task.
|
||||
|
||||
The [User Process model](../models/user-process.model.md) class used by the methods is seen throughout
|
||||
ADF's Process Services features. Note that for `involveUserWithTask` and `removeInvolvedUser`,
|
||||
null data is returned rather than usable details about users.
|
||||
|
||||
You can find more information about the REST API methods used by this service in the
|
||||
[Task Actions API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/TaskActionsApi.md#involveUser)
|
||||
(for `involveUserWithTask` and `removeInvolvedUser`), the
|
||||
[User Workflow API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/UsersWorkflowApi.md#getUsers)
|
||||
(for `getWorkflowUsers`) and the
|
||||
[User API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/UserApi.md#getuserprofilepictureurl)(for `getUserImage`).
|
||||
- **Returns** `Observable<LightUserRepresentation>` - Empty response when the update completes
|
||||
|
||||
## See also
|
||||
|
||||
- [User process model](../models/user-process.model.md)
|
||||
- [Bpm user model](../models/bpm-user.model.md)
|
||||
- [People content service](people-content.service.md)
|
||||
|
Reference in New Issue
Block a user