From a64596f53d859000d6f1cfc5d50a332a3e1de681 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 2 Jul 2024 19:43:16 +0400 Subject: [PATCH] Don't send RunId when signal a child workflow --- src/Internal/Workflow/ChildWorkflowStub.php | 2 +- tests/Fixtures/data/Test_SignalChildViaStubWorkflow.log | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Internal/Workflow/ChildWorkflowStub.php b/src/Internal/Workflow/ChildWorkflowStub.php index 87fdfee5..06404bfa 100644 --- a/src/Internal/Workflow/ChildWorkflowStub.php +++ b/src/Internal/Workflow/ChildWorkflowStub.php @@ -127,7 +127,7 @@ function (WorkflowExecution $execution) use ($name, $args) { $request = new SignalExternalWorkflow( $this->getOptions()->namespace, $execution->getID(), - $execution->getRunID(), + null, $name, EncodedValues::fromValues($args), true, diff --git a/tests/Fixtures/data/Test_SignalChildViaStubWorkflow.log b/tests/Fixtures/data/Test_SignalChildViaStubWorkflow.log index 465e8e3a..bf1b5504 100644 --- a/tests/Fixtures/data/Test_SignalChildViaStubWorkflow.log +++ b/tests/Fixtures/data/Test_SignalChildViaStubWorkflow.log @@ -2,7 +2,7 @@ 2021/01/12 15:28:19 DEBUG [{"id":9001,"command":"ExecuteChildWorkflow","options":{"name":"SimpleSignalledWorkflow","options":{"Namespace":"default","WorkflowID":null,"TaskQueueName":"default","WorkflowExecutionTimeout":0,"WorkflowRunTimeout":0,"WorkflowTaskTimeout":0,"WaitForCancellation":false,"WorkflowIDReusePolicy":2,"RetryPolicy":null,"CronSchedule":null,"ParentClosePolicy":1,"Memo":null,"SearchAttributes":null}},"payloads":"","header":""},{"id":9002,"command":"GetChildWorkflowExecution","options":{"id":9001},"payloads":"","header":""},{"payloads":"ChkKFwoIZW5jb2RpbmcSC2JpbmFyeS9udWxs"}] {"receive": true} 2021/01/12 15:28:19 DEBUG [{"id":9002,"payloads":"CngKFgoIZW5jb2RpbmcSCmpzb24vcGxhaW4SXnsiSUQiOiI1MjUxN2Y0YS00YWE3LTQxMmEtYmIzYy05OWI2NjcyZWViNjJfMSIsIlJ1bklEIjoiYjkyN2FhNzUtYTBiNS00ZTAyLTkyMzctZjk2MWY3M2VkYzMzIn0="}] {"taskQueue":"default","tickTime":"2021-01-12T15:28:19.5368724Z"} 2021/01/12 15:28:19 DEBUG [{"command":"StartWorkflow","options":{"info":{"WorkflowExecution":{"ID":"52517f4a-4aa7-412a-bb3c-99b6672eeb62_1","RunID":"b927aa75-a0b5-4e02-9237-f961f73edc33"},"WorkflowType":{"Name":"SimpleSignalledWorkflow"},"TaskQueueName":"default","WorkflowExecutionTimeout":0,"WorkflowRunTimeout":0,"WorkflowTaskTimeout":0,"Namespace":"default","Attempt":1,"CronSchedule":"","ContinuedExecutionRunID":"","ParentWorkflowNamespace":"default","ParentWorkflowExecution":{"ID":"2445f473-d974-4705-9bba-daac1f557615","RunID":"52517f4a-4aa7-412a-bb3c-99b6672eeb62"},"Memo":null,"SearchAttributes":null,"BinaryChecksum":"464f326cee4654e3d40d9f42fe0f90f7"}}}] {"taskQueue":"default","tickTime":"2021-01-12T15:28:19.538353Z"} -2021/01/12 15:28:19 DEBUG [{"id":9003,"command":"SignalExternalWorkflow","options":{"namespace":"default","workflowID":"52517f4a-4aa7-412a-bb3c-99b6672eeb62_1","runID":"b927aa75-a0b5-4e02-9237-f961f73edc33","signal":"add","childWorkflowOnly":true},"payloads":"ChsKFgoIZW5jb2RpbmcSCmpzb24vcGxhaW4SATg=","header":""}] {"receive": true} +2021/01/12 15:28:19 DEBUG [{"id":9003,"command":"SignalExternalWorkflow","options":{"namespace":"default","workflowID":"52517f4a-4aa7-412a-bb3c-99b6672eeb62_1","runID":null,"signal":"add","childWorkflowOnly":true},"payloads":"ChsKFgoIZW5jb2RpbmcSCmpzb24vcGxhaW4SATg=","header":""}] {"receive": true} 2021/01/12 15:28:19 DEBUG [{"id":9004,"command":"NewTimer","options":{"ms":1000},"payloads":"","header":""},{"payloads":"ChkKFwoIZW5jb2RpbmcSC2JpbmFyeS9udWxs"}] {"receive": true} 2021/01/12 15:28:19 DEBUG [{"command":"InvokeSignal","options":{"runId":"b927aa75-a0b5-4e02-9237-f961f73edc33","name":"add"},"payloads":"ChsKFgoIZW5jb2RpbmcSCmpzb24vcGxhaW4SATg="}] {"taskQueue":"default","tickTime":"2021-01-12T15:28:19.5630689Z"} 2021/01/12 15:28:19 DEBUG [{"payloads":"ChkKFwoIZW5jb2RpbmcSC2JpbmFyeS9udWxs"}] {"receive": true}