Skip to content

Commit 5750259

Browse files
authored
Fixed workflow misspelling (#246)
1 parent fbd46f9 commit 5750259

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

src/main/java/com/uber/cadence/internal/replay/ReplayDecider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
import org.slf4j.LoggerFactory;
5656

5757
/**
58-
* Implements decider that relies on replay of a worklfow code. An instance of this class is created
58+
* Implements decider that relies on replay of a workflow code. An instance of this class is created
5959
* per decision.
6060
*/
6161
class ReplayDecider implements Decider {

src/main/java/com/uber/cadence/internal/sync/WorkflowThreadImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public void start() {
253253
} catch (RejectedExecutionException e) {
254254
throw new Error(
255255
"Not enough threads to execute workflows. "
256-
+ "If this message appears consistently either WorkerOptions.maxConcurrentWorklfowExecutionSize "
256+
+ "If this message appears consistently either WorkerOptions.maxConcurrentWorkflowExecutionSize "
257257
+ "should be decreased or WorkerOptions.maxWorkflowThreads increased.");
258258
}
259259
}

src/main/java/com/uber/cadence/internal/testservice/TestWorkflowMutableState.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ void failDecisionTask(RespondDecisionTaskFailedRequest request)
8181
void childWorkflowStarted(ChildWorkflowExecutionStartedEventAttributes a)
8282
throws InternalServiceError, EntityNotExistsError, BadRequestError;
8383

84-
void childWorklfowFailed(String workflowId, ChildWorkflowExecutionFailedEventAttributes a)
84+
void childWorkflowFailed(String workflowId, ChildWorkflowExecutionFailedEventAttributes a)
8585
throws InternalServiceError, EntityNotExistsError, BadRequestError;
8686

87-
void childWorklfowTimedOut(String activityId, ChildWorkflowExecutionTimedOutEventAttributes a)
87+
void childWorkflowTimedOut(String activityId, ChildWorkflowExecutionTimedOutEventAttributes a)
8888
throws InternalServiceError, EntityNotExistsError, BadRequestError;
8989

9090
void failStartChildWorkflow(String workflowId, StartChildWorkflowExecutionFailedEventAttributes a)

src/main/java/com/uber/cadence/internal/testservice/TestWorkflowMutableStateImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ public void childWorkflowStarted(ChildWorkflowExecutionStartedEventAttributes a)
677677
}
678678

679679
@Override
680-
public void childWorklfowFailed(String activityId, ChildWorkflowExecutionFailedEventAttributes a)
680+
public void childWorkflowFailed(String activityId, ChildWorkflowExecutionFailedEventAttributes a)
681681
throws InternalServiceError, EntityNotExistsError, BadRequestError {
682682
update(
683683
ctx -> {
@@ -690,7 +690,7 @@ public void childWorklfowFailed(String activityId, ChildWorkflowExecutionFailedE
690690
}
691691

692692
@Override
693-
public void childWorklfowTimedOut(
693+
public void childWorkflowTimedOut(
694694
String activityId, ChildWorkflowExecutionTimedOutEventAttributes a)
695695
throws InternalServiceError, EntityNotExistsError, BadRequestError {
696696
update(
@@ -846,7 +846,7 @@ private void processFailWorkflowExecution(
846846
try {
847847
parent
848848
.get()
849-
.childWorklfowFailed(ctx.getExecutionId().getWorkflowId().getWorkflowId(), a);
849+
.childWorkflowFailed(ctx.getExecutionId().getWorkflowId().getWorkflowId(), a);
850850
} catch (EntityNotExistsError entityNotExistsError) {
851851
// Parent might already close
852852
} catch (BadRequestError | InternalServiceError e) {
@@ -1296,7 +1296,7 @@ private void reportWorkflowTimeoutToParent(RequestContext ctx) {
12961296
.setWorkflowType(startRequest.getWorkflowType())
12971297
.setDomain(ctx.getDomain())
12981298
.setWorkflowExecution(ctx.getExecution());
1299-
parent.get().childWorklfowTimedOut(ctx.getExecutionId().getWorkflowId().getWorkflowId(), a);
1299+
parent.get().childWorkflowTimedOut(ctx.getExecutionId().getWorkflowId().getWorkflowId(), a);
13001300
} catch (EntityNotExistsError entityNotExistsError) {
13011301
// Parent might already close
13021302
} catch (BadRequestError | InternalServiceError e) {

src/main/java/com/uber/cadence/worker/Worker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ private static SingleWorkerOptions toWorkflowOptions(
160160
.setPollerOptions(options.getWorkflowPollerOptions())
161161
.setReportCompletionRetryOptions(options.getReportWorkflowCompletionRetryOptions())
162162
.setReportFailureRetryOptions(options.getReportWorkflowFailureRetryOptions())
163-
.setTaskExecutorThreadPoolSize(options.getMaxConcurrentWorklfowExecutionSize())
163+
.setTaskExecutorThreadPoolSize(options.getMaxConcurrentWorkflowExecutionSize())
164164
.setMetricsScope(options.getMetricsScope().tagged(tags))
165165
.setEnableLoggingInReplay(options.getEnableLoggingInReplay())
166166
.build();

src/main/java/com/uber/cadence/worker/WorkerOptions.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static final class Builder {
3838
private String identity;
3939
private DataConverter dataConverter = JsonDataConverter.getInstance();
4040
private int maxConcurrentActivityExecutionSize = 100;
41-
private int maxConcurrentWorklfowExecutionSize = 50;
41+
private int maxConcurrentWorkflowExecutionSize = 50;
4242
private PollerOptions activityPollerOptions;
4343
private PollerOptions workflowPollerOptions;
4444
private RetryOptions reportActivityCompletionRetryOptions;
@@ -111,12 +111,12 @@ public Builder setMaxConcurrentActivityExecutionSize(int maxConcurrentActivityEx
111111
}
112112

113113
/** Maximum number of parallely executed decision tasks. */
114-
public Builder setMaxConcurrentWorklfowExecutionSize(int maxConcurrentWorklfowExecutionSize) {
115-
if (maxConcurrentWorklfowExecutionSize <= 0) {
114+
public Builder setMaxConcurrentWorkflowExecutionSize(int maxConcurrentWorkflowExecutionSize) {
115+
if (maxConcurrentWorkflowExecutionSize <= 0) {
116116
throw new IllegalArgumentException(
117-
"Negative or zero: " + maxConcurrentWorklfowExecutionSize);
117+
"Negative or zero: " + maxConcurrentWorkflowExecutionSize);
118118
}
119-
this.maxConcurrentWorklfowExecutionSize = maxConcurrentWorklfowExecutionSize;
119+
this.maxConcurrentWorkflowExecutionSize = maxConcurrentWorkflowExecutionSize;
120120
return this;
121121
}
122122

@@ -190,7 +190,7 @@ public WorkerOptions build() {
190190
identity,
191191
dataConverter,
192192
maxConcurrentActivityExecutionSize,
193-
maxConcurrentWorklfowExecutionSize,
193+
maxConcurrentWorkflowExecutionSize,
194194
activityPollerOptions,
195195
workflowPollerOptions,
196196
reportActivityCompletionRetryOptions,
@@ -209,7 +209,7 @@ public WorkerOptions build() {
209209
private final String identity;
210210
private final DataConverter dataConverter;
211211
private final int maxConcurrentActivityExecutionSize;
212-
private final int maxConcurrentWorklfowExecutionSize;
212+
private final int maxConcurrentWorkflowExecutionSize;
213213
private final PollerOptions activityPollerOptions;
214214
private final PollerOptions workflowPollerOptions;
215215
private final RetryOptions reportActivityCompletionRetryOptions;
@@ -227,7 +227,7 @@ private WorkerOptions(
227227
String identity,
228228
DataConverter dataConverter,
229229
int maxConcurrentActivityExecutionSize,
230-
int maxConcurrentWorklfowExecutionSize,
230+
int maxConcurrentWorkflowExecutionSize,
231231
PollerOptions activityPollerOptions,
232232
PollerOptions workflowPollerOptions,
233233
RetryOptions reportActivityCompletionRetryOptions,
@@ -243,7 +243,7 @@ private WorkerOptions(
243243
this.identity = identity;
244244
this.dataConverter = dataConverter;
245245
this.maxConcurrentActivityExecutionSize = maxConcurrentActivityExecutionSize;
246-
this.maxConcurrentWorklfowExecutionSize = maxConcurrentWorklfowExecutionSize;
246+
this.maxConcurrentWorkflowExecutionSize = maxConcurrentWorkflowExecutionSize;
247247
this.activityPollerOptions = activityPollerOptions;
248248
this.workflowPollerOptions = workflowPollerOptions;
249249
this.reportActivityCompletionRetryOptions = reportActivityCompletionRetryOptions;
@@ -279,8 +279,8 @@ public int getMaxConcurrentActivityExecutionSize() {
279279
return maxConcurrentActivityExecutionSize;
280280
}
281281

282-
public int getMaxConcurrentWorklfowExecutionSize() {
283-
return maxConcurrentWorklfowExecutionSize;
282+
public int getMaxConcurrentWorkflowExecutionSize() {
283+
return maxConcurrentWorkflowExecutionSize;
284284
}
285285

286286
public PollerOptions getActivityPollerOptions() {

src/main/java/com/uber/cadence/workflow/Workflow.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ public static boolean isReplaying() {
739739
* failure. The decision task after timeout is rescheduled and re-executed giving SideEffect
740740
* another chance to succeed.
741741
*
742-
* <p>Caution: do not use sideEffect function to modify any worklfow sate. Only use the
742+
* <p>Caution: do not use sideEffect function to modify any workflow sate. Only use the
743743
* SideEffect's return value. For example this code is BROKEN:
744744
*
745745
* <pre><code>
@@ -793,7 +793,7 @@ public static <R> R sideEffect(Class<R> resultClass, Func<R> func) {
793793
* failure. The decision task after timeout is rescheduled and re-executed giving SideEffect
794794
* another chance to succeed.
795795
*
796-
* <p>Caution: do not use sideEffect function to modify any worklfow sate. Only use the
796+
* <p>Caution: do not use sideEffect function to modify any workflow sate. Only use the
797797
* SideEffect's return value. For example this code is BROKEN:
798798
*
799799
* <pre><code>

src/test/java/com/uber/cadence/internal/testing/WorkflowTestingTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ public interface ChildWorkflow {
608608
String workflow(String input, String parentId);
609609
}
610610

611-
public static class ChildWorklfowImpl implements ChildWorkflow {
611+
public static class ChildWorkflowImpl implements ChildWorkflow {
612612

613613
@Override
614614
public String workflow(String input, String parentId) {
@@ -622,7 +622,7 @@ public String workflow(String input, String parentId) {
622622
@Test
623623
public void testChild() {
624624
Worker worker = testEnvironment.newWorker(TASK_LIST);
625-
worker.registerWorkflowImplementationTypes(ChildWorklfowImpl.class, ParentWorkflowImpl.class);
625+
worker.registerWorkflowImplementationTypes(ChildWorkflowImpl.class, ParentWorkflowImpl.class);
626626
testEnvironment.start();
627627
WorkflowClient client = testEnvironment.newWorkflowClient();
628628
WorkflowOptions options = new WorkflowOptions.Builder().setWorkflowId("parent1").build();
@@ -645,7 +645,7 @@ public String workflow(String input) {
645645
public void signal(String value) {}
646646
}
647647

648-
public static class SimulatedTimeoutChildWorklfow implements ChildWorkflow {
648+
public static class SimulatedTimeoutChildWorkflow implements ChildWorkflow {
649649

650650
@Override
651651
public String workflow(String input, String parentId) {
@@ -658,7 +658,7 @@ public String workflow(String input, String parentId) {
658658
public void testChildSimulatedTimeout() throws Throwable {
659659
Worker worker = testEnvironment.newWorker(TASK_LIST);
660660
worker.registerWorkflowImplementationTypes(
661-
SimulatedTimeoutParentWorkflow.class, SimulatedTimeoutChildWorklfow.class);
661+
SimulatedTimeoutParentWorkflow.class, SimulatedTimeoutChildWorkflow.class);
662662
testEnvironment.start();
663663
WorkflowClient client = testEnvironment.newWorkflowClient();
664664
WorkflowOptions options = new WorkflowOptions.Builder().setWorkflowId("parent1").build();

0 commit comments

Comments
 (0)