toWorkflow

@ApiStatus.Experimental
inline fun <SVC : Any> ScopedClient.toWorkflow(key: String): KClientRequestBuilder<SVC>

PREVIEW: Create a builder for invoking a Restate workflow within the given scope.

Return

a builder for creating typed requests

Parameters

key

the key identifying the specific workflow instance

Type Parameters

SVC

the workflow class annotated with @Workflow

See also


Create a builder for invoking a Restate workflow.

Example usage:

val response = client.toWorkflow<MyWorkflow>("workflow-123")
.request { run("input") }
.call()

Return

a builder for creating typed requests

Parameters

key

the key identifying the specific workflow instance

Type Parameters

SVC

the workflow class annotated with @Workflow