Skip to content

Commit 6e0cc7f

Browse files
committed
Expose GetWorkflowInstanceState from client
Closes: #345
1 parent d404770 commit 6e0cc7f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

client/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ func (c *Client) SignalWorkflow(ctx context.Context, instanceID string, name str
151151
return nil
152152
}
153153

154+
// GetWorkflowInstanceState returns the current state of the given workflow instance
155+
func (c *Client) GetWorkflowInstanceState(ctx context.Context, instance *workflow.Instance) (core.WorkflowInstanceState, error) {
156+
return c.backend.GetWorkflowInstanceState(ctx, instance)
157+
}
158+
154159
// WaitForWorkflowInstance waits for the given workflow instance to finish or until the given timeout has expired.
155160
func (c *Client) WaitForWorkflowInstance(ctx context.Context, instance *workflow.Instance, timeout time.Duration) error {
156161
if timeout == 0 {

0 commit comments

Comments
 (0)