diff --git a/src/main/java/io/temporal/activity/Activity.java b/src/main/java/io/temporal/activity/Activity.java index ae109d6293..0cc1000cde 100644 --- a/src/main/java/io/temporal/activity/Activity.java +++ b/src/main/java/io/temporal/activity/Activity.java @@ -22,7 +22,7 @@ import io.temporal.client.ActivityCompletionException; import io.temporal.internal.sync.ActivityInternal; import io.temporal.internal.sync.WorkflowInternal; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.serviceclient.WorkflowServiceStubs; import io.temporal.workflow.ActivityException; import io.temporal.workflow.ActivityTimeoutException; diff --git a/src/main/java/io/temporal/activity/ActivityTask.java b/src/main/java/io/temporal/activity/ActivityTask.java index 66132a925c..74e0cf3f22 100644 --- a/src/main/java/io/temporal/activity/ActivityTask.java +++ b/src/main/java/io/temporal/activity/ActivityTask.java @@ -20,8 +20,8 @@ package io.temporal.activity; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; import java.time.Duration; import java.util.Optional; diff --git a/src/main/java/io/temporal/client/ActivityCompletionClient.java b/src/main/java/io/temporal/client/ActivityCompletionClient.java index 5810f3c98f..d363412389 100644 --- a/src/main/java/io/temporal/client/ActivityCompletionClient.java +++ b/src/main/java/io/temporal/client/ActivityCompletionClient.java @@ -20,7 +20,7 @@ package io.temporal.client; import io.temporal.activity.Activity; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.util.concurrent.CancellationException; /** diff --git a/src/main/java/io/temporal/client/ActivityCompletionException.java b/src/main/java/io/temporal/client/ActivityCompletionException.java index 4f99054645..6acfb2bc40 100644 --- a/src/main/java/io/temporal/client/ActivityCompletionException.java +++ b/src/main/java/io/temporal/client/ActivityCompletionException.java @@ -20,7 +20,7 @@ package io.temporal.client; import io.temporal.activity.ActivityTask; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; /** Base exception for all failures returned by an activity completion client. */ public class ActivityCompletionException extends RuntimeException { diff --git a/src/main/java/io/temporal/client/DuplicateWorkflowException.java b/src/main/java/io/temporal/client/DuplicateWorkflowException.java index 5eef56004e..2459e28d70 100644 --- a/src/main/java/io/temporal/client/DuplicateWorkflowException.java +++ b/src/main/java/io/temporal/client/DuplicateWorkflowException.java @@ -19,7 +19,7 @@ package io.temporal.client; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.util.Optional; /** diff --git a/src/main/java/io/temporal/client/WorkflowClient.java b/src/main/java/io/temporal/client/WorkflowClient.java index cf6512e57c..8eab736086 100644 --- a/src/main/java/io/temporal/client/WorkflowClient.java +++ b/src/main/java/io/temporal/client/WorkflowClient.java @@ -21,7 +21,7 @@ import io.temporal.activity.Activity; import io.temporal.internal.sync.WorkflowClientInternal; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.serviceclient.WorkflowServiceStubs; import io.temporal.workflow.Functions; import io.temporal.workflow.Functions.Func; diff --git a/src/main/java/io/temporal/client/WorkflowClientInterceptor.java b/src/main/java/io/temporal/client/WorkflowClientInterceptor.java index 6edd29294f..cb90df73f6 100644 --- a/src/main/java/io/temporal/client/WorkflowClientInterceptor.java +++ b/src/main/java/io/temporal/client/WorkflowClientInterceptor.java @@ -19,7 +19,7 @@ package io.temporal.client; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.util.Optional; public interface WorkflowClientInterceptor { diff --git a/src/main/java/io/temporal/client/WorkflowClientInterceptorBase.java b/src/main/java/io/temporal/client/WorkflowClientInterceptorBase.java index 9d1baa4952..f22099ad75 100644 --- a/src/main/java/io/temporal/client/WorkflowClientInterceptorBase.java +++ b/src/main/java/io/temporal/client/WorkflowClientInterceptorBase.java @@ -19,7 +19,7 @@ package io.temporal.client; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.util.Optional; public class WorkflowClientInterceptorBase implements WorkflowClientInterceptor { diff --git a/src/main/java/io/temporal/client/WorkflowException.java b/src/main/java/io/temporal/client/WorkflowException.java index 3accfb7ec6..dfa1aee22c 100644 --- a/src/main/java/io/temporal/client/WorkflowException.java +++ b/src/main/java/io/temporal/client/WorkflowException.java @@ -19,7 +19,7 @@ package io.temporal.client; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.ChildWorkflowException; import java.util.Optional; diff --git a/src/main/java/io/temporal/client/WorkflowFailureException.java b/src/main/java/io/temporal/client/WorkflowFailureException.java index 49c8081073..9247bb6493 100644 --- a/src/main/java/io/temporal/client/WorkflowFailureException.java +++ b/src/main/java/io/temporal/client/WorkflowFailureException.java @@ -19,7 +19,7 @@ package io.temporal.client; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.util.Optional; /** diff --git a/src/main/java/io/temporal/client/WorkflowNotFoundException.java b/src/main/java/io/temporal/client/WorkflowNotFoundException.java index 0d9c225e2b..5beeca03cf 100644 --- a/src/main/java/io/temporal/client/WorkflowNotFoundException.java +++ b/src/main/java/io/temporal/client/WorkflowNotFoundException.java @@ -19,7 +19,7 @@ package io.temporal.client; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.util.Optional; /** diff --git a/src/main/java/io/temporal/client/WorkflowQueryException.java b/src/main/java/io/temporal/client/WorkflowQueryException.java index 0adaf40217..1a5d357aa9 100644 --- a/src/main/java/io/temporal/client/WorkflowQueryException.java +++ b/src/main/java/io/temporal/client/WorkflowQueryException.java @@ -19,7 +19,7 @@ package io.temporal.client; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.util.Optional; public class WorkflowQueryException extends WorkflowException { diff --git a/src/main/java/io/temporal/client/WorkflowQueryRejectedException.java b/src/main/java/io/temporal/client/WorkflowQueryRejectedException.java index edf265af27..911ee34c85 100644 --- a/src/main/java/io/temporal/client/WorkflowQueryRejectedException.java +++ b/src/main/java/io/temporal/client/WorkflowQueryRejectedException.java @@ -19,7 +19,7 @@ package io.temporal.client; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.execution.WorkflowExecutionStatus; import io.temporal.proto.query.QueryRejectCondition; diff --git a/src/main/java/io/temporal/client/WorkflowServiceException.java b/src/main/java/io/temporal/client/WorkflowServiceException.java index a11c5663de..f40009ee69 100644 --- a/src/main/java/io/temporal/client/WorkflowServiceException.java +++ b/src/main/java/io/temporal/client/WorkflowServiceException.java @@ -20,7 +20,7 @@ package io.temporal.client; import io.temporal.internal.common.CheckedExceptionWrapper; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.util.Optional; public final class WorkflowServiceException extends WorkflowException { diff --git a/src/main/java/io/temporal/client/WorkflowStub.java b/src/main/java/io/temporal/client/WorkflowStub.java index 0aa68f3fdd..ab037eef67 100644 --- a/src/main/java/io/temporal/client/WorkflowStub.java +++ b/src/main/java/io/temporal/client/WorkflowStub.java @@ -20,7 +20,7 @@ package io.temporal.client; import io.temporal.internal.sync.StubMarker; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.query.QueryRejectCondition; import java.lang.reflect.Type; import java.util.Optional; diff --git a/src/main/java/io/temporal/client/WorkflowTerminatedException.java b/src/main/java/io/temporal/client/WorkflowTerminatedException.java index 0b83e8920f..1cdc510391 100644 --- a/src/main/java/io/temporal/client/WorkflowTerminatedException.java +++ b/src/main/java/io/temporal/client/WorkflowTerminatedException.java @@ -19,7 +19,7 @@ package io.temporal.client; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.util.Optional; /** diff --git a/src/main/java/io/temporal/client/WorkflowTimedOutException.java b/src/main/java/io/temporal/client/WorkflowTimedOutException.java index 11b9c289f5..4e622d36f2 100644 --- a/src/main/java/io/temporal/client/WorkflowTimedOutException.java +++ b/src/main/java/io/temporal/client/WorkflowTimedOutException.java @@ -19,8 +19,8 @@ package io.temporal.client; -import io.temporal.proto.event.TimeoutType; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.TimeoutType; +import io.temporal.proto.common.WorkflowExecution; import java.util.Optional; /** diff --git a/src/main/java/io/temporal/common/interceptors/WorkflowCallsInterceptor.java b/src/main/java/io/temporal/common/interceptors/WorkflowCallsInterceptor.java index 232c8e2d8a..6678e0bcf7 100644 --- a/src/main/java/io/temporal/common/interceptors/WorkflowCallsInterceptor.java +++ b/src/main/java/io/temporal/common/interceptors/WorkflowCallsInterceptor.java @@ -21,7 +21,7 @@ import io.temporal.activity.ActivityOptions; import io.temporal.activity.LocalActivityOptions; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.ChildWorkflowOptions; import io.temporal.workflow.ContinueAsNewOptions; import io.temporal.workflow.Functions; diff --git a/src/main/java/io/temporal/common/interceptors/WorkflowCallsInterceptorBase.java b/src/main/java/io/temporal/common/interceptors/WorkflowCallsInterceptorBase.java index 58f523a748..d9ac8315a5 100644 --- a/src/main/java/io/temporal/common/interceptors/WorkflowCallsInterceptorBase.java +++ b/src/main/java/io/temporal/common/interceptors/WorkflowCallsInterceptorBase.java @@ -21,7 +21,7 @@ import io.temporal.activity.ActivityOptions; import io.temporal.activity.LocalActivityOptions; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.ChildWorkflowOptions; import io.temporal.workflow.ContinueAsNewOptions; import io.temporal.workflow.Functions; diff --git a/src/main/java/io/temporal/internal/common/GrpcRetryer.java b/src/main/java/io/temporal/internal/common/GrpcRetryer.java index 2225d66dc5..9aba6d5dcd 100644 --- a/src/main/java/io/temporal/internal/common/GrpcRetryer.java +++ b/src/main/java/io/temporal/internal/common/GrpcRetryer.java @@ -23,7 +23,7 @@ import io.grpc.Status; import io.grpc.StatusRuntimeException; -import io.temporal.proto.failure.QueryFailed; +import io.temporal.proto.errordetails.QueryFailedFailure; import java.time.Duration; import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; @@ -61,7 +61,7 @@ public final class GrpcRetryer { .addDoNotRetry(Status.Code.UNAUTHENTICATED, null) .addDoNotRetry(Status.Code.UNIMPLEMENTED, null) .addDoNotRetry(Status.Code.CANCELLED, null) - .addDoNotRetry(Status.Code.INTERNAL, QueryFailed.class); + .addDoNotRetry(Status.Code.INTERNAL, QueryFailedFailure.class); DEFAULT_SERVICE_OPERATION_RETRY_OPTIONS = roBuilder.validateBuildWithDefaults(); } diff --git a/src/main/java/io/temporal/internal/common/RetryParameters.java b/src/main/java/io/temporal/internal/common/RetryParameters.java index a3ba7b7999..252852a4aa 100644 --- a/src/main/java/io/temporal/internal/common/RetryParameters.java +++ b/src/main/java/io/temporal/internal/common/RetryParameters.java @@ -48,7 +48,7 @@ public RetryParameters(RetryOptions retryOptions) { for (Class r : doNotRetry) { reasons.add(r.getName()); } - setNonRetriableErrorReasons(reasons); + setNonRetriableErrorTypes(reasons); } } @@ -86,18 +86,18 @@ public void setMaximumAttempts(int maximumAttempts) { this.maximumAttempts = maximumAttempts; } - public List getNonRetriableErrorReasons() { + public List getNonRetriableErrorTypes() { return nonRetriableErrorReasons == null ? new ArrayList<>() : nonRetriableErrorReasons; } - public void setNonRetriableErrorReasons(List nonRetriableErrorReasons) { + public void setNonRetriableErrorTypes(List nonRetriableErrorReasons) { this.nonRetriableErrorReasons = nonRetriableErrorReasons; } public RetryParameters copy() { RetryParameters result = new RetryParameters(); result.setMaximumIntervalInSeconds(maximumIntervalInSeconds); - result.setNonRetriableErrorReasons(new ImmutableList<>(nonRetriableErrorReasons)); + result.setNonRetriableErrorTypes(new ImmutableList<>(nonRetriableErrorReasons)); result.setInitialIntervalInSeconds(initialIntervalInSeconds); result.setMaximumAttempts(maximumAttempts); result.setBackoffCoefficient(backoffCoefficient); @@ -111,7 +111,7 @@ public RetryPolicy toRetryPolicy() { + getInitialIntervalInSeconds()); } return RetryPolicy.newBuilder() - .addAllNonRetriableErrorReasons(getNonRetriableErrorReasons()) + .addAllNonRetryableErrorTypes(getNonRetriableErrorTypes()) .setMaximumAttempts(getMaximumAttempts()) .setInitialIntervalInSeconds(getInitialIntervalInSeconds()) .setBackoffCoefficient(getBackoffCoefficient()) diff --git a/src/main/java/io/temporal/internal/common/StartWorkflowExecutionParameters.java b/src/main/java/io/temporal/internal/common/StartWorkflowExecutionParameters.java index a89170bb98..45f994e371 100644 --- a/src/main/java/io/temporal/internal/common/StartWorkflowExecutionParameters.java +++ b/src/main/java/io/temporal/internal/common/StartWorkflowExecutionParameters.java @@ -355,7 +355,7 @@ public static StartWorkflowExecutionParameters fromWorkflowOptions(WorkflowOptio for (Class r : doNotRetry) { reasons.add(r.getName()); } - rp.setNonRetriableErrorReasons(reasons); + rp.setNonRetriableErrorTypes(reasons); } parameters.setRetryParameters(rp); } diff --git a/src/main/java/io/temporal/internal/common/TerminateWorkflowExecutionParameters.java b/src/main/java/io/temporal/internal/common/TerminateWorkflowExecutionParameters.java index dc9912630e..cf6ff44ad0 100644 --- a/src/main/java/io/temporal/internal/common/TerminateWorkflowExecutionParameters.java +++ b/src/main/java/io/temporal/internal/common/TerminateWorkflowExecutionParameters.java @@ -20,7 +20,7 @@ package io.temporal.internal.common; import io.temporal.proto.common.Payloads; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; public class TerminateWorkflowExecutionParameters { diff --git a/src/main/java/io/temporal/internal/common/WorkflowExecutionHistory.java b/src/main/java/io/temporal/internal/common/WorkflowExecutionHistory.java index a1fe35dd05..21cfe46966 100644 --- a/src/main/java/io/temporal/internal/common/WorkflowExecutionHistory.java +++ b/src/main/java/io/temporal/internal/common/WorkflowExecutionHistory.java @@ -30,9 +30,9 @@ import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import com.google.gson.reflect.TypeToken; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.event.EventType; import io.temporal.proto.event.HistoryEvent; -import io.temporal.proto.execution.WorkflowExecution; import java.lang.reflect.Type; import java.nio.ByteBuffer; import java.util.Base64; diff --git a/src/main/java/io/temporal/internal/common/WorkflowExecutionUtils.java b/src/main/java/io/temporal/internal/common/WorkflowExecutionUtils.java index 65eec80c06..c30ac75e37 100644 --- a/src/main/java/io/temporal/internal/common/WorkflowExecutionUtils.java +++ b/src/main/java/io/temporal/internal/common/WorkflowExecutionUtils.java @@ -34,6 +34,7 @@ import io.temporal.client.WorkflowTimedOutException; import io.temporal.common.converter.DataConverter; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.decision.Decision; import io.temporal.proto.decision.DecisionType; import io.temporal.proto.event.EventType; @@ -46,7 +47,6 @@ import io.temporal.proto.event.WorkflowExecutionFailedEventAttributes; import io.temporal.proto.event.WorkflowExecutionTerminatedEventAttributes; import io.temporal.proto.event.WorkflowExecutionTimedOutEventAttributes; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.execution.WorkflowExecutionInfo; import io.temporal.proto.execution.WorkflowExecutionStatus; import io.temporal.proto.filter.HistoryEventFilterType; diff --git a/src/main/java/io/temporal/internal/external/GenericWorkflowClientExternal.java b/src/main/java/io/temporal/internal/external/GenericWorkflowClientExternal.java index e9dfb82b48..f69b269a62 100644 --- a/src/main/java/io/temporal/internal/external/GenericWorkflowClientExternal.java +++ b/src/main/java/io/temporal/internal/external/GenericWorkflowClientExternal.java @@ -24,7 +24,7 @@ import io.temporal.internal.common.TerminateWorkflowExecutionParameters; import io.temporal.internal.replay.QueryWorkflowParameters; import io.temporal.internal.replay.SignalExternalWorkflowParameters; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.workflowservice.QueryWorkflowResponse; import io.temporal.serviceclient.WorkflowServiceStubs; diff --git a/src/main/java/io/temporal/internal/external/GenericWorkflowClientExternalImpl.java b/src/main/java/io/temporal/internal/external/GenericWorkflowClientExternalImpl.java index 66eba8e2e6..580edc2d52 100644 --- a/src/main/java/io/temporal/internal/external/GenericWorkflowClientExternalImpl.java +++ b/src/main/java/io/temporal/internal/external/GenericWorkflowClientExternalImpl.java @@ -40,7 +40,7 @@ import io.temporal.proto.common.Payloads; import io.temporal.proto.common.RetryPolicy; import io.temporal.proto.common.SearchAttributes; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.query.WorkflowQuery; import io.temporal.proto.tasklist.TaskList; import io.temporal.proto.workflowservice.QueryWorkflowRequest; @@ -188,7 +188,7 @@ private RetryPolicy toRetryPolicy(RetryParameters retryParameters) { .setInitialIntervalInSeconds(retryParameters.getInitialIntervalInSeconds()) .setMaximumAttempts(retryParameters.getMaximumAttempts()) .setMaximumIntervalInSeconds(retryParameters.getMaximumIntervalInSeconds()) - .addAllNonRetriableErrorReasons(retryParameters.getNonRetriableErrorReasons()) + .addAllNonRetryableErrorTypes(retryParameters.getNonRetriableErrorTypes()) .build(); } diff --git a/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientFactory.java b/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientFactory.java index 376d8e3f99..b1e13dbbf4 100644 --- a/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientFactory.java +++ b/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientFactory.java @@ -19,7 +19,7 @@ package io.temporal.internal.external; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; public interface ManualActivityCompletionClientFactory { diff --git a/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientFactoryImpl.java b/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientFactoryImpl.java index 275aad9045..757f394856 100644 --- a/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientFactoryImpl.java +++ b/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientFactoryImpl.java @@ -23,7 +23,7 @@ import com.uber.m3.util.ImmutableMap; import io.temporal.common.converter.DataConverter; import io.temporal.internal.metrics.MetricsTag; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.serviceclient.WorkflowServiceStubs; import java.util.Map; import java.util.Objects; diff --git a/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientImpl.java b/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientImpl.java index 0a91b3eb45..d94459b895 100644 --- a/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientImpl.java +++ b/src/main/java/io/temporal/internal/external/ManualActivityCompletionClientImpl.java @@ -31,7 +31,7 @@ import io.temporal.internal.common.OptionsUtils; import io.temporal.internal.metrics.MetricsType; import io.temporal.proto.common.Payloads; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatByIdRequest; import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatByIdResponse; import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatRequest; diff --git a/src/main/java/io/temporal/internal/replay/ActivityDecisionContext.java b/src/main/java/io/temporal/internal/replay/ActivityDecisionContext.java index 519096e9e7..63018a9706 100644 --- a/src/main/java/io/temporal/internal/replay/ActivityDecisionContext.java +++ b/src/main/java/io/temporal/internal/replay/ActivityDecisionContext.java @@ -26,13 +26,13 @@ import io.temporal.proto.common.ActivityType; import io.temporal.proto.common.Header; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.TimeoutType; import io.temporal.proto.decision.ScheduleActivityTaskDecisionAttributes; import io.temporal.proto.event.ActivityTaskCanceledEventAttributes; import io.temporal.proto.event.ActivityTaskCompletedEventAttributes; import io.temporal.proto.event.ActivityTaskFailedEventAttributes; import io.temporal.proto.event.ActivityTaskTimedOutEventAttributes; import io.temporal.proto.event.HistoryEvent; -import io.temporal.proto.event.TimeoutType; import io.temporal.proto.tasklist.TaskList; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/io/temporal/internal/replay/ActivityDecisionStateMachine.java b/src/main/java/io/temporal/internal/replay/ActivityDecisionStateMachine.java index 30f664d9c5..47d5cef124 100644 --- a/src/main/java/io/temporal/internal/replay/ActivityDecisionStateMachine.java +++ b/src/main/java/io/temporal/internal/replay/ActivityDecisionStateMachine.java @@ -31,18 +31,23 @@ final class ActivityDecisionStateMachine extends DecisionStateMachineBase { private long scheduledEventId; public ActivityDecisionStateMachine( - DecisionId id, ScheduleActivityTaskDecisionAttributes scheduleAttributes) { + DecisionId id, + ScheduleActivityTaskDecisionAttributes scheduleAttributes, + long scheduledEventId) { super(id); this.scheduleAttributes = scheduleAttributes; + this.scheduledEventId = scheduledEventId; } /** Used for unit testing */ ActivityDecisionStateMachine( DecisionId id, ScheduleActivityTaskDecisionAttributes scheduleAttributes, - DecisionState state) { + DecisionState state, + long scheduledEventId) { super(id, state); this.scheduleAttributes = scheduleAttributes; + this.scheduledEventId = scheduledEventId; } @Override diff --git a/src/main/java/io/temporal/internal/replay/ActivityTaskTimeoutException.java b/src/main/java/io/temporal/internal/replay/ActivityTaskTimeoutException.java index c5f20a23ab..042e5926eb 100644 --- a/src/main/java/io/temporal/internal/replay/ActivityTaskTimeoutException.java +++ b/src/main/java/io/temporal/internal/replay/ActivityTaskTimeoutException.java @@ -21,7 +21,7 @@ import io.temporal.proto.common.ActivityType; import io.temporal.proto.common.Payloads; -import io.temporal.proto.event.TimeoutType; +import io.temporal.proto.common.TimeoutType; import java.util.Optional; /** Exception that indicates Activity time out. */ diff --git a/src/main/java/io/temporal/internal/replay/ChildWorkflowTaskFailedException.java b/src/main/java/io/temporal/internal/replay/ChildWorkflowTaskFailedException.java index 4ad06e4d2f..1f42bedf4e 100644 --- a/src/main/java/io/temporal/internal/replay/ChildWorkflowTaskFailedException.java +++ b/src/main/java/io/temporal/internal/replay/ChildWorkflowTaskFailedException.java @@ -20,8 +20,8 @@ package io.temporal.internal.replay; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; import java.util.Optional; /** Internal. Do not catch or throw by application level code. */ diff --git a/src/main/java/io/temporal/internal/replay/DecisionContext.java b/src/main/java/io/temporal/internal/replay/DecisionContext.java index 1f0e0e8c61..7cecdf7301 100644 --- a/src/main/java/io/temporal/internal/replay/DecisionContext.java +++ b/src/main/java/io/temporal/internal/replay/DecisionContext.java @@ -24,8 +24,8 @@ import io.temporal.common.converter.DataConverter; import io.temporal.proto.common.Payloads; import io.temporal.proto.common.SearchAttributes; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.workflowservice.PollForDecisionTaskResponse; import io.temporal.workflow.Functions.Func; import io.temporal.workflow.Functions.Func1; diff --git a/src/main/java/io/temporal/internal/replay/DecisionContextImpl.java b/src/main/java/io/temporal/internal/replay/DecisionContextImpl.java index ddea345a58..fed9bb0822 100644 --- a/src/main/java/io/temporal/internal/replay/DecisionContextImpl.java +++ b/src/main/java/io/temporal/internal/replay/DecisionContextImpl.java @@ -27,6 +27,7 @@ import io.temporal.internal.worker.SingleWorkerOptions; import io.temporal.proto.common.Payloads; import io.temporal.proto.common.SearchAttributes; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; import io.temporal.proto.event.DecisionTaskFailedCause; import io.temporal.proto.event.DecisionTaskFailedEventAttributes; @@ -34,7 +35,6 @@ import io.temporal.proto.event.TimerFiredEventAttributes; import io.temporal.proto.event.UpsertWorkflowSearchAttributesEventAttributes; import io.temporal.proto.event.WorkflowExecutionStartedEventAttributes; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.workflowservice.PollForDecisionTaskResponseOrBuilder; import io.temporal.workflow.Functions.Func; import io.temporal.workflow.Functions.Func1; diff --git a/src/main/java/io/temporal/internal/replay/DecisionsHelper.java b/src/main/java/io/temporal/internal/replay/DecisionsHelper.java index e78d0b2dc5..915cafc62d 100644 --- a/src/main/java/io/temporal/internal/replay/DecisionsHelper.java +++ b/src/main/java/io/temporal/internal/replay/DecisionsHelper.java @@ -124,7 +124,8 @@ long scheduleActivityTask(ScheduleActivityTaskDecisionAttributes schedule) { long nextDecisionEventId = getNextDecisionEventId(); DecisionId decisionId = new DecisionId(DecisionTarget.ACTIVITY, nextDecisionEventId); activityIdToScheduledEventId.put(schedule.getActivityId(), nextDecisionEventId); - addDecision(decisionId, new ActivityDecisionStateMachine(decisionId, schedule)); + addDecision( + decisionId, new ActivityDecisionStateMachine(decisionId, schedule, nextDecisionEventId)); return nextDecisionEventId; } diff --git a/src/main/java/io/temporal/internal/replay/ExecuteLocalActivityParameters.java b/src/main/java/io/temporal/internal/replay/ExecuteLocalActivityParameters.java index e66466c015..bf458be475 100644 --- a/src/main/java/io/temporal/internal/replay/ExecuteLocalActivityParameters.java +++ b/src/main/java/io/temporal/internal/replay/ExecuteLocalActivityParameters.java @@ -22,7 +22,7 @@ import io.temporal.common.RetryOptions; import io.temporal.proto.common.ActivityType; import io.temporal.proto.common.Payloads; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.time.Duration; public class ExecuteLocalActivityParameters { diff --git a/src/main/java/io/temporal/internal/replay/OpenChildWorkflowRequestInfo.java b/src/main/java/io/temporal/internal/replay/OpenChildWorkflowRequestInfo.java index cee4946155..a070e25b66 100644 --- a/src/main/java/io/temporal/internal/replay/OpenChildWorkflowRequestInfo.java +++ b/src/main/java/io/temporal/internal/replay/OpenChildWorkflowRequestInfo.java @@ -20,7 +20,7 @@ package io.temporal.internal.replay; import io.temporal.proto.common.Payloads; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.ChildWorkflowCancellationType; import java.util.Optional; import java.util.function.Consumer; diff --git a/src/main/java/io/temporal/internal/replay/ReplayDecisionTaskHandler.java b/src/main/java/io/temporal/internal/replay/ReplayDecisionTaskHandler.java index b4315bf7d5..c0281a34eb 100644 --- a/src/main/java/io/temporal/internal/replay/ReplayDecisionTaskHandler.java +++ b/src/main/java/io/temporal/internal/replay/ReplayDecisionTaskHandler.java @@ -29,10 +29,10 @@ import io.temporal.internal.worker.LocalActivityWorker; import io.temporal.internal.worker.SingleWorkerOptions; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; import io.temporal.proto.decision.StickyExecutionAttributes; import io.temporal.proto.event.HistoryEvent; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.query.QueryResultType; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryRequest; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryResponse; diff --git a/src/main/java/io/temporal/internal/replay/WorkflowContext.java b/src/main/java/io/temporal/internal/replay/WorkflowContext.java index 04d3cd4345..d8e9571832 100644 --- a/src/main/java/io/temporal/internal/replay/WorkflowContext.java +++ b/src/main/java/io/temporal/internal/replay/WorkflowContext.java @@ -23,9 +23,9 @@ import io.temporal.proto.common.Header; import io.temporal.proto.common.Payload; import io.temporal.proto.common.SearchAttributes; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; import io.temporal.proto.event.WorkflowExecutionStartedEventAttributes; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.workflowservice.PollForDecisionTaskResponseOrBuilder; import java.time.Duration; import java.util.HashMap; diff --git a/src/main/java/io/temporal/internal/replay/WorkflowDecisionContext.java b/src/main/java/io/temporal/internal/replay/WorkflowDecisionContext.java index 4f3cb75cec..49815a6ccc 100644 --- a/src/main/java/io/temporal/internal/replay/WorkflowDecisionContext.java +++ b/src/main/java/io/temporal/internal/replay/WorkflowDecisionContext.java @@ -26,6 +26,7 @@ import io.temporal.proto.common.Header; import io.temporal.proto.common.ParentClosePolicy; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; import io.temporal.proto.decision.RequestCancelExternalWorkflowExecutionDecisionAttributes; import io.temporal.proto.decision.SignalExternalWorkflowExecutionDecisionAttributes; @@ -42,7 +43,6 @@ import io.temporal.proto.event.SignalExternalWorkflowExecutionFailedEventAttributes; import io.temporal.proto.event.StartChildWorkflowExecutionFailedEventAttributes; import io.temporal.proto.event.WorkflowExecutionFailedCause; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.tasklist.TaskList; import io.temporal.workflow.ChildWorkflowCancellationType; import io.temporal.workflow.ChildWorkflowTerminatedException; diff --git a/src/main/java/io/temporal/internal/sync/ActivityCompletionClientImpl.java b/src/main/java/io/temporal/internal/sync/ActivityCompletionClientImpl.java index 9034e9336b..957d65f32b 100644 --- a/src/main/java/io/temporal/internal/sync/ActivityCompletionClientImpl.java +++ b/src/main/java/io/temporal/internal/sync/ActivityCompletionClientImpl.java @@ -22,7 +22,7 @@ import io.temporal.client.ActivityCompletionClient; import io.temporal.client.ActivityCompletionException; import io.temporal.internal.external.ManualActivityCompletionClientFactory; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; class ActivityCompletionClientImpl implements ActivityCompletionClient { diff --git a/src/main/java/io/temporal/internal/sync/ActivityExecutionContext.java b/src/main/java/io/temporal/internal/sync/ActivityExecutionContext.java index f125d58441..2ab5c3b588 100644 --- a/src/main/java/io/temporal/internal/sync/ActivityExecutionContext.java +++ b/src/main/java/io/temporal/internal/sync/ActivityExecutionContext.java @@ -40,7 +40,7 @@ public interface ActivityExecutionContext { byte[] getTaskToken(); /** @return workfow execution that requested the activity execution */ - io.temporal.proto.execution.WorkflowExecution getWorkflowExecution(); + io.temporal.proto.common.WorkflowExecution getWorkflowExecution(); /** @return task that caused activity execution */ ActivityTask getTask(); diff --git a/src/main/java/io/temporal/internal/sync/ActivityExecutionContextImpl.java b/src/main/java/io/temporal/internal/sync/ActivityExecutionContextImpl.java index 72fa377675..9aa9010dad 100644 --- a/src/main/java/io/temporal/internal/sync/ActivityExecutionContextImpl.java +++ b/src/main/java/io/temporal/internal/sync/ActivityExecutionContextImpl.java @@ -30,7 +30,7 @@ import io.temporal.common.converter.DataConverter; import io.temporal.internal.common.OptionsUtils; import io.temporal.proto.common.Payloads; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatRequest; import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatResponse; import io.temporal.serviceclient.WorkflowServiceStubs; diff --git a/src/main/java/io/temporal/internal/sync/ActivityTaskImpl.java b/src/main/java/io/temporal/internal/sync/ActivityTaskImpl.java index f0ef16c5b1..ab527aba2d 100644 --- a/src/main/java/io/temporal/internal/sync/ActivityTaskImpl.java +++ b/src/main/java/io/temporal/internal/sync/ActivityTaskImpl.java @@ -21,8 +21,8 @@ import io.temporal.activity.ActivityTask; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.workflowservice.PollForActivityTaskResponse; import java.time.Duration; import java.util.Optional; diff --git a/src/main/java/io/temporal/internal/sync/ChildWorkflowStubImpl.java b/src/main/java/io/temporal/internal/sync/ChildWorkflowStubImpl.java index fcf1ab52b2..3b08360faf 100644 --- a/src/main/java/io/temporal/internal/sync/ChildWorkflowStubImpl.java +++ b/src/main/java/io/temporal/internal/sync/ChildWorkflowStubImpl.java @@ -22,7 +22,7 @@ import com.google.common.base.Defaults; import io.temporal.common.interceptors.WorkflowCallsInterceptor; import io.temporal.common.interceptors.WorkflowCallsInterceptor.WorkflowResult; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.ChildWorkflowException; import io.temporal.workflow.ChildWorkflowOptions; import io.temporal.workflow.ChildWorkflowStub; diff --git a/src/main/java/io/temporal/internal/sync/DeterministicRunnerImpl.java b/src/main/java/io/temporal/internal/sync/DeterministicRunnerImpl.java index f54baf2285..e049b51e78 100644 --- a/src/main/java/io/temporal/internal/sync/DeterministicRunnerImpl.java +++ b/src/main/java/io/temporal/internal/sync/DeterministicRunnerImpl.java @@ -36,8 +36,8 @@ import io.temporal.internal.replay.StartChildWorkflowExecutionParameters; import io.temporal.proto.common.Payloads; import io.temporal.proto.common.SearchAttributes; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.workflow.Functions.Func; import io.temporal.workflow.Functions.Func1; import io.temporal.workflow.Promise; diff --git a/src/main/java/io/temporal/internal/sync/ExternalWorkflowInvocationHandler.java b/src/main/java/io/temporal/internal/sync/ExternalWorkflowInvocationHandler.java index 4a02a76f3f..76e14cf3f0 100644 --- a/src/main/java/io/temporal/internal/sync/ExternalWorkflowInvocationHandler.java +++ b/src/main/java/io/temporal/internal/sync/ExternalWorkflowInvocationHandler.java @@ -20,7 +20,7 @@ package io.temporal.internal.sync; import io.temporal.common.interceptors.WorkflowCallsInterceptor; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.ExternalWorkflowStub; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; diff --git a/src/main/java/io/temporal/internal/sync/ExternalWorkflowStubImpl.java b/src/main/java/io/temporal/internal/sync/ExternalWorkflowStubImpl.java index 4c7462509c..63201c0dd6 100644 --- a/src/main/java/io/temporal/internal/sync/ExternalWorkflowStubImpl.java +++ b/src/main/java/io/temporal/internal/sync/ExternalWorkflowStubImpl.java @@ -20,7 +20,7 @@ package io.temporal.internal.sync; import io.temporal.common.interceptors.WorkflowCallsInterceptor; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.CancelExternalWorkflowException; import io.temporal.workflow.ExternalWorkflowStub; import io.temporal.workflow.Promise; diff --git a/src/main/java/io/temporal/internal/sync/LocalActivityExecutionContextImpl.java b/src/main/java/io/temporal/internal/sync/LocalActivityExecutionContextImpl.java index 43a927d6d0..8069c9274d 100644 --- a/src/main/java/io/temporal/internal/sync/LocalActivityExecutionContextImpl.java +++ b/src/main/java/io/temporal/internal/sync/LocalActivityExecutionContextImpl.java @@ -21,7 +21,7 @@ import io.temporal.activity.ActivityTask; import io.temporal.client.ActivityCompletionException; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.serviceclient.WorkflowServiceStubs; import java.lang.reflect.Type; import java.util.Optional; diff --git a/src/main/java/io/temporal/internal/sync/SignalWithStartBatchRequest.java b/src/main/java/io/temporal/internal/sync/SignalWithStartBatchRequest.java index d23dea14e2..316c432c3d 100644 --- a/src/main/java/io/temporal/internal/sync/SignalWithStartBatchRequest.java +++ b/src/main/java/io/temporal/internal/sync/SignalWithStartBatchRequest.java @@ -21,7 +21,7 @@ import io.temporal.client.BatchRequest; import io.temporal.client.WorkflowStub; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.Functions; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/io/temporal/internal/sync/SimulatedTimeoutExceptionInternal.java b/src/main/java/io/temporal/internal/sync/SimulatedTimeoutExceptionInternal.java index cc3e447f9d..05973f6d5c 100644 --- a/src/main/java/io/temporal/internal/sync/SimulatedTimeoutExceptionInternal.java +++ b/src/main/java/io/temporal/internal/sync/SimulatedTimeoutExceptionInternal.java @@ -19,7 +19,7 @@ package io.temporal.internal.sync; -import io.temporal.proto.event.TimeoutType; +import io.temporal.proto.common.TimeoutType; /** * SimulatedTimeoutExceptionInternal is created from a SimulatedTimeoutException. The main diff --git a/src/main/java/io/temporal/internal/sync/StubMarker.java b/src/main/java/io/temporal/internal/sync/StubMarker.java index 4ecfc81ad0..33cbfef412 100644 --- a/src/main/java/io/temporal/internal/sync/StubMarker.java +++ b/src/main/java/io/temporal/internal/sync/StubMarker.java @@ -19,7 +19,7 @@ package io.temporal.internal.sync; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; /** * Interface that stub created through {@link diff --git a/src/main/java/io/temporal/internal/sync/SyncDecisionContext.java b/src/main/java/io/temporal/internal/sync/SyncDecisionContext.java index 57f318ed7c..0dc76e8528 100644 --- a/src/main/java/io/temporal/internal/sync/SyncDecisionContext.java +++ b/src/main/java/io/temporal/internal/sync/SyncDecisionContext.java @@ -46,8 +46,8 @@ import io.temporal.proto.common.Payload; import io.temporal.proto.common.Payloads; import io.temporal.proto.common.SearchAttributes; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.workflow.ActivityException; import io.temporal.workflow.ActivityFailureException; import io.temporal.workflow.ActivityTimeoutException; diff --git a/src/main/java/io/temporal/internal/sync/SyncWorkflowWorker.java b/src/main/java/io/temporal/internal/sync/SyncWorkflowWorker.java index a9af60cbfb..6321f46bf0 100644 --- a/src/main/java/io/temporal/internal/sync/SyncWorkflowWorker.java +++ b/src/main/java/io/temporal/internal/sync/SyncWorkflowWorker.java @@ -31,7 +31,7 @@ import io.temporal.internal.worker.SuspendableWorker; import io.temporal.internal.worker.WorkflowWorker; import io.temporal.proto.common.Payloads; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.workflowservice.PollForDecisionTaskResponse; import io.temporal.serviceclient.WorkflowServiceStubs; import io.temporal.worker.WorkflowImplementationOptions; diff --git a/src/main/java/io/temporal/internal/sync/TestActivityEnvironmentInternal.java b/src/main/java/io/temporal/internal/sync/TestActivityEnvironmentInternal.java index 42181efc8b..d97f235cff 100644 --- a/src/main/java/io/temporal/internal/sync/TestActivityEnvironmentInternal.java +++ b/src/main/java/io/temporal/internal/sync/TestActivityEnvironmentInternal.java @@ -38,7 +38,7 @@ import io.temporal.internal.worker.ActivityTaskHandler.Result; import io.temporal.proto.common.ActivityType; import io.temporal.proto.common.Payloads; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.workflowservice.PollForActivityTaskResponse; import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatRequest; import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatResponse; diff --git a/src/main/java/io/temporal/internal/sync/TestWorkflowEnvironmentInternal.java b/src/main/java/io/temporal/internal/sync/TestWorkflowEnvironmentInternal.java index d7b381fb95..db8f834f49 100644 --- a/src/main/java/io/temporal/internal/sync/TestWorkflowEnvironmentInternal.java +++ b/src/main/java/io/temporal/internal/sync/TestWorkflowEnvironmentInternal.java @@ -27,7 +27,7 @@ import io.temporal.client.WorkflowOptions; import io.temporal.client.WorkflowStub; import io.temporal.internal.testservice.TestWorkflowService; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.serviceclient.WorkflowServiceStubs; import io.temporal.serviceclient.WorkflowServiceStubsOptions; import io.temporal.testing.TestEnvironmentOptions; diff --git a/src/main/java/io/temporal/internal/sync/WorkflowClientInternal.java b/src/main/java/io/temporal/internal/sync/WorkflowClientInternal.java index 070663ebc9..66caa6d965 100644 --- a/src/main/java/io/temporal/internal/sync/WorkflowClientInternal.java +++ b/src/main/java/io/temporal/internal/sync/WorkflowClientInternal.java @@ -34,7 +34,7 @@ import io.temporal.internal.external.ManualActivityCompletionClientFactory; import io.temporal.internal.external.ManualActivityCompletionClientFactoryImpl; import io.temporal.internal.sync.WorkflowInvocationHandler.InvocationType; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.serviceclient.WorkflowServiceStubs; import io.temporal.workflow.Functions; import io.temporal.workflow.QueryMethod; diff --git a/src/main/java/io/temporal/internal/sync/WorkflowInfoImpl.java b/src/main/java/io/temporal/internal/sync/WorkflowInfoImpl.java index bf1d49d321..7be8b211f4 100644 --- a/src/main/java/io/temporal/internal/sync/WorkflowInfoImpl.java +++ b/src/main/java/io/temporal/internal/sync/WorkflowInfoImpl.java @@ -21,7 +21,7 @@ import io.temporal.internal.replay.DecisionContext; import io.temporal.proto.common.SearchAttributes; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.WorkflowInfo; import java.time.Duration; diff --git a/src/main/java/io/temporal/internal/sync/WorkflowInternal.java b/src/main/java/io/temporal/internal/sync/WorkflowInternal.java index b3b0f8fe76..e420260755 100644 --- a/src/main/java/io/temporal/internal/sync/WorkflowInternal.java +++ b/src/main/java/io/temporal/internal/sync/WorkflowInternal.java @@ -29,7 +29,7 @@ import io.temporal.common.interceptors.WorkflowCallsInterceptor; import io.temporal.internal.common.CheckedExceptionWrapper; import io.temporal.internal.logging.ReplayAwareLogger; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.ActivityStub; import io.temporal.workflow.CancellationScope; import io.temporal.workflow.ChildWorkflowOptions; diff --git a/src/main/java/io/temporal/internal/sync/WorkflowInvocationHandler.java b/src/main/java/io/temporal/internal/sync/WorkflowInvocationHandler.java index fe64222771..07596ad568 100644 --- a/src/main/java/io/temporal/internal/sync/WorkflowInvocationHandler.java +++ b/src/main/java/io/temporal/internal/sync/WorkflowInvocationHandler.java @@ -28,8 +28,8 @@ import io.temporal.common.CronSchedule; import io.temporal.common.MethodRetry; import io.temporal.internal.external.GenericWorkflowClientExternal; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowIdReusePolicy; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.workflow.QueryMethod; import io.temporal.workflow.SignalMethod; import io.temporal.workflow.WorkflowMethod; diff --git a/src/main/java/io/temporal/internal/sync/WorkflowStubImpl.java b/src/main/java/io/temporal/internal/sync/WorkflowStubImpl.java index 76d9470282..82a295f2e4 100644 --- a/src/main/java/io/temporal/internal/sync/WorkflowStubImpl.java +++ b/src/main/java/io/temporal/internal/sync/WorkflowStubImpl.java @@ -46,10 +46,10 @@ import io.temporal.internal.replay.SignalExternalWorkflowParameters; import io.temporal.proto.common.Payload; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; -import io.temporal.proto.failure.QueryFailed; -import io.temporal.proto.failure.WorkflowExecutionAlreadyStarted; +import io.temporal.proto.errordetails.QueryFailedFailure; +import io.temporal.proto.errordetails.WorkflowExecutionAlreadyStartedFailure; import io.temporal.proto.query.QueryConsistencyLevel; import io.temporal.proto.workflowservice.QueryWorkflowResponse; import java.lang.reflect.Type; @@ -129,8 +129,8 @@ private WorkflowExecution startWithOptions(WorkflowOptions o, Object... args) { try { execution.set(genericClient.startWorkflow(p)); } catch (StatusRuntimeException e) { - WorkflowExecutionAlreadyStarted f = - StatusUtils.getFailure(e, WorkflowExecutionAlreadyStarted.class); + WorkflowExecutionAlreadyStartedFailure f = + StatusUtils.getFailure(e, WorkflowExecutionAlreadyStartedFailure.class); if (f != null) { WorkflowExecution exe = WorkflowExecution.newBuilder() @@ -227,8 +227,8 @@ private WorkflowExecution signalWithStartWithOptions( try { execution.set(genericClient.signalWithStartWorkflowExecution(p)); } catch (StatusRuntimeException e) { - WorkflowExecutionAlreadyStarted f = - StatusUtils.getFailure(e, WorkflowExecutionAlreadyStarted.class); + WorkflowExecutionAlreadyStartedFailure f = + StatusUtils.getFailure(e, WorkflowExecutionAlreadyStartedFailure.class); if (f != null) { WorkflowExecution exe = WorkflowExecution.newBuilder() @@ -418,7 +418,7 @@ public R query(String queryType, Class resultClass, Type resultType, Obje } catch (StatusRuntimeException e) { if (e.getStatus().getCode() == Status.Code.NOT_FOUND) { throw new WorkflowNotFoundException(execution.get(), workflowType, e.getMessage()); - } else if (StatusUtils.hasFailure(e, QueryFailed.class)) { + } else if (StatusUtils.hasFailure(e, QueryFailedFailure.class)) { throw new WorkflowQueryException(execution.get(), e.getMessage()); } throw new WorkflowServiceException(execution.get(), workflowType, e); diff --git a/src/main/java/io/temporal/internal/testservice/ActivityId.java b/src/main/java/io/temporal/internal/testservice/ActivityId.java index d7ce39b98c..ba0109d590 100644 --- a/src/main/java/io/temporal/internal/testservice/ActivityId.java +++ b/src/main/java/io/temporal/internal/testservice/ActivityId.java @@ -21,7 +21,7 @@ import com.google.protobuf.ByteString; import io.grpc.Status; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; diff --git a/src/main/java/io/temporal/internal/testservice/ExecutionId.java b/src/main/java/io/temporal/internal/testservice/ExecutionId.java index 7efe2e700c..d174a9e5df 100644 --- a/src/main/java/io/temporal/internal/testservice/ExecutionId.java +++ b/src/main/java/io/temporal/internal/testservice/ExecutionId.java @@ -21,7 +21,7 @@ import io.grpc.Status; import io.temporal.internal.common.OptionsUtils; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; diff --git a/src/main/java/io/temporal/internal/testservice/RequestContext.java b/src/main/java/io/temporal/internal/testservice/RequestContext.java index 5c4a6d514b..9900c86020 100644 --- a/src/main/java/io/temporal/internal/testservice/RequestContext.java +++ b/src/main/java/io/temporal/internal/testservice/RequestContext.java @@ -23,8 +23,8 @@ import io.temporal.internal.common.WorkflowExecutionUtils; import io.temporal.internal.testservice.TestWorkflowStore.ActivityTask; import io.temporal.internal.testservice.TestWorkflowStore.DecisionTask; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.event.HistoryEvent; -import io.temporal.proto.execution.WorkflowExecution; import java.util.ArrayList; import java.util.List; import java.util.Objects; diff --git a/src/main/java/io/temporal/internal/testservice/RetryState.java b/src/main/java/io/temporal/internal/testservice/RetryState.java index 8515633896..195aa1e265 100644 --- a/src/main/java/io/temporal/internal/testservice/RetryState.java +++ b/src/main/java/io/temporal/internal/testservice/RetryState.java @@ -94,7 +94,7 @@ && getAttempt() >= retryPolicy.getMaximumAttempts() - 1) { } // check if error is non-retriable - List nonRetriableErrorReasons = retryPolicy.getNonRetriableErrorReasonsList(); + List nonRetriableErrorReasons = retryPolicy.getNonRetryableErrorTypesList(); if (nonRetriableErrorReasons != null) { for (String err : nonRetriableErrorReasons) { if (errReason.equals(err)) { diff --git a/src/main/java/io/temporal/internal/testservice/StateMachines.java b/src/main/java/io/temporal/internal/testservice/StateMachines.java index 0a695847c6..8d86c66771 100644 --- a/src/main/java/io/temporal/internal/testservice/StateMachines.java +++ b/src/main/java/io/temporal/internal/testservice/StateMachines.java @@ -30,6 +30,8 @@ import io.temporal.internal.testservice.TestWorkflowStore.TaskListId; import io.temporal.proto.common.Payloads; import io.temporal.proto.common.RetryPolicy; +import io.temporal.proto.common.TimeoutType; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.decision.CancelTimerDecisionAttributes; import io.temporal.proto.decision.CancelWorkflowExecutionDecisionAttributes; import io.temporal.proto.decision.CompleteWorkflowExecutionDecisionAttributes; @@ -42,6 +44,7 @@ import io.temporal.proto.decision.StartChildWorkflowExecutionDecisionAttributes; import io.temporal.proto.decision.StartTimerDecisionAttributes; import io.temporal.proto.decision.StickyExecutionAttributes; +import io.temporal.proto.errordetails.QueryFailedFailure; import io.temporal.proto.event.ActivityTaskCancelRequestedEventAttributes; import io.temporal.proto.event.ActivityTaskCanceledEventAttributes; import io.temporal.proto.event.ActivityTaskCompletedEventAttributes; @@ -70,7 +73,6 @@ import io.temporal.proto.event.SignalExternalWorkflowExecutionInitiatedEventAttributes; import io.temporal.proto.event.StartChildWorkflowExecutionFailedEventAttributes; import io.temporal.proto.event.StartChildWorkflowExecutionInitiatedEventAttributes; -import io.temporal.proto.event.TimeoutType; import io.temporal.proto.event.TimerCanceledEventAttributes; import io.temporal.proto.event.TimerFiredEventAttributes; import io.temporal.proto.event.TimerStartedEventAttributes; @@ -82,8 +84,6 @@ import io.temporal.proto.event.WorkflowExecutionFailedEventAttributes; import io.temporal.proto.event.WorkflowExecutionStartedEventAttributes; import io.temporal.proto.event.WorkflowExecutionTimedOutEventAttributes; -import io.temporal.proto.execution.WorkflowExecution; -import io.temporal.proto.failure.QueryFailed; import io.temporal.proto.query.WorkflowQueryResult; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryRequest; import io.temporal.proto.workflowservice.PollForActivityTaskRequest; @@ -1305,7 +1305,7 @@ private static void completeQuery( result.completeExceptionally( StatusUtils.newException( Status.INTERNAL.withDescription(value.getErrorMessage()), - QueryFailed.getDefaultInstance())); + QueryFailedFailure.getDefaultInstance())); break; default: throw Status.INVALID_ARGUMENT diff --git a/src/main/java/io/temporal/internal/testservice/TestWorkflowMutableStateImpl.java b/src/main/java/io/temporal/internal/testservice/TestWorkflowMutableStateImpl.java index 27de5ae46f..3640ab02f7 100644 --- a/src/main/java/io/temporal/internal/testservice/TestWorkflowMutableStateImpl.java +++ b/src/main/java/io/temporal/internal/testservice/TestWorkflowMutableStateImpl.java @@ -36,6 +36,8 @@ import io.temporal.internal.common.WorkflowExecutionUtils; import io.temporal.internal.testservice.StateMachines.*; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.TimeoutType; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.decision.CancelTimerDecisionAttributes; import io.temporal.proto.decision.CancelWorkflowExecutionDecisionAttributes; import io.temporal.proto.decision.CompleteWorkflowExecutionDecisionAttributes; @@ -51,6 +53,7 @@ import io.temporal.proto.decision.StartTimerDecisionAttributes; import io.temporal.proto.decision.StickyExecutionAttributes; import io.temporal.proto.decision.UpsertWorkflowSearchAttributesDecisionAttributes; +import io.temporal.proto.errordetails.QueryFailedFailure; import io.temporal.proto.event.ActivityTaskScheduledEventAttributes; import io.temporal.proto.event.CancelTimerFailedEventAttributes; import io.temporal.proto.event.ChildWorkflowExecutionCanceledEventAttributes; @@ -64,14 +67,11 @@ import io.temporal.proto.event.HistoryEvent; import io.temporal.proto.event.MarkerRecordedEventAttributes; import io.temporal.proto.event.StartChildWorkflowExecutionFailedEventAttributes; -import io.temporal.proto.event.TimeoutType; import io.temporal.proto.event.UpsertWorkflowSearchAttributesEventAttributes; import io.temporal.proto.event.WorkflowExecutionContinuedAsNewEventAttributes; import io.temporal.proto.event.WorkflowExecutionFailedCause; import io.temporal.proto.event.WorkflowExecutionSignaledEventAttributes; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.execution.WorkflowExecutionStatus; -import io.temporal.proto.failure.QueryFailed; import io.temporal.proto.query.QueryConsistencyLevel; import io.temporal.proto.query.QueryRejectCondition; import io.temporal.proto.query.QueryRejected; @@ -454,7 +454,7 @@ public void completeDecisionTask( .completeExceptionally( StatusUtils.newException( Status.INTERNAL.withDescription(result.getErrorMessage()), - QueryFailed.getDefaultInstance())); + QueryFailedFailure.getDefaultInstance())); break; case UNRECOGNIZED: throw Status.INVALID_ARGUMENT @@ -1982,7 +1982,7 @@ public void completeQuery(QueryId queryId, RespondQueryTaskCompletedRequest comp StatusRuntimeException error = StatusUtils.newException( Status.INVALID_ARGUMENT.withDescription(completeRequest.getErrorMessage()), - QueryFailed.getDefaultInstance()); + QueryFailedFailure.getDefaultInstance()); result.completeExceptionally(error); break; } diff --git a/src/main/java/io/temporal/internal/testservice/TestWorkflowService.java b/src/main/java/io/temporal/internal/testservice/TestWorkflowService.java index dcb139a38d..ff483f1143 100644 --- a/src/main/java/io/temporal/internal/testservice/TestWorkflowService.java +++ b/src/main/java/io/temporal/internal/testservice/TestWorkflowService.java @@ -33,14 +33,14 @@ import io.temporal.internal.testservice.TestWorkflowStore.WorkflowState; import io.temporal.proto.common.Payloads; import io.temporal.proto.common.RetryPolicy; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowIdReusePolicy; import io.temporal.proto.decision.SignalExternalWorkflowExecutionDecisionAttributes; +import io.temporal.proto.errordetails.WorkflowExecutionAlreadyStartedFailure; import io.temporal.proto.event.WorkflowExecutionContinuedAsNewEventAttributes; import io.temporal.proto.event.WorkflowExecutionFailedCause; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.execution.WorkflowExecutionInfo; import io.temporal.proto.execution.WorkflowExecutionStatus; -import io.temporal.proto.failure.WorkflowExecutionAlreadyStarted; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryRequest; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryResponse; import io.temporal.proto.workflowservice.ListClosedWorkflowExecutionsRequest; @@ -292,8 +292,8 @@ private Optional newRetryStateLocked( private StartWorkflowExecutionResponse throwDuplicatedWorkflow( StartWorkflowExecutionRequest startRequest, TestWorkflowMutableState existing) { WorkflowExecution execution = existing.getExecutionId().getExecution(); - WorkflowExecutionAlreadyStarted error = - WorkflowExecutionAlreadyStarted.newBuilder() + WorkflowExecutionAlreadyStartedFailure error = + WorkflowExecutionAlreadyStartedFailure.newBuilder() .setRunId(execution.getRunId()) .setStartRequestId(startRequest.getRequestId()) .build(); diff --git a/src/main/java/io/temporal/internal/testservice/TestWorkflowStoreImpl.java b/src/main/java/io/temporal/internal/testservice/TestWorkflowStoreImpl.java index 245ed3e9a6..70527838dc 100644 --- a/src/main/java/io/temporal/internal/testservice/TestWorkflowStoreImpl.java +++ b/src/main/java/io/temporal/internal/testservice/TestWorkflowStoreImpl.java @@ -24,11 +24,11 @@ import io.grpc.Status; import io.temporal.internal.common.WorkflowExecutionUtils; import io.temporal.internal.testservice.RequestContext.Timer; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.decision.StickyExecutionAttributes; import io.temporal.proto.event.EventType; import io.temporal.proto.event.History; import io.temporal.proto.event.HistoryEvent; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.execution.WorkflowExecutionInfo; import io.temporal.proto.filter.HistoryEventFilterType; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryRequest; diff --git a/src/main/java/io/temporal/internal/worker/ActivityWorker.java b/src/main/java/io/temporal/internal/worker/ActivityWorker.java index a0bbaaf051..9a08069bf5 100644 --- a/src/main/java/io/temporal/internal/worker/ActivityWorker.java +++ b/src/main/java/io/temporal/internal/worker/ActivityWorker.java @@ -33,7 +33,7 @@ import io.temporal.internal.metrics.MetricsType; import io.temporal.internal.worker.ActivityTaskHandler.Result; import io.temporal.proto.common.Payload; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.workflowservice.PollForActivityTaskResponse; import io.temporal.proto.workflowservice.RespondActivityTaskCanceledRequest; import io.temporal.proto.workflowservice.RespondActivityTaskCompletedRequest; diff --git a/src/main/java/io/temporal/internal/worker/WorkflowWorker.java b/src/main/java/io/temporal/internal/worker/WorkflowWorker.java index 9727ba7d44..0f2945894d 100644 --- a/src/main/java/io/temporal/internal/worker/WorkflowWorker.java +++ b/src/main/java/io/temporal/internal/worker/WorkflowWorker.java @@ -34,11 +34,11 @@ import io.temporal.internal.metrics.MetricsTag; import io.temporal.internal.metrics.MetricsType; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; import io.temporal.proto.event.History; import io.temporal.proto.event.HistoryEvent; import io.temporal.proto.event.WorkflowExecutionStartedEventAttributes; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.query.WorkflowQuery; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryResponse; import io.temporal.proto.workflowservice.PollForDecisionTaskResponse; diff --git a/src/main/java/io/temporal/testing/SimulatedTimeoutException.java b/src/main/java/io/temporal/testing/SimulatedTimeoutException.java index a24ae99b53..6571f6bb85 100644 --- a/src/main/java/io/temporal/testing/SimulatedTimeoutException.java +++ b/src/main/java/io/temporal/testing/SimulatedTimeoutException.java @@ -20,7 +20,7 @@ package io.temporal.testing; import com.google.common.annotations.VisibleForTesting; -import io.temporal.proto.event.TimeoutType; +import io.temporal.proto.common.TimeoutType; /** * SimulatedTimeoutException can be thrown from an activity or child workflow implementation to diff --git a/src/main/java/io/temporal/workflow/ActivityTimeoutException.java b/src/main/java/io/temporal/workflow/ActivityTimeoutException.java index ebead9fe2f..8f862a0d26 100644 --- a/src/main/java/io/temporal/workflow/ActivityTimeoutException.java +++ b/src/main/java/io/temporal/workflow/ActivityTimeoutException.java @@ -24,7 +24,7 @@ import io.temporal.common.converter.DataConverterException; import io.temporal.proto.common.ActivityType; import io.temporal.proto.common.Payloads; -import io.temporal.proto.event.TimeoutType; +import io.temporal.proto.common.TimeoutType; import java.lang.reflect.Type; import java.util.Objects; import java.util.Optional; diff --git a/src/main/java/io/temporal/workflow/CancelExternalWorkflowException.java b/src/main/java/io/temporal/workflow/CancelExternalWorkflowException.java index e4990a7581..cfa4f9bd33 100644 --- a/src/main/java/io/temporal/workflow/CancelExternalWorkflowException.java +++ b/src/main/java/io/temporal/workflow/CancelExternalWorkflowException.java @@ -19,8 +19,8 @@ package io.temporal.workflow; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.event.WorkflowExecutionFailedCause; -import io.temporal.proto.execution.WorkflowExecution; /** * Exception used to communicate failure of a request to signal an external workflow. TODO: Hook it diff --git a/src/main/java/io/temporal/workflow/ChildWorkflowException.java b/src/main/java/io/temporal/workflow/ChildWorkflowException.java index 9dfa0bd128..1259d827d7 100644 --- a/src/main/java/io/temporal/workflow/ChildWorkflowException.java +++ b/src/main/java/io/temporal/workflow/ChildWorkflowException.java @@ -19,8 +19,8 @@ package io.temporal.workflow; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; /** Base exception for failures of a child workflow. */ @SuppressWarnings("serial") diff --git a/src/main/java/io/temporal/workflow/ChildWorkflowFailureException.java b/src/main/java/io/temporal/workflow/ChildWorkflowFailureException.java index 25302c5a8e..2f868dc6e0 100644 --- a/src/main/java/io/temporal/workflow/ChildWorkflowFailureException.java +++ b/src/main/java/io/temporal/workflow/ChildWorkflowFailureException.java @@ -19,8 +19,8 @@ package io.temporal.workflow; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; /** * Indicates that a child workflow failed. An original cause of the child workflow failure can be diff --git a/src/main/java/io/temporal/workflow/ChildWorkflowStub.java b/src/main/java/io/temporal/workflow/ChildWorkflowStub.java index 7c4c75b261..3d659d828e 100644 --- a/src/main/java/io/temporal/workflow/ChildWorkflowStub.java +++ b/src/main/java/io/temporal/workflow/ChildWorkflowStub.java @@ -20,7 +20,7 @@ package io.temporal.workflow; import io.temporal.internal.sync.StubMarker; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import java.lang.reflect.Type; /** diff --git a/src/main/java/io/temporal/workflow/ChildWorkflowTerminatedException.java b/src/main/java/io/temporal/workflow/ChildWorkflowTerminatedException.java index 60a4f6728c..e64de52e82 100644 --- a/src/main/java/io/temporal/workflow/ChildWorkflowTerminatedException.java +++ b/src/main/java/io/temporal/workflow/ChildWorkflowTerminatedException.java @@ -19,8 +19,8 @@ package io.temporal.workflow; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; /** * Indicates that child workflow was forcefully terminated by an external command to Temporal diff --git a/src/main/java/io/temporal/workflow/ChildWorkflowTimedOutException.java b/src/main/java/io/temporal/workflow/ChildWorkflowTimedOutException.java index 388243dd88..b41313653d 100644 --- a/src/main/java/io/temporal/workflow/ChildWorkflowTimedOutException.java +++ b/src/main/java/io/temporal/workflow/ChildWorkflowTimedOutException.java @@ -19,8 +19,8 @@ package io.temporal.workflow; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; -import io.temporal.proto.execution.WorkflowExecution; /** * Indicates that a child workflow exceeded its execution timeout and was forcefully terminated by diff --git a/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java b/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java index 1ea5af25b1..6bdfcc7a34 100644 --- a/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java +++ b/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java @@ -20,7 +20,7 @@ package io.temporal.workflow; import io.temporal.internal.sync.StubMarker; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; /** * Supports signalling and cancelling any workflows by the workflow type and their id. This is diff --git a/src/main/java/io/temporal/workflow/SignalExternalWorkflowException.java b/src/main/java/io/temporal/workflow/SignalExternalWorkflowException.java index 25922b60d6..a4a961b150 100644 --- a/src/main/java/io/temporal/workflow/SignalExternalWorkflowException.java +++ b/src/main/java/io/temporal/workflow/SignalExternalWorkflowException.java @@ -19,8 +19,8 @@ package io.temporal.workflow; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.event.WorkflowExecutionFailedCause; -import io.temporal.proto.execution.WorkflowExecution; /** Exception used to communicate failure of a request to signal an external workflow. */ @SuppressWarnings("serial") diff --git a/src/main/java/io/temporal/workflow/StartChildWorkflowFailedException.java b/src/main/java/io/temporal/workflow/StartChildWorkflowFailedException.java index 4b19537c3e..f5a389ecee 100644 --- a/src/main/java/io/temporal/workflow/StartChildWorkflowFailedException.java +++ b/src/main/java/io/temporal/workflow/StartChildWorkflowFailedException.java @@ -19,9 +19,9 @@ package io.temporal.workflow; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; import io.temporal.proto.event.WorkflowExecutionFailedCause; -import io.temporal.proto.execution.WorkflowExecution; /** * Indicates that child workflow failed to start. Currently the only cause is that there is already diff --git a/src/main/java/io/temporal/workflow/Workflow.java b/src/main/java/io/temporal/workflow/Workflow.java index 55b624a003..8dc6d51892 100644 --- a/src/main/java/io/temporal/workflow/Workflow.java +++ b/src/main/java/io/temporal/workflow/Workflow.java @@ -24,7 +24,7 @@ import io.temporal.activity.LocalActivityOptions; import io.temporal.common.RetryOptions; import io.temporal.internal.sync.WorkflowInternal; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.worker.WorkerOptions; import io.temporal.workflow.Functions.Func; import java.lang.reflect.Type; diff --git a/src/main/proto b/src/main/proto index 77d676cc9a..8f34c27c6d 160000 --- a/src/main/proto +++ b/src/main/proto @@ -1 +1 @@ -Subproject commit 77d676cc9a359cea8cc2a79b1e62711de5032cc0 +Subproject commit 8f34c27c6dab81d2e04fce3bcd5845609384771d diff --git a/src/test/java/io/temporal/internal/replay/ReplayDeciderCacheTests.java b/src/test/java/io/temporal/internal/replay/ReplayDeciderCacheTests.java index 6483acac63..ea0cea84e5 100644 --- a/src/test/java/io/temporal/internal/replay/ReplayDeciderCacheTests.java +++ b/src/test/java/io/temporal/internal/replay/ReplayDeciderCacheTests.java @@ -37,8 +37,8 @@ import io.temporal.internal.worker.SingleWorkerOptions; import io.temporal.internal.worker.WorkflowExecutionException; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.event.HistoryEvent; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.query.WorkflowQuery; import io.temporal.proto.workflowservice.PollForDecisionTaskResponse; import io.temporal.serviceclient.WorkflowServiceStubs; diff --git a/src/test/java/io/temporal/internal/testing/WorkflowTestingTest.java b/src/test/java/io/temporal/internal/testing/WorkflowTestingTest.java index 7612eaf9ce..5a741e8248 100644 --- a/src/test/java/io/temporal/internal/testing/WorkflowTestingTest.java +++ b/src/test/java/io/temporal/internal/testing/WorkflowTestingTest.java @@ -38,11 +38,11 @@ import io.temporal.common.converter.GsonJsonDataConverter; import io.temporal.internal.common.WorkflowExecutionUtils; import io.temporal.proto.common.Payload; +import io.temporal.proto.common.TimeoutType; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.event.EventType; import io.temporal.proto.event.History; import io.temporal.proto.event.HistoryEvent; -import io.temporal.proto.event.TimeoutType; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.execution.WorkflowExecutionInfo; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryRequest; import io.temporal.proto.workflowservice.ListClosedWorkflowExecutionsRequest; diff --git a/src/test/java/io/temporal/testUtils/TestServiceUtils.java b/src/test/java/io/temporal/testUtils/TestServiceUtils.java index f3b492ff1d..5073bcac44 100644 --- a/src/test/java/io/temporal/testUtils/TestServiceUtils.java +++ b/src/test/java/io/temporal/testUtils/TestServiceUtils.java @@ -23,9 +23,9 @@ import static io.temporal.internal.common.InternalUtils.createStickyTaskList; import com.google.protobuf.ByteString; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowType; import io.temporal.proto.decision.StickyExecutionAttributes; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.tasklist.TaskList; import io.temporal.proto.workflowservice.PollForDecisionTaskRequest; import io.temporal.proto.workflowservice.PollForDecisionTaskResponse; diff --git a/src/test/java/io/temporal/worker/CleanWorkerShutdownTest.java b/src/test/java/io/temporal/worker/CleanWorkerShutdownTest.java index bc02aafce9..65b5b10a7a 100644 --- a/src/test/java/io/temporal/worker/CleanWorkerShutdownTest.java +++ b/src/test/java/io/temporal/worker/CleanWorkerShutdownTest.java @@ -32,9 +32,9 @@ import io.temporal.client.WorkflowOptions; import io.temporal.common.converter.GsonJsonDataConverter; import io.temporal.proto.common.Payloads; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.event.EventType; import io.temporal.proto.event.HistoryEvent; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryRequest; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryResponse; import io.temporal.serviceclient.WorkflowServiceStubs; diff --git a/src/test/java/io/temporal/workflow/WorkflowTest.java b/src/test/java/io/temporal/workflow/WorkflowTest.java index d0f323f0e7..5dc97b78e5 100644 --- a/src/test/java/io/temporal/workflow/WorkflowTest.java +++ b/src/test/java/io/temporal/workflow/WorkflowTest.java @@ -62,12 +62,12 @@ import io.temporal.proto.common.Memo; import io.temporal.proto.common.Payload; import io.temporal.proto.common.SearchAttributes; +import io.temporal.proto.common.TimeoutType; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.proto.common.WorkflowIdReusePolicy; import io.temporal.proto.event.EventType; import io.temporal.proto.event.HistoryEvent; -import io.temporal.proto.event.TimeoutType; import io.temporal.proto.event.WorkflowExecutionFailedCause; -import io.temporal.proto.execution.WorkflowExecution; import io.temporal.proto.execution.WorkflowExecutionStatus; import io.temporal.proto.query.QueryRejectCondition; import io.temporal.proto.workflowservice.GetWorkflowExecutionHistoryRequest; diff --git a/src/test/java/io/temporal/workflow/interceptors/SignalWorkflowCallsInterceptor.java b/src/test/java/io/temporal/workflow/interceptors/SignalWorkflowCallsInterceptor.java index d164d2c20c..09b35a703b 100644 --- a/src/test/java/io/temporal/workflow/interceptors/SignalWorkflowCallsInterceptor.java +++ b/src/test/java/io/temporal/workflow/interceptors/SignalWorkflowCallsInterceptor.java @@ -22,7 +22,7 @@ import io.temporal.activity.ActivityOptions; import io.temporal.activity.LocalActivityOptions; import io.temporal.common.interceptors.WorkflowCallsInterceptor; -import io.temporal.proto.execution.WorkflowExecution; +import io.temporal.proto.common.WorkflowExecution; import io.temporal.workflow.ChildWorkflowOptions; import io.temporal.workflow.ContinueAsNewOptions; import io.temporal.workflow.Functions;