Step 1: First Workflow Application
Let’s build a workflow for the sample banking use case - deposit funds into a customer account and notify them via email and SMS about the status. This workflow has three steps: record the deposit, send an email, and send sms. For this example, let's assume there are REST (HTTP) endpoints you can invoke to run these functions.
Conductor supports many ways to implement the steps, such as HTTP endpoints, workers, inline code, and serverless functions. We can mix and match these too!
We can create workflows using multiple methods, such as UI, Code, etc. We will start with the UI.
You can run this workflow to see how it executes. If there are failures, Conductor will retry them automatically and ensure that the workflow is completed.
Let’s send SMS and Email in parallel instead of sequentially
- In your current workflow, add a Fork Join task after the deposit task.
- Add the SMS and email tasks as fork tasks.
- Join the two fork tasks using the join operation.
- Run workflow.
- Passing inputs into workflow for tasks.
- Passing the output of one task to the input of another.
- Running custom worker code (instead of HTTP endpoints)
- Conditional task executions
- Running a dynamic set of tasks in parallel
- Configuring retries for your task