Form Example
This example shows how a form artifact can be represented alongside an entity in a BDL document.
The example intentionally focuses on artifact composition and reference intent rather than inventing undocumented control or layout structures.
Example
{
"schema": "barsa.definition.v1",
"project": {
"code": "SAMPLE",
"caption": "Sample",
"systemId": "${RESOLVE_SYSTEM_ID}",
"version": "1.0.0"
},
"references": {},
"artifacts": [
{
"kind": "entity",
"code": "Customer",
"caption": "Customer"
},
{
"kind": "form",
"code": "CustomerMainForm",
"caption": "Customer Main Form"
}
]
}
What this example demonstrates
- Forms are first-class BDL artifacts.
- A form can coexist with the entity it is intended to represent.
- The form has its own stable authoring identity.
- Artifact identity should remain explicit and separate from display text.
Linking a form to an entity
In a real definition, the form must be associated with the correct target entity using the structure supported by the active BDL baseline.
Do not invent entity IDs, metadata references, control bindings, or layout properties.
Resolve existing Barsa objects from authoritative metadata when the form targets an existing entity.
Controls and layout
Real forms usually require:
- Fields or controls
- Layout structure
- Sections or groups
- Data bindings
- Visibility or behavior rules
- Permissions
The exact structure for these elements must come from the active language and knowledge baseline.
This minimal example deliberately does not fabricate those structures.
Capability checks
Before authoring a real form, confirm:
- Native Barsa supports the intended form behavior.
- Runtime support exists for the form and controls.
- BDL can express the intended form structure.
- The current authoring surface allows that structure to be generated.
Safe authoring pattern
Create the smallest valid form first.
Then add controls, layout, bindings, and rules incrementally, validating after meaningful changes.
If a control type or binding shape is not documented, stop and resolve the required metadata instead of guessing.
Next
The next example shows a report artifact.