new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Temporal · Develop · all subjects

visibility

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Default Search Attributes in Temporal

Default Search Attributes like WorkflowType, StartTime, and ExecutionStatus are automatically added to all Workflow Executions without requiring manual configuration.

Set custom Search Attributes when starting a Workflow in .NET

To set custom Search Attributes when starting a Workflow, use the TypedSearchAttributes property on WorkflowOptions for StartWorkflowAsync or ExecuteWorkflowAsync. TypedSearchAttributes is a SearchAttributeCollection created with a builder pattern using SearchAttributeKey.CreateKeyword() or other type methods, then calling Set() and ToSearchAttributeCollection().

Upsert Search Attributes from within Workflow in .NET

Within Workflow code, use the UpsertTypedSearchAttributes() method to add, update, or remove Search Attributes. Pass a set of updates using the pattern: attributeKey.ValueSet(value) to add/update or attributeKey.ValueUnset() to remove. Keys are typically defined as static readonly for reuse.

List Workflow Executions with filters in .NET

Use the ListWorkflowsAsync() method on the Client and pass a List Filter as an argument to filter the listed Workflows. The result is an async enumerable that can be iterated with await foreach.

Read Search Attribute values in .NET

Search Attribute values can be read on the Client by calling Describe on a WorkflowHandle, or within a Workflow by looking at WorkflowInfo.

Create and reuse SearchAttributeKey in .NET

SearchAttributeKey instances are created using factory methods like SearchAttributeKey.CreateKeyword(name) or SearchAttributeKey.CreateText(name). These keys only need to be created once and are typically stored as static readonly fields for reuse across multiple operations.

Give your agent this brain