# Workflows

The *Workflows* menu allows you to schedule various tasks and execute them at a specific date and time. This allows the execution of different Extractors and Transformers, so that they are tightly chained together.

## Creating a Workflow

To create a new Workflow, go to '*Data Pipelines*' > '*Workflows*', then click the green button labeled '*Create Workflow*'. Then create one or more *New Schedule* intervals:

![](https://2905039365-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHEKskLK6aXinV75Knl%2F-MeR1UhT3_3fzG33XDEY%2F-MeR2b4cfbg0NqoD-mzs%2Fimage.png?alt=media\&token=be482d24-88b2-49c0-9e0a-2889a19c7e4b)

Then add one or more steps that should be executed:

![](https://2905039365-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHEKskLK6aXinV75Knl%2F-MeR1UhT3_3fzG33XDEY%2F-MeR33X7R-mfxALsonoT%2Fimage.png?alt=media\&token=7f50a4e4-d25d-432f-b0d5-a8cbdb7c1e57)

* Provide a meaningful N**ame** for the Workflow
* Optionally you can provide a detailed **Description**
* Set the **Type** of the step using the drop-down menu
* Provide the option that goes with the selected **Type**. This can be your Extractor, Transformer, Report or another name
* Depending on the selected Step Type, you can provide an offset date. This value is used during the execution of that step. Typically this would be used for a **From** date offset (i.e. **-1** for yesterday)
* A **To** date offset can be provided for some step types (i.e. **0** for today)
* In case multiple steps need to be executed in parallel, you may choise to remove the **Wait** checkbox.&#x20;
* Additional arguments can be sent to the step. This applies only to some **Extractors** and when executing a custom **Command**

You can delete a step using the bin icon in the right upper corner. To execute a workflow click the *Run Now* button:

![](https://2905039365-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHEKskLK6aXinV75Knl%2F-MeR1UhT3_3fzG33XDEY%2F-MeR3ZOojgzcs9YbYB_n%2Fimage.png?alt=media\&token=11951a96-e4f0-49c0-8a50-0d9acfb0bd91)

Bear in mind that the selected date will be influenced by date offsets difined in any given step. To view historical Workflow results, click the **Status** tab.

### Special Workflow Steps

Apart from adding *Extractor*, *Transformer* and *Report* steps, there are a few other special *Workflow* Step types:

![](https://2905039365-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHEKskLK6aXinV75Knl%2F-MeR1UhT3_3fzG33XDEY%2F-MeR4KXCHlG2jDG4cd0Z%2Fimage.png?alt=media\&token=1c30290f-f2f4-4089-8f47-76b295a8fb49)

#### Publish Report

This step type will trigger a Publish Report event, which can be consumed by the notification engine.

#### Evaluate Budget

This step type will evaluate all budgets, which can be consumed by the notification engine.

#### Execute

The Execute step enables you to execute an external command, like a script:

![Call external commands or scripts](https://2905039365-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LHEKskLK6aXinV75Knl%2F-Lhtxxm9bITzQXOC661o%2F-LNPtR2AV9DTUYWeRoNY%2Fimage.png?generation=1561119429777641\&alt=media)

As an example: you could run a Powershell script to obtains some data from a special data source that Exivity Extractors are not able or allowed to connect to. This script could be executed the following manner:

```
powershell.exe "D:\script\special.ps1" ((get-date).addDays(-1)).ToString("""yyyyMMdd""")
```

The above command calls the Powershell executable to run the *special.ps1* script, with a dynamically generated parameter that is evaluated at run time. This particular example always provides yesterdays date in *yyyyMMdd* format as a parameter to the *special.ps1* script. Many other variations and scripting languages are possible. Feel free to experiment.
