client.ListWorkflow(), called from an activity

Looking at https://github.com/temporalio/samples-go/blob/master/searchattributes/searchattributes_workflow.go we can see c.ListWorkflow() being called from an activity.

Looking at the source code client.go we find the following comment

// Package client is used by external programs to communicate with Temporal service.
// NOTE: DO NOT USE THIS API INSIDE OF ANY WORKFLOW CODE!!!

I assume I can call this API just fine from outside of a workflow - but is it indeed ok to call it inside as well?

I assume the answer is: “activities are not part of the workflow, so this is fine”

Workflow client internally makes gRPC calls to the Temporal service and it can’t be used directly in workflow code (these calls can break workflow determinism). You can use inside Activities, yes.