Workflow define with dsl, when i invoke querymethod, it throw unhandledcommand

when i invoke querymethod, it Occasionally throw below error

and then workflow failed

@xust_software

The error indicates that your code is non-deterministic, have you changed your workflow code?

Please see:

Querymethod doesn’t change the workflow code

We use DAG to define our workflow, branches execute concurrency. Maybe It affect the code deterministic. How can I control the DAG execute sequence to avoid that problem?

Hi @xust_software

I don’t think that the error is related to the fact that you use DAG to define your workflows.

I think that the problem is that your workflow code/DAG has changed and there is a Workflow Execution open with the previous version of the code. Might it be the case?

Hi @antonio.perez
I’m sure the workflow only has one version. When I don’t invoke querymethod,the workflow success finished. As soon as I invoke querymethod multi times,The workflow failed. The query methods doesn’t have any logic, just return variablies.

Besides,even if the workflow success complete, when I open the query tab on the web page, It’s display “No queries registered”. But other type workflows still can invoke query method

Hi @xust_software

I am gonna try to reproduce it.

Can I ask the SDK version and server version tctl admin cl d | jq '.serverVersion' that you are using?

even if the workflow success complete, when I open the query tab on the web page, It’s display “No queries registered”

In web ui (v1 or v2) queries are only available while the workflow execution is running. We opened issue here so this feature gets added in future releases.

we are using temporal 1.16.1 and java sdk 1.9.1

1 Like

Hi @xust_software I am not been able to reproduce your issue.

Can you ensure your code is deterministic? Could you check these constraints please Application development foundations | Temporal Documentation?