diff --git a/src/Internal/Client/WorkflowStub.php b/src/Internal/Client/WorkflowStub.php index 2e35657b..2f257c7d 100644 --- a/src/Internal/Client/WorkflowStub.php +++ b/src/Internal/Client/WorkflowStub.php @@ -330,7 +330,7 @@ static function ( arguments: EncodedValues::fromValues($args, $this->converter), header: Header::empty(), waitPolicy: $nameOrOptions->waitPolicy, - updateId: $nameOrOptions->updateId ?? '', + updateId: $nameOrOptions->updateId ?? Uuid::v4(), firstExecutionRunId: $nameOrOptions->firstExecutionRunId ?? '', resultType: $nameOrOptions->resultType, )); diff --git a/tests/Functional/Client/UpdateOnTimeSkippingServerTestCase.php b/tests/Functional/Client/UpdateOnTimeSkippingServerTestCase.php new file mode 100644 index 00000000..842dbc00 --- /dev/null +++ b/tests/Functional/Client/UpdateOnTimeSkippingServerTestCase.php @@ -0,0 +1,41 @@ +createClient(); + $workflow = $client->newWorkflowStub(UpdateWorkflow::class); + + $client->start($workflow); + + /** @see UpdateWorkflow::addNameWithoutValidation */ + $result = $workflow->__getUntypedStub() + ->startUpdate('addNameWithoutValidation', 'Test') + ->getResult(5); + + self::assertSame('Hello, Test!', $result); + + $workflow->exit(); + } +}