Hello
Recently we’ve upgraded SDK version from 1.25.0
to 1.35.0
.
During the upgrade we’ve switched from using the deprecated SearchAttributes
with TypedSearchAttributes
.
It’s working just fine when we update search attributes in the Workflow definition itself, though the attributes we pass through StartWorkflowOptions
to Client.SignalWithStartWorkflow
are ignored. We cannot see their value in the UI (v2.27.0
).
It used to work in version 1.25.0
with the SearchAttributes
option.
Here’s an example:
func createSearchAttributes(c *gin.Context, accountId, paymentId string) temporal.SearchAttributes {
accountIdSA := temporal.NewSearchAttributeKeyString(enums.WorkflowSearchAttributes.AccountId)
paymentIdSA := temporal.NewSearchAttributeKeyKeyword(enums.WorkflowSearchAttributes.PaymentId)
sa := temporal.NewSearchAttributes(
accountIdSA.ValueSet(accountId),
paymentIdSA.ValueSet(paymentId),
)
return sa
}
sa := createSearchAttributes(c, signalPayload.DestinationAccountId, paymentId)
options := client.StartWorkflowOptions{
ID: wid,
TaskQueue: taskQueueName,
WorkflowIDReusePolicy: tenums.WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING,
TypedSearchAttributes: sa
}
temporalClient.SignalWithStartWorkflow(ctx, wid, "MySignal", "MySignalArg", options, workflowTypeName)
// ...