[ADF-4127] ProcessServicesCloud - add claim/unclaim directive (#4464)

* [ADF-4127] ProessServicesCloud - claim task directive

* [ADF-4127] - fix doc

* [ADF-4127] - revert docs changes

* [ADF-4127] - revert doc changes

* [ADF-4127] - fix doc and reset sourceLinker.js

* [ADF-4127] - refractor task-cloud.service. add validation for claim/unclaim and fix unit tests

* [ADF-4127] - fix docs files

* [ADF-4127[ - add aditional complete task validation

* [ADF-4127] - PR changes

* [ADF-4127] - complete docs file

* [ADF-4127] - more PR changes

* [ADF-4127] - change Unclaim task name and wait for task to be claimed and unclaimed before emit the success event

* [ADF-4127] - fix unit tests
This commit is contained in:
Silviu Popa
2019-03-25 14:24:26 +02:00
committed by Maurizio Vitale
parent 0b1e5d31d8
commit 31658c0974
26 changed files with 949 additions and 280 deletions

View File

@@ -17,33 +17,41 @@ Manages task cloud.
Validate if a task can be completed.
- _taskDetails:_ [`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts) - task details object
- **Returns** `boolean` - Boolean value if the task can be completed
- **completeTask**(appName: `string`, taskId: `string`)<br/>
Complete a task
- _appName:_ `string` - Name of the app
- _taskId:_ `string` - ID of the task to complete
- **Returns** [`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts) - Details of the task that was completed
- **canClaimTask**(taskDetails: [`TaskDetailsCloudModel`](../../lib/process-services-cloud/src/lib/task/start-filters/models/task-details-cloud.model.ts))<br/>
Validate if a task can be claimed.
- _taskDetails:_ [`TaskDetailsCloudModel`](../../lib/process-services-cloud/src/lib/task/start-filters/models/task-details-cloud.model.ts) - Task details object
- **Returns** `boolean` - Boolean value if the task can be claimed
- **canUnclaimTask**(taskDetails: [`TaskDetailsCloudModel`](../../lib/process-services-cloud/src/lib/task/start-filters/models/task-details-cloud.model.ts))<br/>
Validate if a task can be unclaimed.
- _taskDetails:_ [`TaskDetailsCloudModel`](../../lib/process-services-cloud/src/lib/task/start-filters/models/task-details-cloud.model.ts) - Task details object
- **Returns** `boolean` - Boolean value if the task can be unclaimed
- **claimTask**(appName: `string`, taskId: `string`, assignee: `string`): `any`<br/>
Claims a task for an assignee.
- _appName:_ `string` - Name of the app
- _taskId:_ `string` - ID of the task to claim
- _assignee:_ `string` - User to assign the task to
- **Returns** `any` - Details of the claimed task
- **completeTask**(appName: `string`, taskId: `string`): `any`<br/>
Complete a task.
- _appName:_ `string` - Name of the app
- _taskId:_ `string` - ID of the task to complete
- **Returns** `any` - Details of the task that was completed
- **getTaskById**(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 task whose details you want
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>` - Task details
- **Returns** [`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts) - Details of the claimed task
- **unclaimTask**(appName: `string`, taskId: `string`): `any`<br/>
Un-claims a task.
- _appName:_ `string` - Name of the app
- _taskId:_ `string` - ID of the task to unclaim
- **Returns** `any` - Details of the task that was unclaimed
- **Returns** [`TaskDetailsCloudModel`](../../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts) - Details of the task that was unclaimed
- **getTaskById**(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 task whose details you want
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>` - Task details
- **updateTask**(appName: `string`, taskId: `string`, updatePayload: `any`): `any`<br/>
Updates the details (name, description, due date) for a task.
- _appName:_ `string` - Name of the app
- _taskId:_ `string` - ID of the task to update
- _updatePayload:_ `any` - Data to update the task
- **Returns** `any` - Updated task details
- **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
## Details