# Task

- A task is the smallest unit of work executed by the [Scenario Engine](./scenario-engine.md).
- A task is a program implemented to define each step of a [Scenario](./scenario.md).
- It is advisable to implement tasks with simple and clear functions, avoiding complex combinations of features.
- To support various information and functionalities needed for task implementation, the scenario provides a [Scenario Context](./scenario-context.md).
- Types of tasks can be distinguished as follows:

## Categories

- Independent Tasks
  - Sleep, Log,
  - Publish - notify data with tag to subscribers
- Flow Control Tasks
  - Goto Step: Map, Range, ..
  - Sub Scenario: Map, Range, ..
  - Throw
  - End
- [Connection](./connection.md) Based Tasks
  - database-query
  - graphql-query, mutator
  - mqtt: subscribe/publish
  - indydcp: Indy7 robot control
  - modbus: read/writes..
  - robotics related: camera, markers, ..
