mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
* fix after rebase * new release strategy for ng next Signed-off-by: eromano <eugenioromano16@gmail.com> * peer dep Signed-off-by: eromano <eugenioromano16@gmail.com> * Angular 14 fix unit test and storybook Signed-off-by: eromano <eugenioromano16@gmail.com> fix after rebase Signed-off-by: eromano <eugenioromano16@gmail.com> update pkg.json Signed-off-by: eromano <eugenioromano16@gmail.com> missing dep Signed-off-by: eromano <eugenioromano16@gmail.com> Fix mistake and missing code Dream....build only affected libs Add utility run commands * Use nx command to run affected tests * Fix nx test core fix content tests Run unit with watch false core test fixes reduce test warnings Fix process cloud unit Fix adf unit test Fix lint process cloud Disable lint next line Use right core path Fix insights unit fix linting insights Fix process-services unit fix the extensions test report fix test warnings Fix content unit Fix bunch of content unit * Produce an adf alpha of 14 * hopefully fixing the content * Push back the npm publish * Remove flaky unit * Fix linting * Make the branch as root * Get rid of angualar13 * Remove the travis depth * Fixing version for npm * Enabling cache for unit and build * Fix scss for core and paths Copy i18 and asset by using ng-packager Export the theming alias and fix path Use ng-package to copy assets process-services-cloud Use ng-package to copy assets process-services Use ng-package to copy assets content-services Use ng-package to copy assets insights * feat: fix api secondary entry point * fix storybook rebase * Move dist under dist/libs from lib/dist * Fix the webstyle * Use only necessary nrwl deps and improve lint * Fix unit for libs * Convert lint.sh to targets - improve performance * Use latest of angular * Align alfresco-js-api Signed-off-by: eromano <eugenioromano16@gmail.com> Co-authored-by: eromano <eugenioromano16@gmail.com> Co-authored-by: Mikolaj Serwicki <mikolaj.serwicki@hyland.com> Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
98 lines
6.9 KiB
Markdown
98 lines
6.9 KiB
Markdown
---
|
|
Title: Form cloud service
|
|
Added: v3.2.0
|
|
Status: Active
|
|
Last reviewed: 2019-04-12
|
|
---
|
|
|
|
# [Form cloud service](../../../lib/process-services-cloud/src/lib/form/services/form-cloud.service.ts "Defined in form-cloud.service.ts")
|
|
|
|
Implements Process Services form methods
|
|
|
|
## Basic Usage
|
|
|
|
```ts
|
|
import { FormCloudService } from '@alfresco/adf-process-services-cloud';
|
|
|
|
@Component(...)
|
|
class MyComponent {
|
|
|
|
constructor(formCloudService: FormCloudService) {}
|
|
|
|
}
|
|
```
|
|
|
|
## Class members
|
|
|
|
### Methods
|
|
|
|
- **completeTaskForm**(appName: `string`, taskId: `string`, processInstanceId: `string`, formId: `string`, formValues: [`FormValues`](lib/core/src/lib/form/components/widgets/core/form-values.ts), outcome: `string`, version: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>`<br/>
|
|
Completes a task form.
|
|
- _appName:_ `string` - Name of the app
|
|
- _taskId:_ `string` - ID of the target task
|
|
- _processInstanceId:_ `string` - ID of processInstance
|
|
- _formId:_ `string` - ID of the form to complete
|
|
- _formValues:_ [`FormValues`](lib/core/src/lib/form/components/widgets/core/form-values.ts) - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) values object
|
|
- _outcome:_ `string` - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) outcome
|
|
- _version:_ `number` - of the form
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>` - Updated task details
|
|
- **createTemporaryRawRelatedContent**(file: `any`, nodeId: `string`, contentHost: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
|
|
|
- _file:_ `any` -
|
|
- _nodeId:_ `string` -
|
|
- _contentHost:_ `string` -
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` -
|
|
|
|
- **getBasePath**(appName: `string`): `string`<br/>
|
|
|
|
- _appName:_ `string` -
|
|
- **Returns** `string` -
|
|
|
|
- **getForm**(appName: `string`, formKey: `string`, version?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FormContent`](../../../lib/process-services-cloud/src/lib/services/form-fields.interfaces.ts)`>`<br/>
|
|
Gets a form definition.
|
|
- _appName:_ `string` - Name of the app
|
|
- _formKey:_ `string` - key of the target task
|
|
- _version:_ `number` - (Optional) Version of the form
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FormContent`](../../../lib/process-services-cloud/src/lib/services/form-fields.interfaces.ts)`>` - Form definition
|
|
- **getRestWidgetData**(formName: `string`, widgetId: `string`, body: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FormFieldOption`](../../../lib/core/form/components/widgets/core/form-field-option.ts)`[]>`<br/>
|
|
|
|
- _formName:_ `string` -
|
|
- _widgetId:_ `string` -
|
|
- _body:_ `any` -
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FormFieldOption`](../../../lib/core/form/components/widgets/core/form-field-option.ts)`[]>` -
|
|
|
|
- **getTask**(appName: `string`, taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>`<br/>
|
|
Gets details of a task
|
|
- _appName:_ `string` - Name of the app
|
|
- _taskId:_ `string` - ID of the target task
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>` - Details of the task
|
|
- **getTaskForm**(appName: `string`, taskId: `string`, version?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
|
Gets the form definition of a task.
|
|
- _appName:_ `string` - Name of the app
|
|
- _taskId:_ `string` - ID of the target task
|
|
- _version:_ `number` - (Optional) Version of the form
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Form definition
|
|
- **getTaskVariables**(appName: `string`, taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskVariableCloud`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`[]>`<br/>
|
|
Gets the variables of a task.
|
|
- _appName:_ `string` - Name of the app
|
|
- _taskId:_ `string` - ID of the target task
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskVariableCloud`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`[]>` - Task variables
|
|
- **parseForm**(json: `any`, data?: [`TaskVariableCloud`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`[]`, readOnly: `boolean` = `false`): [`FormModel`](lib/core/src/lib/form/components/widgets/core/form.model.ts)<br/>
|
|
Parses JSON data to create a corresponding form.
|
|
- _json:_ `any` - JSON data to create the form
|
|
- _data:_ [`TaskVariableCloud`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`[]` - (Optional) Values for the form's fields
|
|
- _readOnly:_ `boolean` - Toggles whether or not the form should be read-only
|
|
- **Returns** [`FormModel`](lib/core/src/lib/form/components/widgets/core/form.model.ts) - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) created from the JSON specification
|
|
- **saveTaskForm**(appName: `string`, taskId: `string`, processInstanceId: `string`, formId: `string`, values: [`FormValues`](lib/core/src/lib/form/components/widgets/core/form-values.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>`<br/>
|
|
Saves a task form.
|
|
- _appName:_ `string` - Name of the app
|
|
- _taskId:_ `string` - ID of the target task
|
|
- _processInstanceId:_ `string` - ID of processInstance
|
|
- _formId:_ `string` - ID of the form to save
|
|
- _values:_ [`FormValues`](lib/core/src/lib/form/components/widgets/core/form-values.ts) - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) values object
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>` - Updated task details
|
|
|
|
## See also
|
|
|
|
- [Form cloud component](../components/form-cloud.component.md)
|