dbos-java
БесплатноБез исполняемых скриптовНе проверенDBOS Java SDK for building reliable, fault-tolerant applications with durable workflows. Use this skill when writing Java or Kotlin code with DBOS, creating…
от dbos-inc★ 20 звёзд на GitHubОб этом скилле
DBOS Java Best Practices
Guide for building reliable, fault-tolerant Java applications with DBOS durable workflows.
When to Apply
Reference these guidelines when:
- Adding DBOS to existing Java or Kotlin code
- Creating workflows and steps
- Using queues for concurrency control
- Implementing workflow communication (events, messages, streams)
- Configuring and launching DBOS applications, including with Spring Boot
- Using DBOSClient from external applications
- Testing DBOS applications
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Lifecycle | CRITICAL | lifecycle- |
| 2 | Workflow | CRITICAL | workflow- |
| 3 | Step | HIGH | step- |
| 4 | Queue | HIGH | queue- |
| 5 | Communication | MEDIUM | comm- |
| 6 | Pattern | MEDIUM | pattern- |
| 7 | Testing | LOW-MEDIUM | test- |
| 8 | Client | MEDIUM | client- |
| 9 | Advanced | LOW | advanced- |
Critical Rules
Installation
Add the DBOS dependency (Java 17+, Gradle 8+ recommended):
dependencies {
implementation("dev.dbos:transact:1.4.0")
implementation("org.slf4j:slf4j-simple:2.0.17") // to see DBOS log messages
}
DBOS requires a PostgreSQL-compatible database. Connection settings are typically supplied through
DBOS_SYSTEM_JDBC_URL, PGUSER, and PGPASSWORD.
Connecting to DBOS Conductor (withConductorKey, or dbos.conductor.key in Spring Boot; 1.3+), and suspending
workflows (withSuspendMode; 1.4+), require dev.dbos:transact-enterprise at exactly the same version as
dev.dbos:transact; otherwise launch() throws IllegalStateException. Suspending also needs a DBOS key: the
Conductor key, or withTransactEnterpriseKey in development. Add the artifact only when the application uses one of
them:
implementation("dev.dbos:transact-enterprise:1.4.0")
DBOS Configuration and Launch
A DBOS application MUST create a DBOS instance, register its workflow classes, then launch:
import dev.dbos.transact.DBOS;
import dev.dbos.transact.config.DBOSConfig;
import dev.dbos.transact.workflow.Workflow;
interface Example {
String workflow(String input);
}
class ExampleImpl implements Example {
private final DBOS dbos;
ExampleImpl(DBOS dbos) {
this.dbos = dbos;
}
@Override
@Workflow
public String workflow(String input) {
return dbos.runStep(() -> fetchData(input), "fetchData");
}
private String fetchData(String input) { /* external call */ return input; }
}
public class App {
public static void main(String[] args) {
DBOSConfig config = DBOSConfig.defaultsFromEnv("my-app")
.withAppVersion("0.1.0");
DBOS dbos = new DBOS(config);
Example proxy = dbos.registerProxy(Example.class, new ExampleImpl(dbos));
dbos.launch();
proxy.workflow("input"); // durable: called through the proxy
}
}
When creating a new application, set withAppVersion("0.1.0"). If omitted, DBOS derives an opaque hash from the
workflow code, SDK version, and application name. When editing an existing application, leave its configured version
alone — changing it is a deployment decision (see references/advanced-versioning.md). Version names are unique
across a shared system database, so applications sharing one need distinct version strings (for example
"billing-0.1.0"; see references/advanced-shared-database.md).
The name passed to DBOSConfig.defaults(appName) / defaultsFromEnv(appName) identifies the application and owns
everything it creates. Multiple applications (in any language) can share one system database, isolated by
application name (1.1+, see references/advanced-shared-database.md).
Workflow and Step Structure
Workflows are ordinary methods annotated @Workflow on a class registered with registerProxy. Any operation that
is complex, non-deterministic, or calls an external service must run as a step, either through dbos.runStep or as
a @Step-annotated method invoked through the proxy:
@Workflow
public String myWorkflow(String url) throws Exception {
// Inline lambda step — use for one-off work
String body = dbos.runStep(() -> httpGet(url), "httpGet");
// Reusable step declared with @Step — MUST be invoked through the proxy (self)
return self.parse(body);
}
@Step(maxAttempts = 3)
public String parse(String body) { /* ... */ }
Connecting to Conductor
DBOS applications run without Conductor. Add it when the user asks for it, or for what it provides: workflow recovery
across processes, observability, alerting, visualization, managing workflows from a console, or DBOS Transact
Enterprise features such as suspending workflows (which can instead use a Transact Enterprise key). Conductor is either DBOS-hosted
(https://console.dbos.dev) or self-hosted on the user's own infrastructure. The choice is the user's: if they haven't
made it, ask, describing both neutrally (see references/lifecycle-config.md), and don't re
Установить dbos-java в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dbos-java?
DBOS Java SDK for building reliable, fault-tolerant applications with durable workflows. Use this skill when writing Java or Kotlin code with DBOS, creating workflows and steps, using queues, integrating DBOS with Spring Boot, using DBOSClient from external applications, or building JVM applications that need to be resilient to failures.
Как установить скилл dbos-java?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dbos-java запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic