Skip to content

Commit

Permalink
tweak conflict policy error message
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanos committed Nov 30, 2024
1 parent 84d1248 commit 514935b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -871,8 +871,7 @@ static <R> WorkflowUpdateHandle<R> startUpdateWithStart(
Proc updateMethod,
@Nonnull UpdateOptions<R> options,
@Nonnull WithStartWorkflowOperation<?> startOperation) {
return WorkflowClientInternalImpl.startUpdateWithStart(
updateMethod, options, startOperation);
return WorkflowClientInternalImpl.startUpdateWithStart(updateMethod, options, startOperation);
}

/**
Expand Down Expand Up @@ -1207,8 +1206,7 @@ static <R> R executeUpdateWithStart(
Functions.Proc updateMethod,
@Nonnull UpdateOptions<R> options,
@Nonnull WithStartWorkflowOperation<?> startOperation) {
return WorkflowClientInternalImpl.executeUpdateWithStart(
updateMethod, options, startOperation);
return WorkflowClientInternalImpl.executeUpdateWithStart(updateMethod, options, startOperation);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ <R> WorkflowUpdateHandle<R> getUpdateHandle(
*/
@Experimental
<R> WorkflowUpdateHandle<R> startUpdateWithStart(
UpdateOptions<R> updateOptions, Object[] updateArgs, WithStartWorkflowOperation<?> startOperation);
UpdateOptions<R> updateOptions,
Object[] updateArgs,
WithStartWorkflowOperation<?> startOperation);

/**
* Synchronously update a workflow execution by invoking its update handler, and start the
Expand All @@ -179,7 +181,9 @@ <R> WorkflowUpdateHandle<R> startUpdateWithStart(
*/
@Experimental
<R> R executeUpdateWithStart(
UpdateOptions<R> updateOptions, Object[] updateArgs, WithStartWorkflowOperation<?> startOperation);
UpdateOptions<R> updateOptions,
Object[] updateArgs,
WithStartWorkflowOperation<?> startOperation);

WorkflowExecution signalWithStart(String signalName, Object[] signalArgs, Object[] startArgs);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public <R> WorkflowUpdateHandle<R> startUpdateWithStart(
}
if (options.getWorkflowIdConflictPolicy() == null) {
throw new IllegalStateException(
"Required parameter WorkflowIdConflictPolicy in WorkflowOptions is missing in WorkflowStub");
"WorkflowIdConflictPolicy is required in WorkflowOptions for Update-With-Start");
}
if (!startOp.markInvoked()) {
throw new IllegalStateException("WithStartWorkflowOperation was already executed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ public void failWhenConflictPolicyIsMissing() {
} catch (IllegalStateException e) {
assertEquals(
e.getMessage(),
"Required parameter WorkflowIdConflictPolicy in WorkflowOptions is missing in WorkflowStub");
"WorkflowIdConflictPolicy is required in WorkflowOptions for Update-With-Start");
}
}

Expand Down

0 comments on commit 514935b

Please sign in to comment.