Start building

Orchestration

Order fulfilment · JMS → REST → Kafka

A complete multi-system scenario: receive XML from JMS, normalize it in a subprocess, check REST inventory, publish a fulfilment event to Kafka and confirm the source message. All connectors are simulated.

  • JMS → Kafka
  • via REST API
  • Advanced
  • 7 min

Last verified 2026-10-31 at f4ce7d0 — simulation fixtures

Try this template in Studio

Studio activation is a one-time payment of USD 20.

Flow

Drawn at build time from the node positions in the template's process definitions. Numbered markers are the walkthrough stages.

Main processOrder fulfilment · JMS → REST → Kafka13 activities

Scroll sideways to see the whole flow.

Flow diagram of Order fulfilment · JMS → REST → Kafka13 activities and 14 transitions: Start, Receive order, Normalize order, Check inventory, Stock available?, Prepare fulfilment event, Render event, Publish ready event, Confirm original message, Return fulfilment receipt, Out of stock, Return deferred result, Return without confirming.In stockOut of stockInvalid messageHTTP errorStock unavailableStartstartReceive orderjms.receive1Normalize ordercall_processCheck inventoryhttp.request3Stock available?choicePrepare fulfilmenteventassignRender eventjson.renderPublish ready eventkafka.publish4Confirm originalmessagejms.confirm5Return fulfilmentreceiptendOut of stockraise_errorReturn deferred resultassignReturn withoutconfirmingend
List the 13 activities and 14 transitions

Activities

  1. Start start
  2. Receive order jms.receive
  3. Normalize order call_process
  4. Check inventory http.request
  5. Stock available? choice
  6. Prepare fulfilment event assign
  7. Render event json.render
  8. Publish ready event kafka.publish
  9. Confirm original message jms.confirm
  10. Return fulfilment receipt end
  11. Out of stock raise_error
  12. Return deferred result assign
  13. Return without confirming end

Transitions

  • Start → Receive order (on success)
  • Receive order → Normalize order (on success)
  • Normalize order → Check inventory (on success)
  • Check inventory → Stock available? (on success)
  • Stock available? → Prepare fulfilment event (condition: In stock)
  • Stock available? → Out of stock (otherwise: Out of stock)
  • Prepare fulfilment event → Render event (on success)
  • Render event → Publish ready event (on success)
  • Publish ready event → Confirm original message (on success)
  • Confirm original message → Return fulfilment receipt (on success)
  • Normalize order → Return deferred result (on error: Invalid message)
  • Check inventory → Return deferred result (on error: HTTP error)
  • Out of stock → Return deferred result (on error: Stock unavailable)
  • Return deferred result → Return without confirming (on success)
SubprocessNormalize order · subprocess7 activities

Scroll sideways to see the whole flow.

Flow diagram of Normalize order · subprocess7 activities and 6 transitions: Start, Parse order XML, Validate order XSD, Normalize with XSLT, Parse normalized XML, Map to JSON object, Return order.StartstartParse order XMLxml.parseValidate order XSDxml.validateNormalize with XSLTxml.xslt2Parse normalized XMLxml.parseMap to JSON objectassignReturn orderend
List the 7 activities and 6 transitions

Activities

  1. Start start
  2. Parse order XML xml.parse
  3. Validate order XSD xml.validate
  4. Normalize with XSLT xml.xslt
  5. Parse normalized XML xml.parse
  6. Map to JSON object assign
  7. Return order end

Transitions

  • Start → Parse order XML (on success)
  • Parse order XML → Validate order XSD (on success)
  • Validate order XSD → Normalize with XSLT (on success)
  • Normalize with XSLT → Parse normalized XML (on success)
  • Parse normalized XML → Map to JSON object (on success)
  • Map to JSON object → Return order (on success)

Walkthrough

  1. Receive the XML orderA JMS fixture supplies the original queue message and its receipt.
  2. Normalize in a child flowParse, validate, transform and map the XML order.
  3. Look up inventoryA REST fixture supplies availability and a warehouse.
  4. Enrich & publishBuild a JSON fulfilment event and publish it to the simulated Kafka topic.
  5. Confirm only on successAcknowledge the original JMS receipt after publication.

What you will practise

  • Follow a complete cross-system process, including its child flow.
  • Verify that publication precedes acknowledgement.
  • Test unavailable inventory and HTTP failure without real brokers.

Sample cases

3 cases with 18 assertions, run with python -m server.integration examples --all in simulation.

In-stock order

Passed

The whole flow returns a published, confirmed fulfilment receipt.

Expected result accepted, published and confirmed are true; the event includes warehouse PARIS-01.

7/7 assertions

  • Process completes in simulation
  • Order is accepted
  • Warehouse enrichment is preserved
  • The event was published
  • The message was confirmed
  • XSLT child activity executed
  • No unconfirmed message remains

This sample run only; not a production certification.

Out-of-stock order

Passed

Unavailable inventory follows the deferred branch.

Expected result A deferred result with reason out_of_stock. No publication or confirmation; one pending receipt.

6/6 assertions

  • Process completes in simulation
  • Order is deferred
  • Out-of-stock reason returned
  • Nothing is published
  • Source message not confirmed
  • Failed message remains unconfirmed

This sample run only; not a production certification.

Inventory API unavailable

Passed

A 503 response is caught; the source message remains unconfirmed.

Expected result A deferred result with reason http_error_status and one pending receipt.

5/5 assertions

  • Process completes in simulation
  • Failure reason preserved
  • HTTP failure is caught
  • No event publication
  • Failed message remains unconfirmed

This sample run only; not a production certification.

Prerequisites

Runtime
Cohuno runtime 1.27.0, the version recorded when these cases last passed.
Starter
Manual start; no listener.
Optional dependencies
  • Java 17+, the included JMS bridge and your provider's JMS JARs (not bundled) needed only for live connections; simulation uses fixtures
  • The optional Kafka driver (requirements-kafka.txt) needed only for live connections; simulation uses fixtures
Selected for this closure by the same rules as runtime packaging.
Simulation fixtures
  • demo_http http · http.request
  • demo_jms jms · jms.receive, jms.confirm
  • demo_kafka kafka · kafka.publish
Every sample run replaces these connections with the fixtures defined in its case. A live run needs an operator to configure an authorized connection for each.
Verification details

Provenance

What was verified, and when. The content part changes whenever the pack, a process in its closure, the runtime version or a case result changes; the gallery check then fails until the gallery is regenerated and the changed templates are verified again.

Verified content

Pack SHA-256
3103ac45c3da01f2c93689f145ad63da81499e0d506020bd087de7bd37278a43
Closure SHA-256
b2d43250d6568afdefa31dd5ba003403c96130553767be6f3591c08c1ba696d2
Runtime
1.27.0
Results
3/3 cases, 18/18 assertions, mode simulate, external calls: none.
Files in the closure
  • server/integration/example_packs/order_fulfilment.json
  • server/integration/templates/normalize_order.json
  • server/integration/templates/order_fulfilment.json

Verification event

Commit
f4ce7d08eedc90267b405ed1974344153a8b3a34
Verified at (UTC)
2026-10-31T21:19:21Z

How the Cohuno team reproduces this check

PYTHONPATH=. python -m server.integration examples --example order_fulfilment
PYTHONPATH=. python scripts/export_public_gallery.py --check