How to develop a Workflow Definition in TypeScript
Workflow Definitions are just functions, which can store state and orchestrate Activity Functions.
The following code snippet uses proxyActivities
to schedule a greet
Activity in the system to say hello.
A Workflow Definition can have multiple parameters; however, we recommend using a single object parameter.
type ExampleArgs = {
name: string;
};
export async function example(
args: ExampleArgs
): Promise<{ greeting: string }> {
const greeting = await greet(args.name);
return { greeting };
}