Process
<sea-process run-id="…"> selects an existing pipeline run inside Sea context. It loads the run, its step instances, pipeline definition and current output submissions. Its descendants receive updates as the run progresses. Sea context owns their document and citation selection.
Your application starts the run before mounting the process. Widgets receive its run ID. Uploads and completed manual inputs satisfy their selected steps' existing dependencies; remaining blockers still determine when the run can advance.
| Integration | Entry |
|---|---|
| React | SeaProcess from @sea-dev/widget-lit/react/process |
| Without React | @sea-dev/widget-lit/process |
Usage
Set the API host and credential on the required provider:
html
<sea-context api-url="{API_HOST}" bearer-token="{ACCESS_TOKEN}">
<sea-process run-id="{RUN_ID}">
<div class="review-grid">
<sea-file-browser
step-label="data"
view="list"
selection-only
></sea-file-browser>
<sea-form step-label="data"></sea-form>
<sea-source-viewer step-label="data"></sea-source-viewer>
</div>
</sea-process>
</sea-context>sea-process uses display: contents. Place and style its children with host HTML. Compose a review screen shows React and CSS Grid together.
Step binding
A pipeline step's label identifies that step for widget binding, such as data, doc-check or cross-check. Labels must be unique across the run's pipeline steps. A duplicate label produces a configuration error. Its role denotes the step kind, such as extraction, analysis or manual input. step-role constrains that kind while the unique label identifies the step.
Surrounding spaces are ignored when matching labels and selectors.
SeaForm displays a submission's data. Its label and role selectors resolve the corresponding run step's output submission; they do not change how the form renders that data.
Use the following selectors on a widget or an optional step group:
| HTML attribute | React property | Selects |
|---|---|---|
step-role | stepRole | The expected step kind |
step-label | stepLabel | One step by its unique label |
step-id | stepId | One pipeline step definition |
run-step-id | runStepId | One step instance in this run |
output-form-id | outputFormId | Outputs using one form |
output-submission-id | outputSubmissionId | One output submission |
Selectors narrow the same run. A child inherits its nearest step group's selectors. Giving it a step selector replaces the group's step and output selectors for that child. An output selector alone narrows the inherited step.
Data, single-field, document-list and source widgets default to data when no step binding is supplied or inherited. Upload uses the selected extraction step's document input. Manual input uses the selected manual step's required form.
Step instances and output forms
The normal label binding selects one step and its result. The document list selects source documents within that result.
If a single step returns duplicate submissions for the same ordinary output form, its widgets prefer a populated result over empty forms. Copies with identical values and source documents display one consistent result. If populated results differ, choose an output from the document list or set output-submission-id. The process's value still exposes every output returned by the API.
A single multi step can produce several child instances or output forms. For these runs, data and source widgets wait for an output selection. The document list lets the user choose an output and a document. A document shared by several outputs requires an output choice first.
When a multi step has no run instances, its mapped widgets stay in the layout and show an empty state.
Set output-submission-id to pin one result. run-step-id narrows the selection to one execution instance. If that instance has several outputs, add output-form-id or output-submission-id.
A result outside the selected run or step is rejected. An unavailable output shows loading while its mapped step is running. Pending, blocked and terminal steps keep an empty panel, including during a refresh.
Sea context scopes selection to each process. Changing the run ID or connection clears that selection and discards late responses from the previous run.
Attributes and properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
runId | run-id | string | "" | Selects a pipeline run started by the host application. |
value | — | SeaProcessValue or undefined | — | Read-only snapshot of the loaded run, pipeline and outputs. |
Events
| Event | Type | Description |
|---|---|---|
process-change | CustomEvent | { runId, pipelineId?, dealId?, status?, loading, error? } when the selected run changes or refreshes. |
process-change reports identity, loading and status changes. Read event.detail in JavaScript or onProcessChange in React. Use refresh() on the element or ref after a host-side change.
Citation events from child widgets bubble through the process to your application.
The element's value exposes the loaded run, pipeline and output submissions. Selection and citation handling remain in Sea context.
Use isDisplayableProcessOutput from @sea-dev/widget-lit/react/process before displaying output values in host UI. Pass the selected output and its submission. It accepts completed outputs and pending or blocked manual drafts, matching the widget display rule.
Styling parts
| Part | Description |
|---|---|
status | The run error message. |
API and transport
The process reads the exact run status and outputs. It loads the pipeline definition, including inactive definitions, and reads the linked submissions and their source submissions.
A custom WidgetTransport implements pipeline.runStatus, pipeline.runOutputs, pipeline.list and submission.get. SeaUpload additionally needs pipeline.uploadDocuments, whose HTTP contract covers batch receipts and retries. Manual widgets need their input operations. All calls use the nearest context's transport.