Skip to manual
gluon

GOL language

ObjectView

An ObjectView is a named, filtered set of objects that chat scopes, apps and policies can point at.

Model author or developer

Where it goes

Contoso keeps ContractsRenewingSoon in domains/procurement/behaviour.yaml. The loader reads every YAML file under the package root, so folders are a convention you can change. Name it in PascalCase. The name must be unique within its domain across all type kinds.

Fields

The keys under spec. Nested shapes follow ObjectViewSpec in the GOL JSON Schema.

FieldPresenceShape
fromRequiredref
whereOptionalcel
traverseOptionalmemberList
orderByOptionalarray
limitOptionalinteger
countsAreReaderRelativeOptionalboolean
exposeOptionalexpose
riskTierOptionalenum: A, B, C, D
lifecycleOptionallifecycle

Syntax and rules

The examples are fragments. Put them in a package next to the resources they reference. A ... stands for a CEL expression you write yourself.

9.4 ObjectView (named object set)

GOL · YAML
kind: ObjectView
metadata: { name: ContractsRenewingSoon }
spec:
  from: Contract
  where: "self.daysToRenewal <= 60 && self.state != 'expired'"
  traverse: [supplier, owner]
  orderBy: [{ property: renewalDate }]
  expose: { chat: true, api: true, mcp: { resource: contracts_renewing_soon } }

Views are the unit apps, chat scopes, alerts and policies can point at.

Check your package

Shell
gluon validate examples/contoso
gluon test examples/contoso

validate reports each problem with a GLN code and its place in the file. test runs the package's Test resources. See the language guide and the diagnostics.

Contoso's ContractsRenewingSoon ObjectView in the designer's YAML pane, with its validation status.
Contoso's ContractsRenewingSoon ObjectView in the designer's YAML pane, with its validation status.