const mywf = workflow({
name: "mywf",
handlers: {
run: async (ctx: WorkflowContext, argument: any) => {
return "Hello World";
}
}
});
const client = ctx.workflowClient<typeof mywf>({ name: "mywf"});
const res = await client.run("Hello");
To use the workflow client from any other environment (like a browser), please refer to the documentation. https://docs.restate.dev
Define a Restate workflow.