# Logic of Creating and Running a Task

**URL:** <https://forum.alumio.com/t/logic-of-creating-and-running-a-task/168>\
**Category:** General\
**Tags:** tasks\
**Created:** [October 3, 2022, 11:48am UTC](https://forum.alumio.com/t/logic-of-creating-and-running-a-task/168 "2022-10-03T11:48:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alumio\_Bot](https://forum.alumio.com/user_avatar/forum.alumio.com/alumio_bot/32/1824_2.png) [@Alumio\_Bot](https://forum.alumio.com/u/Alumio_Bot)\
**Post date:** [October 3, 2022, 11:48am UTC](https://forum.alumio.com/t/logic-of-creating-and-running-a-task/168/1 "2022-10-03T11:48:57Z")

</div>

### **Introduction**

This article explains the logic and order of running a task and a route in it.

 ![dBCKYHoJCdYv6-I6cnbVyLNeabJiMnMspw](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/1X/9589281631d82f4894079e6da389435a820212e7.png)

To start a task, you need to run an **[incoming configuration](https://support.alumio.com/en/support/solutions/articles/80000949233)**. A **task** is only created when the **incoming configuration** is connected to a **[route](https://support.alumio.com/en/support/solutions/articles/80000949226)**. While running the incoming configuration the **[entity transformer](https://support.alumio.com/en/support/solutions/articles/80000949591)** connected to the **incoming configuration** is executed, followed by the **entity transformers** in the connected route(s). Now a task is created.

Afterward, when you run a **route** that holds tasks for that route, the **entity transformer** in the **[outgoing configuration](https://support.alumio.com/en/support/solutions/articles/80000949239)** is executed, following by the **publisher** configured. And therefore the task is performed. These **entity transformers** are used to map and/or manipulate the data.

> If you check the box “enable real-time processing” in the **incoming configuration** it will run both **incoming configuration** and a **route** (but you still need to run an incoming configuration to create a task).

### **Stages of running a task**

So, you run an incoming configuration. What happens during this process?

Run an incoming configuration:

- The input transformer is executed
- It runs the [**incoming configuration**](https://support.alumio.com/en/support/solutions/articles/80000949233)(i.e. HTTP subscriber URI: /get/posts?date=&{today})
- The data is mapped and/or manipulated by the [**entity transformer**](https://support.alumio.com/en/support/solutions/articles/80000949591)
- The [**entity transformer**](https://support.alumio.com/en/support/solutions/articles/80000949591) in a [**route**](https://support.alumio.com/en/support/solutions/articles/80000949226) is executed
- **Tasks** with the status “new” have been created for the connected routes.

Run a [**route**](https://support.alumio.com/en/support/solutions/articles/80000949226) that contains tasks with the status “new”:

- The outgoing [**entity transformer**](https://support.alumio.com/en/support/solutions/articles/80000949591) is executed
- It runs the [**outgoing configuration**](https://support.alumio.com/en/support/solutions/articles/80000949239) (i.e. HTTP Publisher URI: /create/post)
- The **task** now contains the status “Finished”, ”Skipped”, or “Failed”.

While you run a [**route**](https://support.alumio.com/en/support/solutions/articles/80000949226), only the [**entity transformers**](https://support.alumio.com/en/support/solutions/articles/80000949591) within the [**outgoing configuration**](https://support.alumio.com/en/support/solutions/articles/80000949239) are left to be executed together with the **publisher**.

After this, the **task** changes its status to “Finished”.

> You can also create an **input transformer**. It is executed before the actual incoming configuration. You can use it to construct dynamic data you need to pass with a request, such as today’s date.
