Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
b4abb30
vc
GregoryTravis Apr 10, 2026
d87dbc5
Integration tests.
GregoryTravis Apr 13, 2026
40ad564
Options .toBuilder() should duplicate 'this'.
GregoryTravis Apr 14, 2026
64f5cc9
equals and hashCode for StartActivityOptions
GregoryTravis Apr 14, 2026
8c40020
Only throw ActivityAlreadyStartedException if error detail is present
GregoryTravis Apr 14, 2026
6794e92
Same for getActivityResult
GregoryTravis Apr 14, 2026
d26c527
equals/hashcode/tostring for ActivityExecution
GregoryTravis Apr 14, 2026
6dd4263
use-api-design
GregoryTravis Apr 15, 2026
aa4bcf3
match fully
GregoryTravis Apr 20, 2026
5859bf0
More tests
GregoryTravis Apr 20, 2026
b4a27a0
Rename ActivityExecution to ActivityExecutionMetadata.
GregoryTravis Apr 21, 2026
511f1c1
Store ActivityExecutionInfo instead of DescribeActivityExecutionRespo…
GregoryTravis Apr 21, 2026
d3ec5c3
Rename getRetryPolicy to getRetryOptions.
GregoryTravis Apr 21, 2026
416be5a
Missing methods in ActivityExecutionDescription.
GregoryTravis Apr 21, 2026
ee1f4df
Correct naming for interceptor interfaces.
GregoryTravis Apr 21, 2026
282765f
Update ActivityInfo interface.
GregoryTravis Apr 21, 2026
262d63d
More tests.
GregoryTravis Apr 21, 2026
74b48bf
Tests for standalone completion client methods.
GregoryTravis Apr 21, 2026
2324e6d
Interceptor tests.
GregoryTravis Apr 21, 2026
8863baf
Nullable fields.
GregoryTravis Apr 21, 2026
d8bf835
swap args
GregoryTravis Apr 21, 2026
2fc4bae
Rename IsInWorkflow to IsWorkflowActivity.
GregoryTravis Apr 21, 2026
007de18
Merge branch 'master' into gmt/java-standalone-activities
GregoryTravis Apr 22, 2026
381e66c
Test: contextPropagatorValueAppearsInStartActivityHeader.
GregoryTravis Apr 22, 2026
ba898ef
Revert "Test: contextPropagatorValueAppearsInStartActivityHeader."
GregoryTravis Apr 22, 2026
133770e
ActivityClientInterceptor and ActivityClientInterceptorBase.
GregoryTravis Apr 22, 2026
a801751
Correct order for activity interceptors.
GregoryTravis Apr 22, 2026
f10f46f
Rename to initializeClientInvoker.
GregoryTravis Apr 22, 2026
44875e3
Javadoc warnings, unused classes, a deprecated method.
GregoryTravis Apr 22, 2026
0ea7377
Remove runtime rethrow.
GregoryTravis Apr 22, 2026
fedaacd
Pass null instead of "" for summary/details.
GregoryTravis Apr 22, 2026
f9f7dc9
Remove section dividers.
GregoryTravis Apr 22, 2026
cfa9427
useless test comments
GregoryTravis Apr 22, 2026
a2647fc
Enable SAA in test server.
GregoryTravis Apr 23, 2026
0906641
Remove trivial tests.
GregoryTravis Apr 23, 2026
af94c2b
wip
GregoryTravis Apr 23, 2026
2076001
Rename to ActivityClientCallsInterceptorBaseTest.
GregoryTravis Apr 23, 2026
ffd9f71
Non-mocked completion client tests.
GregoryTravis Apr 23, 2026
0068b55
Tweak javadoc
GregoryTravis Apr 23, 2026
5a839d6
Box for capturing
GregoryTravis Apr 24, 2026
cd6aa3e
Box for capturing
GregoryTravis Apr 24, 2026
e92cef8
MethodExtractor
GregoryTravis Apr 24, 2026
f7ebe1f
All overloads of same
GregoryTravis Apr 24, 2026
62e9c3b
Refactor ME
GregoryTravis Apr 24, 2026
d4bf5b1
.start() pulls headers from context propagators.
GregoryTravis Apr 24, 2026
3e99be2
Distinguish standalone method names in completion client.
GregoryTravis Apr 24, 2026
749a8c7
Use long poll token in describeActivity.
GregoryTravis Apr 25, 2026
84d5a4d
Expose lastFailure and raw proto on ActivityExecutionDescription.
GregoryTravis Apr 25, 2026
076073f
Completion handled at gPRC layer.
GregoryTravis Apr 25, 2026
bc467e8
Cache for ActivityHandleImpl.getResultAsync.
GregoryTravis Apr 25, 2026
4ea8ea4
Rename ActivityHandleWrapper to ActivityHandleImpl.
GregoryTravis Apr 26, 2026
cb6a1f7
Javadoc for ActivityClientCallsInterceptor
GregoryTravis Apr 26, 2026
3d381de
ActivityException base class
GregoryTravis Apr 26, 2026
00ecb71
Remove throws clauses for unchecked exceptions
GregoryTravis Apr 26, 2026
0ec8f74
Don't expose ActivityClient.listExecutionsPaginated
GregoryTravis Apr 26, 2026
467682f
Examples for all overloads in ActivityClient
GregoryTravis Apr 26, 2026
1af2a9b
Update temporal-sdk/src/main/java/io/temporal/client/ActivityClient.java
GregoryTravis Apr 26, 2026
5c157de
Merge branch 'gmt/java-standalone-activities' of github.com:temporali…
GregoryTravis Apr 26, 2026
13993a9
Finish removing implementation detail in comment.
GregoryTravis Apr 26, 2026
cbf33f6
Remove trivial tests
GregoryTravis Apr 26, 2026
21a1bb7
Update testFromUntypedWithExplicitTypePassesTypeToInterceptor to make…
GregoryTravis Apr 26, 2026
4463c9e
testGetActivityResultAsyncDelegatesToNext
GregoryTravis Apr 26, 2026
2773588
Merge branch 'master' into gmt/java-standalone-activities
GregoryTravis Apr 27, 2026
dc9188d
Merge branch 'master' into gmt/java-standalone-activities
GregoryTravis Apr 28, 2026
6d54d34
Javadoc: missing import
GregoryTravis Apr 28, 2026
6f5735e
Revert "Use long poll token in describeActivity."
GregoryTravis Apr 28, 2026
172ce53
Address small review changes
GregoryTravis Apr 28, 2026
3a85617
Default implementations for some untyped execute/executeAsync
GregoryTravis Apr 28, 2026
2237e72
Remove ActivityCountOptions
GregoryTravis Apr 28, 2026
6d3450d
Apply DataConverter to results of .getLastFailure
GregoryTravis Apr 29, 2026
c514cf3
Polling can outlast server timeout
GregoryTravis Apr 29, 2026
f322d84
Remove ActivityListOptions and ActivityListPaginatedOptions; keep bot…
GregoryTravis Apr 29, 2026
7328b47
getResult/Async continue polling across the server's long-poll boundary
GregoryTravis Apr 29, 2026
9142f0a
getResult/Async continue polling across the server's long-poll bounda…
GregoryTravis Apr 29, 2026
a3a7e9c
Split slow tests for speed
GregoryTravis Apr 29, 2026
d0cc4b4
Increase timeout tolerance for GetActivityResultOverLongPollWaitTest.
GregoryTravis Apr 29, 2026
5d8d055
Remaining two default overloads of execute/executeAsync, and remove r…
GregoryTravis Apr 30, 2026
2eaf28a
Remove unused listActivitiesPaginated interceptor
GregoryTravis Apr 30, 2026
eddc53e
Add overload to ActivityHandle.getResult with timeout.
GregoryTravis Apr 30, 2026
e2c88a6
TODO
GregoryTravis Apr 30, 2026
b59d1b9
getWorkflowNamespace returns null if no workflow execution
GregoryTravis Apr 30, 2026
c4bf54b
Update comment on ActivityInfo for getActivityNamespace() returning n…
GregoryTravis Apr 30, 2026
632a23d
Remove result caching, will revisit later.
GregoryTravis Apr 30, 2026
d47fc5e
Rename isWorkflowActivity to isInWorkflow
GregoryTravis Apr 30, 2026
1156814
Remove default ActivityClientCallsInterceptor.getActivityResultAsync
GregoryTravis Apr 30, 2026
0cc7209
Move Func7 to the correct spot
GregoryTravis Apr 30, 2026
373c5f9
Remove internal ActivityExecutionDescription.info()
GregoryTravis Apr 30, 2026
fc29246
Tests that check that both only scheduleToCloseTimeout and only start…
GregoryTravis Apr 30, 2026
9429e47
ActivityClientCallsInterceptorChainTest: confirm ordering for 2 inter…
GregoryTravis Apr 30, 2026
e10dbd6
Added tests testGetHandleWithNullRunId and testVoidExecuteOverloadDis…
GregoryTravis Apr 30, 2026
0ee5b7f
Merge branch 'master' into gmt/java-standalone-activities
GregoryTravis Apr 30, 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
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ jobs:
--dynamic-config-value history.enableRequestIdRefLinks=true \
--dynamic-config-value frontend.WorkerHeartbeatsEnabled=true \
--dynamic-config-value frontend.ListWorkersEnabled=true \
--dynamic-config-value 'component.callbacks.allowedAddresses=[{"Pattern":"localhost:7243","AllowInsecure":true}]' &
--dynamic-config-value 'component.callbacks.allowedAddresses=[{"Pattern":"localhost:7243","AllowInsecure":true}]' \
--dynamic-config-value frontend.activityAPIsEnabled=true \
--dynamic-config-value activity.enableStandalone=true \
--dynamic-config-value history.enableChasm=true \
--dynamic-config-value history.enableTransitionHistory=true &
sleep 10s

