ReferenceWorkflow.commit() The .commit() method re-initializes the workflow’s state machine with the current step configuration. Usage workflow.step(stepA).then(stepB).commit(); Returns workflow:LegacyWorkflowThe workflow instance Related Branching Paths example Workflow Class Reference Step Reference Control Flow Guide Mastra Class