Skip to content

Workflow.getVersion causing following getVersion call become defaultVersion #522

Closed
@vancexu

Description

@vancexu

Repro using sample HelloActivity:

    public String getGreeting(String name) {
      int version = Workflow.getVersion("cid1", Workflow.DEFAULT_VERSION, 1);
      System.out.println(version);
      return activities.composeGreeting("Hello", name);
    }

Start a run and see version is 1.
Then save the history and change the workflow to:

    public String getGreeting(String name) {

      int versionNew = Workflow.getVersion("cid2", Workflow.DEFAULT_VERSION, 1);
      System.out.println(versionNew);
      int version = Workflow.getVersion("cid1", Workflow.DEFAULT_VERSION, 1);
      System.out.println(version);
      return activities.composeGreeting("Hello", name);
    }

Run the HelloActivityReplayTest, the output is -1 -1, while the expected result should be -1, 1.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions