mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-7427] Process Services improvements and cleanup (#9664)
This commit is contained in:
@@ -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