Event#

A System can emit or consume Events. An Event is a typed fact communicated asynchronously. A Process can emit an Event, and a consuming Process receives its values through a declared mapping to its Inputs.

An Event has a name, documentation, a subject, a producer, payload values and consuming Processes. The subject identifies the message stream. The payload values describe the information communicated: their names, types, meanings and required values.

The produced file is events/<event-name>.json; it follows Event.schema.json.

Property Meaning
name Event name, unique among Events in this System and used in references and its filename.
description The fact communicated and its business meaning.
subject Stable message subject used by the transport.
producer Exact name of a producing Process in this System, when present.
values Named, typed and documented payload values.
consumers Exact names of local consumer Processes with explicit payload-to-Input mappings.

For example, a PurchaseOrderApproved Event can carry the order identity and approval time. A consuming Process can use those values to perform a subsequent action. A producer or consumer can also be outside the System; the design must describe the agreed message rather than assume the other System's implementation.

Payload Types#

Each payload value has a name, a readable label, a description and a type. The name is used in mappings; the label is display text. Types are the same as Data Collection fields and Process Inputs/Outputs:

Type Meaning
string Text.
text Longer textual content.
integer A whole number.
long A larger whole number.
decimal A fractional numeric value using Double, such as an amount or rate.
boolean A true or false value.
date A calendar date.
datetime A date and time.
object Named properties described by schema.
array Several values described by an array schema and its items.
reference A record ID, with the target Collection named in collection.
file File metadata: id, name, contentType, extension and size in bytes, not file contents.

Use lowercase type names, including decimal for fractional values. Embedded JSON Schema retains its standard type names, including number. Required values, constraints and nested structures form the Event payload contract. Consumer Inputs must accept the mapped values.

Use values inside a payload field for a fixed list of allowed values chosen by the System author. Each value follows the field's type. Omit it when there is no fixed list. The field's label is its display name, not a label for each choice. The Event's top-level values lists its payload fields; a field's own values lists its permitted values.

Consumer Input Mapping#

Each consumer associates a Process with an inputMapping. The mapping names a Process Input and identifies its source in the Event payload, such as orderId mapped to payload.orderId. Required consumer Inputs must be supplied, and the payload and Input types must agree.

Mapping is explicit even when an Event value and a Process Input have different names or are nested. Receiving an Event does not make all of its values automatically valid Inputs for every Process.

Execution Meaning#

A messaging Service supplies transport. Emitting an Event and completing its consumers are separate outcomes; the emitting Process does not receive the consumers' business results as its own response. Document what the producer has completed at emission and what the consumers do afterward.

Where messages may be delivered again, the consuming Process must account for repeated delivery without unintentionally repeating the business effect. Ordering, failure and retry behavior must agree with the chosen transport and the business action.

The existing durable messaging Service uses explicit acknowledgments. Successful dispatch acknowledges the message; failed dispatch can cause another delivery. When an Event has several consumers, an earlier consumer can complete before a later one fails, so a repeated delivery can reach an already completed consumer.

The runtime configures message retention and delivery limits. Those limits are not promises of unlimited recovery or exactly-once processing. The generator creates subscriptions and listeners from the Event associations; the author does not implement them.

Publishing waits for a broker acknowledgment, not for completion of the consumer Processes. Database commit and message publication are separate effects. The author can use stored pending work and scheduled publication when the business needs recoverable delivery, with duplicate handling where necessary. The runtime does not create that business workflow automatically.

A direct call to another Process is a separate interaction, not an Event. Prefer direct Process calls when they satisfy the interaction; emit or listen to Events when asynchronous messaging is needed. Events are optional, not a required layer around every action.

The Event specification is Event.schema.json.

JSON Example#

{
  "name": "PurchaseOrderApproved",
  "description": "An order has been approved and is ready for subsequent processing.",
  "subject": "purchasing.order.approved",
  "producer": "ApprovePurchaseOrder",
  "values": [
    {
      "name": "orderId",
      "type": "string",
      "description": "Identity of the approved order.",
      "required": true,
      "label": "Order ID"
    }
  ],
  "consumers": [
    {
      "process": "NotifySupplier",
      "inputMapping": {
        "orderId": "payload.orderId"
      }
    }
  ]
}

The Process names in the example refer to local producer and consumer Processes that must exist in the produced System. For an incoming Event produced outside the System, omit the local producer. For an outgoing Event with only external consumers, use an empty local consumers list. Document the external party and agreed payload without inventing a local Process for it.

An individual payload field with allowed values:

{
  "name": "status",
  "label": "Status",
  "description": "Business state communicated by this Event.",
  "type": "string",
  "values": ["pending", "approved", "rejected"]
}

Search AISDL

Search the paper, references and examples.