Workflow is a process orchestrated to run a sequence of tasks such as running a program, sending an e-mail, executing a SQL query, etc. The tasks are executed according to a pre-defined order, following a custom logic which decides what path must be activated under what conditions.
You can also specify what should happen at each step if a task runs successfully or returns an error in a workflow. You can also route the workflow by using a Boolean condition suitable to your scenario. You can even nest another workflow or a dataflow within your workflow.
Once designed, a workflow can be deployed on the server and scheduled to run automatically as per the specified time and frequency.
To create a workflow in Astera, go to the menu bar at the top and select File > New > Workflow.
Yes, you can perform workflow actions based on the decision whether a file has data or not. This can be done using an Aggregate object in a dataflow to calculate record count and pass it as an output variable in the workflow.
Dataflow:
Workflow:
The following steps allow you to perform workflow actions based on whether a file has records or not:
In the dataflow, map a source field to an Aggregate transformation, setting the aggregate function for that field to Count.
Then, map that field from the Aggregate transformation to an Expression where you would set this field to a variable.
Define an output variable for this field in a local variables object.
In your workflow, configure a Run Dataflow Task for your dataflow, the output variable will appear in the object.
Place a Decision task after the Run Dataflow task.
Specify the condition that Count variable should be greater than 0.
Map the Yes port to the task that should be performed if the file has records.
Map the No port to the task that should be performed if the file does not have records. Either of these ports can be left unmapped if you don’t want a task to be performed for that decision outcome.
Note: This process might impact performance when handling large datasets. Although we only need to determine if there are any records (0 or more), the system will process the entire dataset.
Triggering an error notification email if one or more tasks fail from a set of multiple tasks is a common use case. Multiple incoming workflow links to a workflow task object by default operate with AND combination logic.
In the following workflow, if all of the linked tasks, RunDataflow, RunDataflow1, and RunDataflow2, fail, the SendMail task will be triggered.
If you want SendMail to be triggered if one or more tasks fail, you can use the OR object. With this flow, if one or more of the dataflows fail, the OR object will return a True, and the error notification email will be triggered.