From 6e0cc7f6d792d7d7a2ae2bf2c4f7acb88efb6d10 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Thu, 16 May 2024 21:04:43 +0000 Subject: [PATCH] Expose GetWorkflowInstanceState from client Closes: https://github.com/cschleiden/go-workflows/issues/345 --- client/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/client.go b/client/client.go index 7ab5ff76..0d07eb07 100644 --- a/client/client.go +++ b/client/client.go @@ -151,6 +151,11 @@ func (c *Client) SignalWorkflow(ctx context.Context, instanceID string, name str return nil } +// GetWorkflowInstanceState returns the current state of the given workflow instance +func (c *Client) GetWorkflowInstanceState(ctx context.Context, instance *workflow.Instance) (core.WorkflowInstanceState, error) { + return c.backend.GetWorkflowInstanceState(ctx, instance) +} + // WaitForWorkflowInstance waits for the given workflow instance to finish or until the given timeout has expired. func (c *Client) WaitForWorkflowInstance(ctx context.Context, instance *workflow.Instance, timeout time.Duration) error { if timeout == 0 {