Is it ok to not provide runner_id when signalling workflow?

Hi! If I start the workflow with WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE

	options := client.StartWorkflowOptions{
		WorkflowIDReusePolicy: enums.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE,
...
	}

Is it safe to signal workflow with only the workflowID?

c.SignalWorkflow(context.Background(),"transfer-money-workflow 298ca4ca-6d23-4980-abfc-3a7d9aaa36c0","","signalName",nil)

My problem is I am unable to pass the runner_id to the thread that will call SignalWorkflow, so I am trying to workaround the issue by only using workflowID to identify workflows.

Yes, this is the default; you do not need to keep track of RunID; it will pick the latest. → Temporal Application development guide | Temporal Documentation

“If only the Workflow Id is supplied (provide an empty string as the Run Id param), the Workflow Execution that is Running receives the Signal.”

2 Likes