withStartToCloseTimeout(5) ); if ($generation > 5) { // complete return "OK" . $generation; } if ($generation !== 1) { assert(!empty(Workflow::getInfo()->continuedExecutionRunId)); } for ($i = 0; $i < $generation; $i++) { yield $simple->echo((string)$generation); } return Workflow::continueAsNew('ContinuableWorkflow', [++$generation]); } }