Java SDK overview
The Java SDK is a plain-Java client for the FlowCatalyst platform. It has a blocking API (scale it with virtual threads), Jackson 3 as its only runtime dependency, and no framework integration: no Spring starter, no CDI. Its surface mirrors the TypeScript SDK.
Current version: 0.0.38. Requires Java 25 (the build uses maven.compiler.release 25).
What it provides
Section titled “What it provides”| Need | Where | Page |
|---|---|---|
| Authenticate with client credentials or a supplied token | FlowCatalystClient.builder() |
Auth |
| Write events, dispatch jobs, audit entries and pushes to the outbox in your transaction | io.flowcatalyst.sdk.outbox |
Outbox |
| Declare and sync roles, event types, subscriptions and the rest | io.flowcatalyst.sdk.sync, annotations |
Declarations |
| Create users and invitations, and run an application’s admin pages | principals(), applicationUsers() |
Users |
| Manage ingestions | ingestions(), ingestionSets() |
Ingestions |
| Platform configuration and secrets, builder options | platformConfig() |
Config |
| Field workers: verify tokens and administer | field, fieldWorkers() and friends |
Field |
| Verify signed deliveries | WebhookSignature |
Webhooks |
| Handle failures | SdkError, FlowCatalystException |
Errors |
Install
Section titled “Install”The Java SDK is published, from version 0.0.30, to the platform repository’s GitHub Packages Maven
registry (https://maven.pkg.github.com/flowcatalyst/flowcatalyst) as io.flowcatalyst:flowcatalyst-sdk. It is not on Maven Central. GitHub Packages
asks for a token with read:packages even for public packages, so add the repository and a server entry
with credentials. A release is a java-sdk/vX.Y.Z tag; a workflow checks the version, runs the tests and
deploys the jar and its sources.
<repositories> <repository> <id>github-flowcatalyst</id> <url>https://maven.pkg.github.com/flowcatalyst/flowcatalyst</url> </repository></repositories>
<dependency> <groupId>io.flowcatalyst</groupId> <artifactId>flowcatalyst-sdk</artifactId> <version>0.0.38</version></dependency><settings> <servers> <server> <id>github-flowcatalyst</id> <username>YOUR_GITHUB_USERNAME</username> <password>${env.GITHUB_TOKEN}</password> <!-- a token with read:packages --> </server> </servers></settings>To build it yourself instead, check out the tag in the platform repository and run mvn install in
clients/java-sdk.
The build generates the API models at compile time from openapi/openapi.json, so a wire change shows
up as a compile error in the hand-written resource layer rather than at runtime.
The directory is standalone on purpose: its pom.xml has no parent and no dependency on any other
FlowCatalyst module. The use-case framework (Operation, UnitOfWork, Result) is a separate
module that builds on this SDK and is not part of it. This SDK has no use-case envelope, no
scheduled-job runner and no lock or cache; see the
feature matrix.
Create a client
Section titled “Create a client”var client = FlowCatalystClient.builder() .baseUrl("https://platform.example.com") .clientCredentials("oac_your_client_id", "your_client_secret") .build();
var eventTypes = client.eventTypes().list(null);baseUrl is required, and one of clientCredentials(...) or accessToken(...) must be set;
otherwise build() throws IllegalStateException. Options, retries and timeouts are in
Auth and Config.
The client is thread-safe. Resource accessors create their resource once and reuse it, so build one
FlowCatalystClient per application and share it.
Resource families
Section titled “Resource families”Each accessor returns a typed resource over the shared transport:
| Accessor | Covers |
|---|---|
eventTypes(), subscriptions(), dispatchPools(), connections() |
The messaging configuration |
events(), dispatchJobs() |
Reading events and dispatch jobs, sending a dispatch-job batch directly |
roles(), permissions(), applications(), clients(), principals(), me() |
Identity and tenancy |
applicationUsers() |
An application’s own users and invitations |
processes(), scheduledJobs(), auditLogs(), router() |
Process documentation, scheduled jobs (CRUD and instance reads), audit reads, router presence checks |
platformConfig() |
Application configuration properties and secrets |
ingestions(), ingestionSets() |
Ingestion definitions and sets |
fieldWorkers(), fieldDevices(), fieldPolicies(), fieldTokens() |
Field-worker administration and token introspection |
definitions() |
The definition synchronizer |
Request and response types for most of these are generated from the platform’s OpenAPI document under
io.flowcatalyst.sdk.generated.model, so they follow the wire contract exactly.
Examples
Section titled “Examples”src/test/java/examples has ListEventTypes and OrderService (a transactional outbox write). Run one
from the SDK directory:
mvn -q test-compile org.codehaus.mojo:exec-maven-plugin:3.5.0:java \ -Dexec.mainClass=examples.ListEventTypes -Dexec.classpathScope=testVersions
Section titled “Versions”The version is in clients/java-sdk/VERSION and pom.xml. Releases are cut from the platform
repository with make release-java-sdk BUMP=patch (or minor, major), which bumps both, commits,
tags java-sdk/vX.Y.Z and pushes. The SDK is pre-1.0, so a patch release can change behaviour; the
repository keeps per-release notes in CHANGES-0.0.NN.md files next to the code.
Read next
Section titled “Read next”- Publish events with the outbox
- Sync definitions
- Packages and versions for every SDK’s install line