Skip to content

Allow custom workflow names, including for instance methods #1061

@apoliakov

Description

@apoliakov

A user prefers to have this pattern:

interface Workflow<Args, Result> {
  execute(args: Args): Promise<Result>;
}
and the worflow:

export class SomeWorkflow
  extends ConfiguredInstance
  implements Workflow<{ data: Data }, Response> {
  constructor(name: string) {
    super(name);
  } 

  @DBOS.workflow() 
  async execute({ data }: { data: Data }): Promise<Response> {
    // ...workflow code here
  }
}

Want an easy way to name the workflow something other than execute

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions