Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot return value of WorkflowLocal var from query method #1120

Open
Tracked by #778
tsurdilo opened this issue Apr 4, 2022 · 0 comments
Open
Tracked by #778

Cannot return value of WorkflowLocal var from query method #1120

tsurdilo opened this issue Apr 4, 2022 · 0 comments
Labels
enhancement User experience

Comments

@tsurdilo
Copy link
Contributor

tsurdilo commented Apr 4, 2022

Query method:

     @Override
     public String queryGreeting() {
         return greeting.get();
     }

where greeting is

    private WorkflowLocal<String> greeting = WorkflowLocal.withInitial(() -> "hello");

When a client calls queryGreeting SDK fails with:

     Caused by: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: java.lang.Error: Called from non workflow or workflow callback thread
@tsurdilo tsurdilo added the enhancement User experience label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement User experience
Projects
None yet
Development

No branches or pull requests

1 participant