Skip to content

EDU-3794: add information on how to use the TemporalChangeVersion SA #3285

@antmendoza

Description

@antmendoza

Issue link: https://github.com/temporalio/documentation/issues/3285

Brief description

https://docs.temporal.io/visibility#default-search-attributes mentions that there is an SA called TemporalChangeVersion, but it does not mention how to use it.

Your recommended content

I would like to see a short description of how to use it, like we have with BuildIds

width=200,height=183

The SA value is stored with the following format: changeID + "-" + version

given this code

v := workflow.GetVersion(ctx, "addActivity", workflow.DefaultVersion, 1)

if v == 1 {

    var result string
    err := workflow.ExecuteActivity(ctx, Activity, name).Get(ctx, &result)
    if err != nil {
       logger.Error("Activity failed.", "Error", err)
       return "", err
    }

}

The query that returns the workflow execution with this version will be

TemporalChangeVersion="addActivity-1"

Thank you

Metadata

Metadata

Assignees

Labels

cross-teamThis issue or PR was submitted from within Temporal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions