# Task User API {% hint style="warning" %} Workflow engine is configured by zen. We do not support it and do not recommend to use it anymore. Please, use any other workflow engine e.g. [Temporal](https://temporal.io/). Since the 2405 release, using Aidbox in FHIR schema validation engine is recommended, which is incompatible with zen or Entity/Attribute options. [Setup Aidbox with FHIR Schema validation engine](broken-reference) {% endhint %} Task User API allows users to manually control Aidbox tasks by [RPC methods](../../../../../api/other/rpc-api.md). ### `awf.task/create-and-execute` Creates an instance of a defined task and makes it ready to be executed immediately or at a specified time. #### Params:
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | false | Identifier of task (If not provided, will be auto-generated). |
| label | string | false | Human- or machine-readable description of task instance. Example: Import Patient resources |
| definition | string | true | Definition of predefined task or custom-defined task. Example: aidbox.archive/create-archive |
| params | object | true | The input parameters described in the task definition. |
| executeAt | string | false | Time at which the task will become ready. If not provided - task will become ready immediately. Example: 2023-05-03T13:30:43 |
| Parameter | Type | Description |
|---|---|---|
| resource | object | Created AidboxTask resource. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | true | Id of the task whose status will be returned. |
| include-settings? | boolean | false | If true , includes setting parameters predefined in definition.Default: false |
| include-log? | boolean | false | If true, includes log of task status transitions according to #task-instance-lifecycle.Default: false |
| Parameter | Type | Description |
|---|---|---|
| resource | object | Created AidboxTask resource. |
| settings | object | TODO |
| log | object[] | AidboxTaskLog resources for task with specified id |
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | true | Id of the task that will be canceled. |
| Parameter | Type | Description |
|---|---|---|
| resource | object | Created AidboxTask resource. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | object | false | |
| filter.includeDefinitions | string[] | false | Array of task definitions to include. |
| filter.excludeDefinitions | string[] | false | Array of task definitions to exclude. |
| filter.status | string | false | Include task with specified status. Possible values: created, waiting, ready, requested, in-progress, done |
| filter.outcome | string | false | Include task with status done and specified outcome.Possible values: succeeded, failed, canceled |
| filter.ilike | string | false | ilike search by resource content |
| sort | object | false | May contain either createdAt or lastUpdated. |
| sort.createdAt | string | false | Sorts result by createdAt DateTime.Possible values: asc, desc |
| sort.lastUpdated | string | false | Sorts result by lastUpdated DateTime.Possible values: asc, desc |
| Parameter | Type | Description |
|---|---|---|
| resources | object[] | Created AidboxTask resources. |