Submit Data Button

Discriminator: submitDataButton
Fluent UI Blazor Component: FluentButton

Description

The SubmitDataButton component renders a button that submits collected user input to a flow checkpoint to resume a waiting interactive flow. It collects data from bound components, validates component state, and sends the combined data to the checkpoint's SubmitInteractionAsync method. This component is the primary mechanism for users to provide input during interactive flow executions created by the ShowInteractiveUi instruction.

Example Submit data button within an interactive flow execution

Properties

Property

Type

Required

Default

Description

component

string

✅ Yes

"submitDataButton"

Type discriminator

style

string

No

null

Inline CSS style

id

string

No

null

Component identifier

text

string

No

"Submit"

Button label text

data

JsonObject

No

{}

Static JSON data merged into the combined data and passed as the submission payload

bindings

ButtonDataBinding[]

No

[]

Data bindings to collect input from other components (see LinkButton)

validatesComponents

string[]

No

[]

Component IDs to validate before submitting

Execution Context

The SubmitDataButton requires an active flow execution context to function. Three cascading parameters are provided by the parent interactive flow run page:

Parameter

Type

Description

Checkpoint

IFlowCheckpoint

The flow checkpoint grain that receives the submission via SubmitInteractionAsync

Interaction

WaitForUserInteractionActionInfo

Metadata about the pending interaction, including the action ID and result binding target

SubmitInteraction

EventCallback

Optional callback invoked after a successful submission, providing the action, combined data, and checkpoint ID

When either Checkpoint or Interaction is missing (e.g. the button is used outside a flow execution), the button is disabled and displays a tooltip: "Data can only be submitted in the context of a flow execution."

Submission Flow

When the user clicks the button, the following sequence occurs:

  1. Validation — All components listed in validatesComponents are validated. If any fail, a warning toast is shown and submission is aborted.

  2. Data Combination — Static data is merged with bound component data according to the configured bindings, producing a single JsonObject payload.

  3. Checkpoint Submission — The combined data is sent to the checkpoint via Checkpoint.SubmitInteractionAsync(Interaction.Id, combinedData).

  4. Success — If the checkpoint accepts the submission, the Interaction is marked as submitted and the optional SubmitInteraction callback is invoked.

  5. Failure — If the checkpoint rejects the submission, a warning toast is displayed: "The submission could not be processed. The interaction may have already been completed."

Button State

State

Behavior

Disabled (no context)

When Checkpoint or Interaction is missing, the button is disabled. Tooltip: "Data can only be submitted in the context of a flow execution."

Disabled (no binding)

When the interaction has no result binding target (or a Void target), the button is disabled. Tooltip: "There is no target for data submission."

Enabled

The button is enabled and ready to click. Tooltip: "Submit to continue execution."

Submitted

After a successful submission, the button is permanently disabled. Tooltip: "Data was already submitted."

Preview Mode

When used inside the visual editor, the button is always shown as enabled regardless of context

Note: Unlike FlowStartButton, there is no allowMultipleStarts equivalent. Each SubmitDataButton can only be submitted once per interaction. After submission, the button is permanently disabled and the flow resumes execution.

Data Binding and Input

The combined data (static data merged with bound component data) is submitted as the user input payload to the waiting flow checkpoint. This allows forms, data grids, and other interactive components to feed data back into the flow.

Example: Form → Submit

Rendering...

Example: DataGrid Selection → Submit

Rendering...

Validation

Before submitting, the button validates all components listed in validatesComponents. If any validation errors are found, a warning toast is displayed and the submission is not performed.

Common validation scenarios:

  • JsonSchemaForm: Required fields must be filled, types must match, formats must be valid.

  • DataGrid: The required number of items must be selected.

Preview Mode

When used inside the visual editor, the SubmitDataButton operates in preview mode. The button is always shown as enabled regardless of whether a flow execution context is present. This allows flow authors to test layout and data binding configuration without requiring an active flow execution.

Error Handling

Error

Cause

No execution context

The button is rendered outside of an interactive flow run (Checkpoint or Interaction is null). The button is disabled with an explanatory tooltip

No result binding

The interaction's StoreResultBinding is null or Void. The button is disabled because there is no target for the submitted data

Submission rejected

The checkpoint returned false from SubmitInteractionAsync. The interaction may have already been completed by another tab or session

Already submitted

The interaction was already submitted. The button is permanently disabled

Validation failed

One or more validated components reported errors. A warning toast is shown with the validation messages

Relationship to ShowInteractiveUi Instruction

The SubmitDataButton is typically used within the UI schema of a ShowInteractiveUi flow instruction. When the instruction executes:

  1. The flow enters the Waiting state and raises a pending WaitForUserInteractionActionInfo.

  2. The interactive flow run page detects the pending interaction and renders the UI schema.

  3. The user fills in form fields or makes selections in data grids.

  4. The user clicks the SubmitDataButton to send the collected data back to the checkpoint.

  5. The checkpoint writes the data to the flow environment via the configured result binding and resumes execution.

If the ShowInteractiveUi instruction has no result binding (display-only mode), the flow auto-resumes without requiring user submission. In this case any SubmitDataButton in the UI is disabled.

JSON Examples

Simple Submit

Rendering...

Submit with Static Data

Rendering...

Submit with Bindings and Validation

Rendering...

Submit with Source Path Extraction

Rendering...

See Also