Flows API
  • Globus Flows
  • Overview
  • Getting Started
    • How to Run a Flow
    • How to Monitor a Flow Run
    • How to Create a Flow
    • How to Manage High Assurance Flows
  • Authoring Flows
    • Introduction
    • Actions
    • Expressions
    • Choice States
    • Wait States
    • CreateWebInput States
    • AwaitWebInput States
    • Fail States
    • Pass States
    • Protecting Secrets
    • Handling Exceptions
    • Performing Actions as Different Users
    • Run Context
    • Validating Flow Definitions
    • High Assurance Flows
  • Authoring Input Schemas
  • Registered APIs
    • Feature Overview
    • Tutorials
    • Explanations
    • How-tos
    • Reference
    • The Globus Registered API CLI
  • Web Inputs
    • Feature Overview
    • Controlling Access
    • Notifying Respondents
    • Responding
  • Authentication and Authorization
  • Consents and Resuming Runs
  • Permissions
  • Limits
  • Hosted Registered APIs
    • Usage notes
    • Globus Groups Registered APIs
    • Globus Search Registered APIs
  • Hosted Action Providers
    • Hello World
    • Globus Search - Ingest Task
    • Globus Search - Delete Task
    • Send Notification Email
    • Wait For User Selection
    • Expression Evaluation
    • DataCite Mint
    • Transfer APs
    • Compute AP
  • Example Flows
    • Simple Transfer
    • Move (copy and delete) files
    • Transfer and Share Files
    • Two Stage Globus Transfer
    • Transfer After Approval
    • Looping Batched Move
    • Tar and Transfer with Globus Compute
Skip to main content
Globus Docs
  • Getting Started
    Getting Started

    Getting Started and Tutorial docs cover how to perform some activity or provide an introduction to a feature. They are not comprehensive, but help you get started with Globus or with new Globus features.

    • Users
    • Admins
    • Developers
  • Reference
    Reference
    • Service
      • Auth
      • Groups
      • Transfer
      • Timers
      • Flows
      • Compute
      • Search
    • Agents
      • Globus Connect Server
      • GCS CLI
      • Globus Connect Personal
      • Globus Compute
    • SDK
      • Python
      • JavaScript/TypeScript
    • Clients
      • CLI
    • Security and Compliance
      • Product Security
      • Privacy
      • Solutions for Sensitive Data
      • FAQs
  • Solutions & Guides
    Solutions & Guides

    Find practical approaches for leveraging Globus in research environments, integrating with platforms, and building science gateways. Access hands-on guides, integration instructions, and real-world scenarios for advanced usage.

    • Portals/Science Gateways
    • Guides
  • Support
    Support

    Find answers to frequently asked questions, connect with the community by joining our mailing lists, or reach out directly to Globus support.

    • FAQs
    • Mailing Lists
    • Contact Us
    • Check Support Tickets
  • Site Search
  1. Home
  2. Globus Services
  3. Globus Flows
  4. Authoring Flows
  5. AwaitWebInput States

AwaitWebInput States

An AwaitWebInput state blocks the flow run until a respondent submits a response to the referenced web input. Once a response is received, the response value is placed into the run’s state and execution continues.

If no response is submitted within 10 days, the state times out and the run ends with an error.

For an overview of the web input feature, see Web Inputs.

Fields

Type (required)

Must be "AwaitWebInput".

Parameters (required)

An object identifying the web input to wait for.

Parameters.WebInputId (required)

The ID of the web input to await. This will almost always be a JSONPath reference to the output of a preceding CreateWebInput state. For example: "WebInputId.$": "$.create.web_input_id".

InputPath (optional)

A JSONPath expression that selects a portion of the run’s state to pass as input to the state’s parameters. If omitted, the entire run state is passed as input.

ResultPath (optional)

A JSONPath expression indicating where the response data will be placed in the run’s state. The result object includes a response field containing the Value of the option the respondent selected. If omitted, the default is $.

Catch (optional)

An array of error handling objects that specify how to handle errors that occur in this state. See Error Handling.

Next or End (one required)

Next specifies the name of the following state. End: true indicates that the run terminates after this state completes.

Timeout

An AwaitWebInput state times out after 10 days with no response. When a timeout occurs, the state exits with an error of type Flows.WebInputExpired. Add a Catch clause to handle the timeout and transition to a recovery state instead.

{
  "WaitForApproval": {
    "Type": "AwaitWebInput",
    "Parameters": {
      "WebInputId.$": "$.create_result.web_input_id"
    },
    "ResultPath": "$.await_result",
    "Catch": [
      {
        "ErrorEquals": [
          "Flows.WebInputExpired"
        ],
        "ResultPath": "$.timeout_error",
        "Next": "HandleTimeout"
      }
    ],
    "Next": "CheckResponse"
  }
}

Examples

This example awaits a web input created in a prior state, then uses a Choice state to branch based on the respondent’s selection.

{
  "WaitForApproval": {
    "Type": "AwaitWebInput",
    "Parameters": {
      "WebInputId.$": "$.create_result.web_input_id"
    },
    "ResultPath": "$.await_result",
    "Next": "CheckResponse"
  },
  "CheckResponse": {
    "Type": "Choice",
    "Choices": [
      {
        "Variable": "$.await_result.response",
        "StringEquals": "approve",
        "Next": "ProceedWithOperation"
      },
      {
        "Variable": "$.await_result.response",
        "StringEquals": "deny",
        "Next": "CancelOperation"
      }
    ]
  }
}
  • Globus Flows
  • Overview
  • Getting Started
    • How to Run a Flow
    • How to Monitor a Flow Run
    • How to Create a Flow
    • How to Manage High Assurance Flows
  • Authoring Flows
    • Introduction
    • Actions
    • Expressions
    • Choice States
    • Wait States
    • CreateWebInput States
    • AwaitWebInput States
    • Fail States
    • Pass States
    • Protecting Secrets
    • Handling Exceptions
    • Performing Actions as Different Users
    • Run Context
    • Validating Flow Definitions
    • High Assurance Flows
  • Authoring Input Schemas
  • Registered APIs
    • Feature Overview
    • Tutorials
    • Explanations
    • How-tos
    • Reference
    • The Globus Registered API CLI
  • Web Inputs
    • Feature Overview
    • Controlling Access
    • Notifying Respondents
    • Responding
  • Authentication and Authorization
  • Consents and Resuming Runs
  • Permissions
  • Limits
  • Hosted Registered APIs
    • Usage notes
    • Globus Groups Registered APIs
    • Globus Search Registered APIs
  • Hosted Action Providers
    • Hello World
    • Globus Search - Ingest Task
    • Globus Search - Delete Task
    • Send Notification Email
    • Wait For User Selection
    • Expression Evaluation
    • DataCite Mint
    • Transfer APs
    • Compute AP
  • Example Flows
    • Simple Transfer
    • Move (copy and delete) files
    • Transfer and Share Files
    • Two Stage Globus Transfer
    • Transfer After Approval
    • Looping Batched Move
    • Tar and Transfer with Globus Compute
© 2010- The University of Chicago Legal Privacy Accessibility