Skip to content

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 ​

CategoryVerified fixturesWhat they demonstrate
Basic DAGorder-process.bloge, bff-dashboard.blogeFan-out, fan-in, inferred dependencies, fallback
Decision flowsloan-approval.bloge, ticket-routing.bloge, claim-processing.blogeBranching, otherwise paths, risk/priority routing
Industry workflowsfood-order.bloge, shipment-planning.bloge, online-triage.blogeDomain-shaped graphs with production-style boundaries
Iterationbatch-order-processing.bloge, batch-order-parallel.bloge, sequential-transfer.blogeforeach, item/index variables, sequential mode
Loopingstatus-polling.bloge, cursor-pagination.bloge, logistics-batch-dispatch.blogeloop, until, carry, polling, loop outputs
  1. Start with order-process.bloge to understand the basic graph shape.
  2. Read bff-dashboard.bloge for parallel fan-out with differentiated fallbacks.
  3. Compare loan-approval.bloge and ticket-routing.bloge to see business decisions expressed as branches.
  4. Move to batch-order-parallel.bloge and sequential-transfer.bloge for foreach behavior.
  5. Use status-polling.bloge and cursor-pagination.bloge when learning loops and carry state.
  6. Inspect logistics-batch-dispatch.bloge once you are ready to combine foreach and loop.

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.

bloge
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.

FixtureDecision point
loan-approval.blogeApproved, rejected, or manual review
ticket-routing.blogeVIP, normal, or auto-resolve
claim-processing.blogeApprove, reject, or investigate
online-triage.blogeEmergency, 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.

bloge
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.

bloge
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:

text
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 ​