Skip to main content
Version: 2.0 prerelease

Starting Workflows

To start a workflow, create a workflow instance and then call the start() method on it.

use Workflow\V2\WorkflowStub;

$workflow = WorkflowStub::make(MyWorkflow::class);
$workflow->start();

Once a workflow has been started, it will be executed asynchronously by a queue worker. The start() method returns immediately and does not block the current request.

Pass arguments to the workflow's handle() method through start():

$workflow->start($orderId);

You can attach visibility labels, a business key, memo, or timeouts through StartOptions. See Start Options when you need them.