Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ba41df3
Checkpoint portable serialization
chuck-dbos Feb 4, 2026
1856f3f
Fixes; tests
chuck-dbos Feb 4, 2026
64a663a
Spotless or something
chuck-dbos Feb 4, 2026
fec1fbb
Merge remote-tracking branch 'origin/main' into chuck/interop
chuck-dbos Feb 10, 2026
16f9f87
Merge remote-tracking branch 'origin/main' into chuck/interop
chuck-dbos Feb 11, 2026
e7ffd04
Fix merge conflicts and errors
chuck-dbos Feb 11, 2026
1bf2ec4
Fix refactored code
chuck-dbos Feb 11, 2026
73d4392
Merge remote-tracking branch 'origin/main' into chuck/interop
chuck-dbos Feb 11, 2026
89408ae
Fix conflicts
chuck-dbos Feb 11, 2026
a625ce2
Merge remote-tracking branch 'origin/main' into chuck/interop
chuck-dbos Feb 12, 2026
a1e5063
Add serialization to WF import/export
chuck-dbos Feb 12, 2026
574a483
Some portability fixes
chuck-dbos Feb 12, 2026
7c73aee
Allow NULL for instance name
chuck-dbos Feb 13, 2026
6552435
Merge remote-tracking branch 'origin/main' into chuck/interop
chuck-dbos Feb 13, 2026
a09db3e
Wiring up context
chuck-dbos Feb 13, 2026
abfc21f
Fix startWorkflow
chuck-dbos Feb 13, 2026
9b29252
Clean up serializer and args
chuck-dbos Feb 13, 2026
041c96d
Extend test to cover more data shapes
chuck-dbos Feb 17, 2026
c09289b
Cleanups
chuck-dbos Feb 17, 2026
a06cc93
Error serialization
chuck-dbos Feb 17, 2026
2ac015c
Merge branch 'main' into chuck/interop
chuck-dbos Feb 17, 2026
fc9f1c2
Wire up and test custom serializer support
chuck-dbos Feb 18, 2026
5903b9c
Prettier
chuck-dbos Feb 18, 2026
3a5d3bb
Cover for serializer not returning Object[]
chuck-dbos Feb 18, 2026
03c79ca
Merge remote-tracking branch 'origin/main' into chuck/interop
chuck-dbos Feb 19, 2026
4f4aca3
Validate / coerce portable JSON workflow args
chuck-dbos Feb 19, 2026
481dec5
Add interop test based on canonical strings
chuck-dbos Feb 20, 2026
8a0ff49
update migrations to match Python as of 2026-02-20
devhawk Feb 23, 2026
949a443
Merge branch 'main' into chuck/interop
devhawk Feb 24, 2026
0845ab7
fix migration 11 schema quoting
devhawk Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 64 additions & 5 deletions transact/src/main/java/dev/dbos/transact/DBOS.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import dev.dbos.transact.workflow.ForkOptions;
import dev.dbos.transact.workflow.ListWorkflowsInput;
import dev.dbos.transact.workflow.Queue;
import dev.dbos.transact.workflow.SerializationStrategy;
import dev.dbos.transact.workflow.StepInfo;
import dev.dbos.transact.workflow.StepOptions;
import dev.dbos.transact.workflow.Workflow;
Expand Down Expand Up @@ -144,7 +145,13 @@ private void registerClassWorkflows(

String name = wfTag.name().isEmpty() ? method.getName() : wfTag.name();
workflowRegistry.register(
className, name, target, instanceName, method, wfTag.maxRecoveryAttempts());
className,
name,
target,
instanceName,
method,
wfTag.maxRecoveryAttempts(),
wfTag.serializationStrategy());
return name;
}

Expand Down Expand Up @@ -545,6 +552,17 @@ public static <T, E extends Exception> T getResult(@NonNull String workflowId) t
return executor("getWorkflowStatus").getWorkflowStatus(workflowId);
}

/**
* Get the serialization format of the current workflow context.
*
* @return the serialization format name (e.g., "portable_json", "java_jackson"), or null if not
* in a workflow context or using default serialization
*/
public static @Nullable SerializationStrategy getSerialization() {
var ctx = DBOSContextHolder.get();
return ctx != null ? ctx.getSerialization() : null;
}

/**
* Send a message to a workflow
*
Expand All @@ -558,8 +576,33 @@ public static void send(
@NonNull Object message,
@NonNull String topic,
@Nullable String idempotencyKey) {
send(destinationId, message, topic, idempotencyKey, null);
}

/**
* Send a message to a workflow with serialization strategy
*
* @param destinationId recipient of the message
* @param message message to be sent
* @param topic topic to which the message is send
* @param idempotencyKey optional idempotency key for exactly-once send
* @param serialization serialization strategy to use (null for default)
*/
public static void send(
@NonNull String destinationId,
@NonNull Object message,
@NonNull String topic,
@Nullable String idempotencyKey,
@Nullable SerializationStrategy serialization) {
if (serialization == null) serialization = SerializationStrategy.DEFAULT;
executor("send")
.send(destinationId, message, topic, instance().internalWorkflowsService, idempotencyKey);
.send(
destinationId,
message,
topic,
instance().internalWorkflowsService,
idempotencyKey,
serialization);
}

/**
Expand All @@ -571,7 +614,7 @@ public static void send(
*/
public static void send(
@NonNull String destinationId, @NonNull Object message, @NonNull String topic) {
DBOS.send(destinationId, message, topic, null);
DBOS.send(destinationId, message, topic, null, null);
}

/**
Expand All @@ -586,13 +629,29 @@ public static void send(
}

/**
* Call within a workflow to publish a key value pair
* Call within a workflow to publish a key value pair. Uses the workflow's serialization format.
*
* @param key identifier for published data
* @param value data that is published
*/
public static void setEvent(@NonNull String key, @NonNull Object value) {
executor("setEvent").setEvent(key, value);
setEvent(key, value, null);
}

/**
* Call within a workflow to publish a key value pair with a specific serialization strategy.
*
* @param key identifier for published data
* @param value data that is published
* @param serialization serialization strategy to use (null to use workflow's default)
*/
public static void setEvent(
@NonNull String key, @NonNull Object value, @Nullable SerializationStrategy serialization) {
// If no explicit serialization specified, use the workflow context's serialization
if (serialization == null) {
serialization = getSerialization();
}
executor("setEvent").setEvent(key, value, serialization);
}

/**
Expand Down
Loading