dhiaayachi / temporal

Temporal service
https://docs.temporal.io
MIT License
0 stars 0 forks source link

Query at a specific WorkflowTaskStarted eventId #428

Open dhiaayachi opened 2 months ago

dhiaayachi commented 2 months ago

Is your feature request related to a problem? Please describe. For debugging purposes, it is useful to know a query result at a specific point of workflow execution.

As a separate feature, It would be nice to be able to get a query result at each WorkflowTaskStarted event as a single API call. This would be very helpful in a certain troubleshooting scenarios.

Describe the solution you'd like Add "WorkflowTaskStartedEventId" argument to query request. The workflow should be replayed up to that event id and a query should be executed against it.

Add a new API that returns a list of query results. One result per WorkflowTaskStarted eventId.

Additional context This would allow querying terminated workflows safely.

dhiaayachi commented 2 months ago

Thank you for the feature request!

It's a great idea to have the ability to query a workflow at specific events for debugging purposes.

You can try to achieve this by using the tctl workflow show command, and specifying an event Id. This will allow you to retrieve information about a specific event in the workflow's history.

While this might not be exactly the solution you're looking for, it can be a useful workaround in many cases. We appreciate your feedback and will consider this feature for future releases.

dhiaayachi commented 2 months ago

Thank you for your feature request! This is a great idea and would be helpful for debugging workflows. Currently, there is no direct way to query a workflow at a specific event ID using tctl.

As a workaround, you can achieve a similar effect by using tctl workflow show --event_id <event_id> to view the event history of the workflow up to the specified event ID.

We will consider your feature request for future releases.