Package dev.gmitch215.bytebox.workflow
Class WorkflowHandlers
java.lang.Object
dev.gmitch215.bytebox.workflow.WorkflowHandlers
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 Summary
Modifier and TypeMethodDescriptionstatic org.teavm.jso.core.JSPromise<TSObject> run(WorkflowEntrypoint flow, WorkflowEvent event, Step step, Env env) Runs one Workflow instance on a fiber.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.
-
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 Workflowevent- what started the instancestep- the durable stepsenv- the bindings- Returns:
- the output, once
runhas 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 Workflowevent- what started the instancestep- the durable stepsenv- the bindings- Returns:
- the output, once
runhas returned - Since:
- 1.0.3
-