GetDataEventSchema

@Serializable
@SerialName(value = "GetData")
data class GetDataEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val readings: SerializableImmutableList<GetDataEventSchema.Reading>) : EventSchema

Reads one or more values from data sources and emits them downstream. Runs on the IO dispatcher.

Each Reading pairs a data source — inline map, plain or segmented local database, application/screen/navigation data holders, or a tile's produced value — with an access mode: Single (one id), Batch (a list of ids) or Full (everything the source holds). Readings are processed in order into a single accumulator, so a later reading overwrites an earlier one on key collision.

Emitted shape: Full, and Batch without unwrapValuesToList, produce a map keyed by data id. Batch with unwrapValuesToList produces a list of values. When neither applies — only Single readings — a lone reading emits the bare value and several readings emit a list. A map result wins over a list result when the two are mixed.

incomingData consumed: not used.

Triggers fired:

  • OnStartEventTrigger — before any reading is performed.

  • OnSuccessEventTrigger — after every reading resolved; the assembled result is passed as incomingData.

  • OnFailureEventTrigger — aborts the whole event on the first problem: a Single id that resolves to null, a Batch id missing while allowMissingData is false (a DataNotFoundException is passed as incomingData), or a database read that fails (the Throwable is passed).

Constructors

Link copied to clipboard

Types

Link copied to clipboard
@Serializable
data class Reading(val dataSource: DataSourceSchema, val accessMode: AccessModeSchema)

Properties

Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?

This event's own children — each declaring, via its own trigger, which of this event's outgoing triggers runs it. null when this event declares no children.

Link copied to clipboard
@SerialName(value = "id")
open override val id: String

Unique identifier — how TriggerEvent/UpdateEvents address this event by id. Defaults to a random id when omitted from the DSL.

Link copied to clipboard
Link copied to clipboard
@SerialName(value = "trigger")
open override val trigger: EventTrigger

The condition that must occur for this event to run — matched by structural equality (data class/data object equality) against whatever trigger value fired, never by any kind of subscription or listener registry.