Skip to content

Commit

Permalink
Merge pull request #346 from cschleiden/expose-get-workflow-instance-…
Browse files Browse the repository at this point in the history
…state

Expose GetWorkflowInstanceState from client
  • Loading branch information
cschleiden authored May 16, 2024
2 parents d404770 + 6e0cc7f commit 27bc0fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 27bc0fd

Please sign in to comment.