Class WorkflowHandlers

java.lang.Object
dev.gmitch215.bytebox.workflow.WorkflowHandlers

public final class WorkflowHandlers extends Object
What the generated Workflow exports call.

Not part of the surface a project writes against. It is public because generated code in another package calls it.

Since:
1.0.3
  • Method Details

    • run

      public static org.teavm.jso.core.JSPromise<TSObject> run(WorkflowEntrypoint flow, WorkflowEvent event, Step step, Env env)
      Runs one Workflow instance on a fiber.
      Parameters:
      flow - the Workflow
      event - what started the instance
      step - the durable steps
      env - the bindings
      Returns:
      the output, once run has returned
    • run

      public static org.teavm.jso.core.JSPromise<TSObject> run(Supplier<? extends WorkflowEntrypoint> factory, WorkflowEvent event, Step step, Env env)
      Builds one Workflow instance and runs it, both on the same fiber.

      The form the generated entry point calls, so a constructor that locks, joins or waits works. A constructor that throws rejects the promise.

      Parameters:
      factory - how to build the Workflow
      event - what started the instance
      step - the durable steps
      env - the bindings
      Returns:
      the output, once run has returned
      Since:
      1.0.3