Skip to content

Commit

Permalink
Expose GetWorkflowInstanceState from client
Browse files Browse the repository at this point in the history
Closes: #345
  • Loading branch information
cschleiden committed May 16, 2024
1 parent d404770 commit 6e0cc7f
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 6e0cc7f

Please sign in to comment.