Example Catalog
This catalog is grounded in the .bloge programs checked into the BLOGE source conformance suite. The verified source for the examples referenced here is submodule/bloge/bloge-conformance/fixtures/examples/ at the source commit reviewed by this site.
The examples are intentionally DSL-first. They are useful for learning syntax, graph shape, dependency inference, branching, retry/fallback policies, iteration, and loop behavior. They are not presented here as runnable Maven application entry points unless a corresponding examples repository is explicitly linked and verified.
For one runnable application with business-contract verification, use bloge-starter-loan-approval. It is a separate maintained starter, not one of the parser-only conformance fixtures below.
Category Overview
| Category | Verified fixtures | What they demonstrate |
|---|---|---|
| Basic DAG | order-process.bloge, bff-dashboard.bloge | Fan-out, fan-in, inferred dependencies, fallback |
| Decision flows | loan-approval.bloge, ticket-routing.bloge, claim-processing.bloge | Branching, otherwise paths, risk/priority routing |
| Industry workflows | food-order.bloge, shipment-planning.bloge, online-triage.bloge | Domain-shaped graphs with production-style boundaries |
| Iteration | batch-order-processing.bloge, batch-order-parallel.bloge, sequential-transfer.bloge | foreach, item/index variables, sequential mode |
| Looping | status-polling.bloge, cursor-pagination.bloge, logistics-batch-dispatch.bloge | loop, until, carry, polling, loop outputs |
Recommended Learning Path
- Start with
order-process.blogeto understand the basic graph shape. - Read
bff-dashboard.blogefor parallel fan-out with differentiated fallbacks. - Compare
loan-approval.blogeandticket-routing.blogeto see business decisions expressed as branches. - Move to
batch-order-parallel.blogeandsequential-transfer.blogeforforeachbehavior. - Use
status-polling.blogeandcursor-pagination.blogewhen learning loops and carry state. - Inspect
logistics-batch-dispatch.blogeonce you are ready to combineforeachandloop.
Basic DAG Pattern
order-process.bloge demonstrates the canonical shape: source nodes fetch data, a fan-in node calculates a result, a downstream node applies resilience, and a branch selects the final path.
graph orderProcess {
node fetchUser : FetchUserOperator {
input {
userId = ctx.userId
}
timeout = 3s
retry = { attempts: 2, backoff: 200ms, strategy: exponential }
}
node fetchProducts : FetchProductsOperator {
input {
productIds = ctx.productIds
}
timeout = 5s
}
node calcPrice : CalcPriceOperator {
depends_on = [fetchUser, fetchProducts]
input {
user = fetchUser.output
products = fetchProducts.output
}
}
node checkCredit : CreditCheckOperator {
depends_on = [fetchUser, calcPrice]
input {
userId = fetchUser.output.id
amount = calcPrice.output.total
}
retry = { attempts: 3, backoff: 100ms, strategy: jitter }
fallback = { approved: false, reason: "credit service unavailable" }
}
branch on checkCredit.output.approved {
true -> createOrder
false -> rejectOrder
}
}Fan-Out and Fallback
bff-dashboard.bloge is useful when learning how BLOGE keeps independent calls parallel while letting each node own its own timeout, retry, and fallback policy.
Look for:
- independent source nodes with no dependency edges
- per-node fallback values that downstream aggregation can still understand
- one aggregation node that depends on all upstream results
Branching and Decision Workflows
The decision-oriented fixtures model different domains with the same graph mechanics.
| Fixture | Decision point |
|---|---|
loan-approval.bloge | Approved, rejected, or manual review |
ticket-routing.bloge | VIP, normal, or auto-resolve |
claim-processing.bloge | Approve, reject, or investigate |
online-triage.bloge | Emergency, specialist, or general route |
These examples are the right place to study how branches preserve explicit skipped paths instead of hiding non-selected work.
Foreach
batch-order-parallel.bloge shows default parallel foreach behavior with both item and index bindings.
foreach processOrders : (order, idx) in fetchOrders.output.orders {
node validate : OrderValidatorOperator {
input {
order = order
index = idx
}
}
node deductStock : StockDeductionOperator {
depends_on = [validate]
input {
orderId = order.orderId
quantity = order.quantity
validated = validate.output.valid
}
}
}sequential-transfer.bloge shows the sequential variant for cases where order matters, such as ledger-safe transfer processing.
Loop and Carry State
status-polling.bloge demonstrates polling with loopIteration and an until condition.
loop pollStatus {
max_iterations = 20
delay = 2s
depends_on = [submitJob]
node checkStatus : StatusCheckerOperator {
input {
jobId = submitJob.output.jobId
iteration = loopIteration
}
}
until checkStatus.output.status == "READY"
}cursor-pagination.bloge demonstrates carry values that move data from one iteration to the next. Use it when learning pagination, polling cursors, or accumulator-style orchestration.
Verification
The examples listed on this page should stay aligned with:
submodule/bloge/bloge-conformance/fixtures/examples/
submodule/bloge/bloge-conformance/expected/examples/When updating example snippets, prefer copying from those fixture files and then running the website build plus the BLOGE conformance checks in the source repository.
Conformance fixtures answer whether the language implementation accepts and projects the expected graph shape. The loan starter's two BLOGE Verify Suites and seven Cases answer a different question: whether selected approved business paths still match when the real graph and customer operators run.
Next Steps
- Learn the authoring surface in DSL Overview.
- See resilience behavior in Resilience Policies.
- Explore long-running support in Durable Flows.
- Run the loan-approval business verification walkthrough.