Interface Workflow

All Superinterfaces:
org.teavm.jso.JSObject

public interface Workflow extends org.teavm.jso.JSObject
A Workflows binding. Declared with workflow(), named WORKFLOW by default.

A workflow outlives the request that started it and survives a restart, so this binding starts one and asks after it rather than running it.

Since:
1.0.0
  • Method Details

    • start

      default Workflow.Instance start(TSObject params)
      Starts an instance, letting Cloudflare pick the id.
      Parameters:
      params - the workflow's input
      Returns:
      the new instance
    • start

      default Workflow.Instance start(String id, TSObject params)
      Starts an instance with an id of your own, which makes the call idempotent.
      Parameters:
      id - the instance id
      params - the workflow's input
      Returns:
      the new instance
    • instance

      default Workflow.Instance instance(String id)
      Looks up a running or finished instance.
      Parameters:
      id - the instance id
      Returns:
      the instance
    • create

      org.teavm.jso.core.JSPromise<Workflow.Instance> create(TSObject options)
    • fetchInstance

      org.teavm.jso.core.JSPromise<Workflow.Instance> fetchInstance(String id)