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.
while ($workflow->running());
These are the possible values returned by the status() method.
WorkflowCreatedStatus
WorkflowCompletedStatus
WorkflowFailedStatus
WorkflowPendingStatus
WorkflowRunningStatus
WorkflowWaitingStatus
This is the state machine for a workflow status.
