Build
Raw Blue is the lowest-level and most precise way to author the system. Direct control over types, fields, participants, contracts, workflows, and references — no abstraction layer between you and the language.
Use raw Blue when you want:
Start with pure state. No rules, no behavior.
name: Demo Counter counter: 0
This is a perfectly valid Blue document. No participants yet, no operations.
To let any participant act on this document, declare a Conversation/Timeline Channel:
name: Demo Counter
counter: 0
contracts:
ownerChannel:
type: Conversation/Timeline Channel
timelineId: owner-1The owner's timeline can now feed entries into the document — but the document does not yet know what to do with them.
Tell the document there is an operation called increment on the owner channel, expecting an integer request:
contracts:
ownerChannel:
type: Conversation/Timeline Channel
timelineId: owner-1
increment:
type: Conversation/Operation
channel: ownerChannel
request:
type: IntegerThis says this operation exists. It does not yet say what to do when invoked.
Add a Conversation/Sequential Workflow Operation handler that runs one Conversation/Update Document step:
contracts:
ownerChannel:
type: Conversation/Timeline Channel
timelineId: owner-1
increment:
type: Conversation/Operation
channel: ownerChannel
request:
type: Integer
incrementHandler:
type: Conversation/Sequential Workflow Operation
operation: increment
steps:
- name: ApplyIncrement
type: Conversation/Update Document
changeset:
- op: replace
path: /counter
val: ${event.message.request + document('/counter')}The expression in val reads the request payload from the timeline entry and the current value of /counter, then writes the sum back. That is what makes the document live.
To trigger the operation, write a Conversation/Timeline Entry whose message is a Conversation/Operation Request:
type: Conversation/Timeline Entry timeline: timelineId: owner-1 message: type: Conversation/Operation Request operation: increment request: 5 allowNewerVersion: true
Send this entry to the document via the processor and /counter moves from 0 to 5. The entry's BlueId becomes the prevEntry.blueId of the next one on this channel.
totalGas reported by the real processor.