Databases
JDBC · explicit transaction scope
Keep a prepared insert and query on one JDBC connection, then commit that exact transaction. Errors and unfinished scopes roll back instead of committing partially.
Last verified 2026-10-31 at f4ce7d0 — simulation fixtures
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.
Scroll sideways to see the whole flow.
List the 6 activities and 5 transitions
Activities
- Start
start - Begin on the CRM connection
jdbc.begin - Insert with the transaction handle
jdbc.insert - Read uncommitted work in the same scope
jdbc.query - Commit the original connection
jdbc.commit - End
end
Transitions
- Start → Begin on the CRM connection (on success)
- Begin on the CRM connection → Insert with the transaction handle (on success)
- Insert with the transaction handle → Read uncommitted work in the same scope (on success)
- Read uncommitted work in the same scope → Commit the original connection (on success)
- Commit the original connection → End (on success)
Walkthrough
- Begin on the CRM connectionOpen one run-owned JDBC connection. Pass its handle to related activities. Unfinished transactions are rolled back on cleanup.
- Insert with the transaction handleRegistered prepared write; participates in the selected run-owned transaction, or commits locally.
- Read uncommitted work in the same scopeNative Java JDBC, registered prepared statements, typed parameters, local commit/rollback. A vendor driver must be installed.
- Commit the original connectionFinish the original JDBC transaction on its original session. Never opens a new connection to finish a transaction.
What you will practise
- Keep a prepared insert and query on one JDBC connection, then commit that exact transaction. Errors and unfinished scopes roll back instead of committing partially.
- Shared connection IDs stay explicit. Simulation uses fixtures; live actions require operator approval.
Sample cases
1 case with 3 assertions, run with python -m server.integration examples --all in simulation.
End-to-end sample
PassedExecute the actual flow with explicit external fixtures.
Expected result Every activity completes and the expected final result matches.
3/3 assertions
- Flow completes
- Final output
- No unconfirmed receipts
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 JDBC bridge and your vendor JDBC driver (not bundled) needed only for live connections; simulation uses fixtures
- Simulation fixtures
crm_demojdbc · jdbc.begin, jdbc.insert, jdbc.query, jdbc.commit
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
a01219ef916b84644eb54f5927f040e66f43db3a04e2a23d66738ec88a087095- Closure SHA-256
7ddd7a1362fbc26d2b4915f4a3e83bb0d719d93fea06310177bd9edd01fdac2b- Runtime
1.27.0- Results
- 1/1 cases, 3/3 assertions, mode simulate, external calls: none.
- Files in the closure
server/integration/example_packs/jdbc_scoped_transaction_lab.jsonserver/integration/templates/jdbc_scoped_transaction_lab.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 jdbc_scoped_transaction_lab PYTHONPATH=. python scripts/export_public_gallery.py --check