[ADF-4391] Doc review for 3.2 (#4601)

* [ADF-4391] Reviewed new clipboard class docs

* [ADF-4391] Reviewed new proc cloud class docs

* [ADF-4391] Reviewed new datatable doc additions
This commit is contained in:
Andy Stark
2019-04-12 16:18:43 +01:00
committed by Eugenio Romano
parent 16aaa0f0b3
commit 921fdc00df
16 changed files with 256 additions and 153 deletions

View File

@@ -2,7 +2,7 @@
Title: Form cloud service
Added: v3.2.0
Status: Active
Last reviewed: 2019-04-02
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")
@@ -12,55 +12,74 @@ Implements Process Services form methods
## Basic Usage
```ts
import { FormService } from '@alfresco/adf-core';
import { FormCloudService } from '@alfresco/adf-process-services-cloud';
@Component(...)
class MyComponent {
constructor(formService: FormService) {
constructor(formCloudService: FormCloudService) {}
}
```
## Class members
### Methods
- `parseForm(json: any, data?:`[`TaskVariableCloud,`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`readOnly: boolean = false):`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)
Parses JSON data to create a corresponding [`Form`](../../../lib/process-services-cloud/src/lib/form/models/form-cloud.model.ts) model.
- `json` - JSON to create the form
- `data` - (Optional) [`Values`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts) for the form fields
- `readOnly` - Should the form fields be read-only?
- **completeTaskForm**(appName: `string`, taskId: `string`, formId: `string`, formValues: [`FormValues`](../../../lib/core/form/components/widgets/core/form-values.ts), outcome: `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/>
Completes a task form.
- _appName:_ `string` - Name of the app
- _taskId:_ `string` - ID of the target task
- _formId:_ `string` - ID of the form to complete
- _formValues:_ [`FormValues`](../../../lib/core/form/components/widgets/core/form-values.ts) - [Form](../../../lib/process-services/task-list/models/form.model.ts) values object
- _outcome:_ `string` - (Optional) [Form](../../../lib/process-services/task-list/models/form.model.ts) outcome
- **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: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
- `saveTaskForm(appName: string, taskId: string, formId: string, formValues: FormValues):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Saves task [`form`](../../../lib/process-services-cloud/src/lib/form/models/form-cloud.model.ts).
- `appName` - App Name
- `taskId` - Task Id
- `formId` - Form Id
- `formValues` - [`Form Values`](../../../lib/core/form/components/widgets/core/form-values.ts)
- _file:_ `any` -
- _nodeId:_ `any` -
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` -
- `completeTaskForm(appName: string, taskId: string, formId: string, formValues: FormValues, outcome: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Completes task [`form`](../../../lib/process-services-cloud/src/lib/form/models/form-cloud.model.ts)
- `appName` - App Name
- `taskId` - Task Id
- `formId` - Form Id
- `formValues` - [`Form Values`](../../../lib/core/form/components/widgets/core/form-values.ts)
- `outcome` - (Optional) [`Form`](../../../lib/process-services-cloud/src/lib/form/models/form-cloud.model.ts) Outcome
- **getForm**(appName: `string`, taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets a form definition.
- _appName:_ `string` - Name of the app
- _taskId:_ `string` - ID of the target task
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Form definition
- **getProcessStorageFolderTask**(appName: `string`, taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
- `getTaskForm(appName: string, taskId: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get form defintion of a task
- `appName` - App Name
- `taskId` - Task Id
- _appName:_ `string` -
- _taskId:_ `string` -
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` -
- `getForm(appName: string, formId: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get a form definition
- `appName` - App Name
- `formId` - Form Id
- **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`): [`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
- **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`): [`FormCloud`](../../../lib/process-services-cloud/src/lib/form/models/form-cloud.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) (Optional) Values for the form's fields
- _readOnly:_ `boolean` - Toggles whether or not the form should be read-only
- **Returns** [`FormCloud`](../../../lib/process-services-cloud/src/lib/form/models/form-cloud.model.ts) - [Form](../../../lib/process-services/task-list/models/form.model.ts) created from the JSON specification
- **saveTaskForm**(appName: `string`, taskId: `string`, formId: `string`, formValues: [`FormValues`](../../../lib/core/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
- _formId:_ `string` - ID of the form to save
- _formValues:_ [`FormValues`](../../../lib/core/form/components/widgets/core/form-values.ts) - [Form](../../../lib/process-services/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
- `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)>
Gets details of a task.
- `appName` - App Name
- `taskId` - Task Id
## See also
- `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)[]>
Gets variables of a task.
- `appName` - App Name
- `taskId` - Task Id
- [Form cloud component](../components/form-cloud.component.md)