# Can't actually run tests against Java 8 because Mockito 5 requires Java 11+.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ActivityOutput execute(ActivityInput input) {
tracer,
activityInfo.getActivityType(),
activityInfo.getWorkflowId(),
activityInfo.getRunId(),
activityInfo.getWorkflowRunId(),
rootSpanContext)
.start();
try (Scope scope = tracer.scopeManager().activate(activityRunSpan)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.time.Duration;
import java.util.Optional;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
* Information about the Activity Task that the current Activity Execution is handling. Use {@link
Expand All @@ -21,15 +22,35 @@ public interface ActivityInfo {
byte[] getTaskToken();

/**
* @return WorkflowId of the Workflow Execution that scheduled the Activity Execution.
* @return WorkflowId of the Workflow Execution that scheduled the Activity Execution, or {@code
* null} for standalone activities not scheduled by a workflow.
*/
@Nullable
String getWorkflowId();

/**
* @return RunId of the Workflow Execution that scheduled the Activity Execution.
* @return RunId of the Workflow Execution that scheduled the Activity Execution, or {@code null}
* for standalone activities not scheduled by a workflow.
* @deprecated use {@link #getWorkflowRunId()}
*/
@Deprecated
@Nullable
String getRunId();

/**
* @return RunId of the Workflow Execution that scheduled the Activity Execution, or {@code null}
* for standalone activities not scheduled by a workflow.
*/
@Nullable
String getWorkflowRunId();

/**
* @return the run ID of this standalone Activity Execution, or {@code null} for activities
* scheduled by a workflow.
*/
@Nullable
String getActivityRunId();

/**
* ID of the Activity Execution. This ID can be used to complete the Activity Execution
* asynchronously through {@link io.temporal.client.ActivityCompletionClient#complete(String,
Expand Down Expand Up @@ -82,8 +103,10 @@ public interface ActivityInfo {
Optional<Payloads> getHeartbeatDetails();

/**
* @return the Workflow Type of the Workflow Execution that executed the Activity.
* @return the Workflow Type of the Workflow Execution that executed the Activity, or {@code null}
* for standalone activities not scheduled by a workflow.
*/
@Nullable
String getWorkflowType();

/**
Expand All @@ -92,10 +115,12 @@ public interface ActivityInfo {
* same namespace, hence no need for different {@code getWorkflowNamespace()} and {@link
* #getActivityNamespace()} methods.
*
* @return the Namespace of Workflow Execution that scheduled the Activity.
* @return the Namespace of Workflow Execution that scheduled the Activity, or null for standalone
* activities.
* @deprecated use {@link #getNamespace()}
*/
@Deprecated
@Nullable
String getWorkflowNamespace();

/**
Expand All @@ -110,8 +135,19 @@ public interface ActivityInfo {
@Deprecated
String getActivityNamespace();
Comment thread
GregoryTravis marked this conversation as resolved.

/**
* @return the Namespace of this Activity Execution.
*/
String getNamespace();
Comment thread
GregoryTravis marked this conversation as resolved.

/**
* @return {@code true} if this activity was scheduled by a workflow execution; {@code false} for
* standalone activities.
*/
Comment thread
GregoryTravis marked this conversation as resolved.
default boolean isInWorkflow() {
return getWorkflowId() != null;
}

String getActivityTaskQueue();

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package io.temporal.client;

import io.temporal.common.Experimental;
import javax.annotation.Nullable;

/**
* Thrown by {@link ActivityClient#start} when the server returns an ALREADY_EXISTS error because an
* activity with the same ID is already running (or has a completed run that conflicts with the
* requested {@link StartActivityOptions#getIdReusePolicy()} / {@link
* StartActivityOptions#getIdConflictPolicy()}).
*/
@Experimental
public final class ActivityAlreadyStartedException extends ActivityException {

private final String activityType;

public ActivityAlreadyStartedException(
String activityId, String activityType, @Nullable String runId, Throwable cause) {
super(
"Activity already started: activityId='"
+ activityId
+ "', activityType='"
+ activityType
+ (runId != null ? "', runId='" + runId + "'" : "'"),
activityId,
runId,
cause);
this.activityType = activityType;
}

/** The activity type that was requested. */
public String getActivityType() {
return activityType;
}
}
Loading
Loading