# Decision Task

A *Decision* task invokes one of the two paths in the workflow, depending on whether the logical expression inside the *Decision* object returns a Yes (True) or a No (False) flag.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2Fc78bu8ZhWm61eqFSu7Pv%2F0.png?alt=media)

To use a *Decision* task:

1. Drag and drop the *Decision* object onto the workflow designer. Configure the object by right-clicking on the object’s header and selecting *Properties* from the context menu.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FztZHTinVi4DN8NFvShed%2F1.png?alt=media)

2. This will open the *Decision Properties* window. The configuration window provides the interface to create some decision logic.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FzfLqe7lQnJbvm72DP5xa%2F2.png?alt=media)

3. In the *Expression* input box, enter an expression. This expression should return a Boolean result, such as True or False. An example of this expression is shown below. The expression here is based on the presence of erroneous records in a *Run* *Dataflow* task object.

![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2F1uI3tUyLO9bhO0cS1qtO%2F3.png?alt=media)

{% hint style="info" %}
**Note:** The right-hand pane, *Objects,* displays the object tree. You can double-click on an object to add it to your expression.
{% endhint %}

This concludes the configuration of the *Decision* object in Astera.
