📄️ Workflows
In Laravel Workflow, workflows and activities are defined as classes that extend the base Workflow and Activity classes provided by the framework. A workflow is a class that defines a sequence of activities that run in parallel, series or a mixture of both.
📄️ Activities
An activity is a unit of work that performs a specific task or operation (e.g. making an API request, processing data, sending an email) and can be executed by a workflow.
📄️ Starting Workflows
To start a workflow, you must first create a workflow instance and then call the start() method on it. The workflow instance has several methods that can be used to interact with the workflow, such as id() to get the workflow's unique identifier, status() or running() to get the current status of the workflow, and output() to get the output data produced by the workflow.
📄️ Workflow Status
You can monitor the status of the workflow by calling the running() method, which returns true if the workflow is still running and false if it has completed or failed.
📄️ Workflow ID
When starting a workflow you can obtain the id like this.
📄️ Passing Data
You can pass data into a workflow via the start() method.