Skip to content

Commit 4e89ea8

Browse files
committed
Address build issues
1 parent e2957fb commit 4e89ea8

File tree

6 files changed

+58
-52
lines changed

6 files changed

+58
-52
lines changed

src/main/java/com/uber/cadence/internal/common/WorkflowExecutionUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,8 @@ public static EventType getEventTypeForDecision(DecisionType decisionType) {
10021002
return EventType.StartChildWorkflowExecutionInitiated;
10031003
case SignalExternalWorkflowExecution:
10041004
return EventType.SignalExternalWorkflowExecutionInitiated;
1005+
case UpsertWorkflowSearchAttributes:
1006+
return EventType.UpsertWorkflowSearchAttributes;
10051007
}
10061008
throw new IllegalArgumentException("Unknown decisionType");
10071009
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ private void processEvent(HistoryEvent event) {
228228
case DecisionTaskFailed:
229229
context.handleDecisionTaskFailed(event);
230230
break;
231+
case UpsertWorkflowSearchAttributes:
232+
// TODO: https://github.com/uber/cadence-java-client/issues/360
233+
break;
231234
}
232235
}
233236

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,8 @@ public StartWorkflowExecutionResponse SignalWithStartWorkflowExecution(
482482
@Override
483483
public ResetWorkflowExecutionResponse ResetWorkflowExecution(
484484
ResetWorkflowExecutionRequest resetRequest)
485-
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, LimitExceededError, ClientVersionNotSupportedError, TException {
485+
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
486+
DomainNotActiveError, LimitExceededError, ClientVersionNotSupportedError, TException {
486487
return impl.ResetWorkflowExecution(resetRequest);
487488
}
488489

@@ -512,21 +513,24 @@ public ListClosedWorkflowExecutionsResponse ListClosedWorkflowExecutions(
512513
@Override
513514
public ListWorkflowExecutionsResponse ListWorkflowExecutions(
514515
ListWorkflowExecutionsRequest listRequest)
515-
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, TException {
516+
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
517+
ClientVersionNotSupportedError, TException {
516518
return impl.ListWorkflowExecutions(listRequest);
517519
}
518520

519521
@Override
520522
public ListWorkflowExecutionsResponse ScanWorkflowExecutions(
521523
ListWorkflowExecutionsRequest listRequest)
522-
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, TException {
524+
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
525+
ClientVersionNotSupportedError, TException {
523526
return impl.ScanWorkflowExecutions(listRequest);
524527
}
525528

526529
@Override
527530
public CountWorkflowExecutionsResponse CountWorkflowExecutions(
528531
CountWorkflowExecutionsRequest countRequest)
529-
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError, ClientVersionNotSupportedError, TException {
532+
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
533+
ClientVersionNotSupportedError, TException {
530534
return impl.CountWorkflowExecutions(countRequest);
531535
}
532536

@@ -772,9 +776,7 @@ public void CountWorkflowExecutions(
772776
}
773777

774778
@Override
775-
public void GetSearchAttributes(
776-
AsyncMethodCallback resultHandler)
777-
throws TException {
779+
public void GetSearchAttributes(AsyncMethodCallback resultHandler) throws TException {
778780
impl.GetSearchAttributes(resultHandler);
779781
}
780782

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -367,31 +367,31 @@ public ListClosedWorkflowExecutionsResponse ListClosedWorkflowExecutions(
367367

368368
@Override
369369
public ListWorkflowExecutionsResponse ListWorkflowExecutions(
370-
ListWorkflowExecutionsRequest listRequest)
371-
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
370+
ListWorkflowExecutionsRequest listRequest)
371+
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
372372
ClientVersionNotSupportedError, TException {
373373
return impl.ListWorkflowExecutions(listRequest);
374374
}
375375

376376
@Override
377377
public ListWorkflowExecutionsResponse ScanWorkflowExecutions(
378-
ListWorkflowExecutionsRequest listRequest)
379-
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
378+
ListWorkflowExecutionsRequest listRequest)
379+
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
380380
ClientVersionNotSupportedError, TException {
381381
return impl.ScanWorkflowExecutions(listRequest);
382382
}
383383

384384
@Override
385385
public CountWorkflowExecutionsResponse CountWorkflowExecutions(
386-
CountWorkflowExecutionsRequest countRequest)
387-
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
386+
CountWorkflowExecutionsRequest countRequest)
387+
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
388388
ClientVersionNotSupportedError, TException {
389389
return impl.CountWorkflowExecutions(countRequest);
390390
}
391391

392392
@Override
393393
public GetSearchAttributesResponse GetSearchAttributes()
394-
throws InternalServiceError, ServiceBusyError, ClientVersionNotSupportedError, TException {
394+
throws InternalServiceError, ServiceBusyError, ClientVersionNotSupportedError, TException {
395395
return impl.GetSearchAttributes();
396396
}
397397

@@ -631,9 +631,7 @@ public void CountWorkflowExecutions(
631631
}
632632

633633
@Override
634-
public void GetSearchAttributes(
635-
AsyncMethodCallback resultHandler)
636-
throws TException {
634+
public void GetSearchAttributes(AsyncMethodCallback resultHandler) throws TException {
637635
impl.GetSearchAttributes();
638636
}
639637

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,10 @@ public StartWorkflowExecutionResponse SignalWithStartWorkflowExecution(
541541

542542
// TODO: https://github.com/uber/cadence-java-client/issues/359
543543
@Override
544-
public ResetWorkflowExecutionResponse ResetWorkflowExecution(ResetWorkflowExecutionRequest resetRequest) throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError, LimitExceededError, ClientVersionNotSupportedError, TException {
544+
public ResetWorkflowExecutionResponse ResetWorkflowExecution(
545+
ResetWorkflowExecutionRequest resetRequest)
546+
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
547+
DomainNotActiveError, LimitExceededError, ClientVersionNotSupportedError, TException {
545548
return null;
546549
}
547550

@@ -883,9 +886,9 @@ public void SignalWithStartWorkflowExecution(
883886
}
884887

885888
@Override
886-
public void ResetWorkflowExecution(ResetWorkflowExecutionRequest resetRequest, AsyncMethodCallback resultHandler) throws TException {
887-
888-
}
889+
public void ResetWorkflowExecution(
890+
ResetWorkflowExecutionRequest resetRequest, AsyncMethodCallback resultHandler)
891+
throws TException {}
889892

890893
@Override
891894
public void TerminateWorkflowExecution(
@@ -930,8 +933,7 @@ public void CountWorkflowExecutions(
930933
}
931934

932935
@Override
933-
public void GetSearchAttributes(
934-
AsyncMethodCallback resultHandler) throws TException {
936+
public void GetSearchAttributes(AsyncMethodCallback resultHandler) throws TException {
935937
throw new UnsupportedOperationException("not implemented");
936938
}
937939

src/main/java/com/uber/cadence/serviceclient/WorkflowServiceTChannel.java

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,8 +1545,8 @@ public StartWorkflowExecutionResponse SignalWithStartWorkflowExecution(
15451545
@Override
15461546
public ResetWorkflowExecutionResponse ResetWorkflowExecution(
15471547
ResetWorkflowExecutionRequest resetRequest)
1548-
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError, DomainNotActiveError,
1549-
LimitExceededError, ClientVersionNotSupportedError, TException {
1548+
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
1549+
DomainNotActiveError, LimitExceededError, ClientVersionNotSupportedError, TException {
15501550
return null;
15511551
}
15521552

@@ -1731,20 +1731,21 @@ public ListWorkflowExecutionsResponse ListWorkflowExecutions(
17311731
ListWorkflowExecutionsRequest request)
17321732
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
17331733
ClientVersionNotSupportedError, TException {
1734-
return measureRemoteCall(ServiceMethod.LIST_WORKFLOW_EXECUTIONS, () -> listWorkflowExecutions(request));
1734+
return measureRemoteCall(
1735+
ServiceMethod.LIST_WORKFLOW_EXECUTIONS, () -> listWorkflowExecutions(request));
17351736
}
17361737

17371738
private ListWorkflowExecutionsResponse listWorkflowExecutions(
17381739
ListWorkflowExecutionsRequest listRequest) throws TException {
17391740
ThriftResponse<WorkflowService.ListWorkflowExecutions_result> response = null;
17401741
try {
17411742
ThriftRequest<WorkflowService.ListWorkflowExecutions_args> request =
1742-
buildThriftRequest(
1743-
"ListWorkflowExecutions",
1744-
new WorkflowService.ListWorkflowExecutions_args(listRequest));
1743+
buildThriftRequest(
1744+
"ListWorkflowExecutions",
1745+
new WorkflowService.ListWorkflowExecutions_args(listRequest));
17451746
response = doRemoteCall(request);
17461747
WorkflowService.ListWorkflowExecutions_result result =
1747-
response.getBody(WorkflowService.ListWorkflowExecutions_result.class);
1748+
response.getBody(WorkflowService.ListWorkflowExecutions_result.class);
17481749
if (response.getResponseCode() == ResponseCode.OK) {
17491750
return result.getSuccess();
17501751
}
@@ -1776,20 +1777,21 @@ public ListWorkflowExecutionsResponse ScanWorkflowExecutions(
17761777
ListWorkflowExecutionsRequest request)
17771778
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
17781779
ClientVersionNotSupportedError, TException {
1779-
return measureRemoteCall(ServiceMethod.SCAN_WORKFLOW_EXECUTIONS, () -> scanWorkflowExecutions(request));
1780+
return measureRemoteCall(
1781+
ServiceMethod.SCAN_WORKFLOW_EXECUTIONS, () -> scanWorkflowExecutions(request));
17801782
}
17811783

17821784
private ListWorkflowExecutionsResponse scanWorkflowExecutions(
1783-
ListWorkflowExecutionsRequest listRequest) throws TException {
1785+
ListWorkflowExecutionsRequest listRequest) throws TException {
17841786
ThriftResponse<WorkflowService.ScanWorkflowExecutions_result> response = null;
17851787
try {
17861788
ThriftRequest<WorkflowService.ScanWorkflowExecutions_args> request =
1787-
buildThriftRequest(
1788-
"ScanWorkflowExecutions",
1789-
new WorkflowService.ScanWorkflowExecutions_args(listRequest));
1789+
buildThriftRequest(
1790+
"ScanWorkflowExecutions",
1791+
new WorkflowService.ScanWorkflowExecutions_args(listRequest));
17901792
response = doRemoteCall(request);
17911793
WorkflowService.ScanWorkflowExecutions_result result =
1792-
response.getBody(WorkflowService.ScanWorkflowExecutions_result.class);
1794+
response.getBody(WorkflowService.ScanWorkflowExecutions_result.class);
17931795
if (response.getResponseCode() == ResponseCode.OK) {
17941796
return result.getSuccess();
17951797
}
@@ -1821,20 +1823,21 @@ public CountWorkflowExecutionsResponse CountWorkflowExecutions(
18211823
CountWorkflowExecutionsRequest countRequest)
18221824
throws BadRequestError, InternalServiceError, EntityNotExistsError, ServiceBusyError,
18231825
ClientVersionNotSupportedError, TException {
1824-
return measureRemoteCall(ServiceMethod.COUNT_WORKFLOW_EXECUTIONS, () -> countWorkflowExecutions(countRequest));
1826+
return measureRemoteCall(
1827+
ServiceMethod.COUNT_WORKFLOW_EXECUTIONS, () -> countWorkflowExecutions(countRequest));
18251828
}
18261829

18271830
private CountWorkflowExecutionsResponse countWorkflowExecutions(
1828-
CountWorkflowExecutionsRequest countRequest) throws TException {
1831+
CountWorkflowExecutionsRequest countRequest) throws TException {
18291832
ThriftResponse<WorkflowService.CountWorkflowExecutions_result> response = null;
18301833
try {
18311834
ThriftRequest<WorkflowService.CountWorkflowExecutions_args> request =
1832-
buildThriftRequest(
1833-
"CountWorkflowExecutions",
1834-
new WorkflowService.CountWorkflowExecutions_args(countRequest));
1835+
buildThriftRequest(
1836+
"CountWorkflowExecutions",
1837+
new WorkflowService.CountWorkflowExecutions_args(countRequest));
18351838
response = doRemoteCall(request);
18361839
WorkflowService.CountWorkflowExecutions_result result =
1837-
response.getBody(WorkflowService.CountWorkflowExecutions_result.class);
1840+
response.getBody(WorkflowService.CountWorkflowExecutions_result.class);
18381841
if (response.getResponseCode() == ResponseCode.OK) {
18391842
return result.getSuccess();
18401843
}
@@ -1871,12 +1874,10 @@ private GetSearchAttributesResponse getSearchAttributes() throws TException {
18711874
ThriftResponse<WorkflowService.GetSearchAttributes_result> response = null;
18721875
try {
18731876
ThriftRequest<WorkflowService.GetSearchAttributes_args> request =
1874-
buildThriftRequest(
1875-
"GetSearchAttributes",
1876-
new WorkflowService.GetSearchAttributes_args());
1877+
buildThriftRequest("GetSearchAttributes", new WorkflowService.GetSearchAttributes_args());
18771878
response = doRemoteCall(request);
18781879
WorkflowService.GetSearchAttributes_result result =
1879-
response.getBody(WorkflowService.GetSearchAttributes_result.class);
1880+
response.getBody(WorkflowService.GetSearchAttributes_result.class);
18801881
if (response.getResponseCode() == ResponseCode.OK) {
18811882
return result.getSuccess();
18821883
}
@@ -1897,7 +1898,6 @@ private GetSearchAttributesResponse getSearchAttributes() throws TException {
18971898
}
18981899
}
18991900

1900-
19011901
@Override
19021902
public void RespondQueryTaskCompleted(RespondQueryTaskCompletedRequest request)
19031903
throws TException {
@@ -2291,9 +2291,9 @@ public void SignalWithStartWorkflowExecution(
22912291
}
22922292

22932293
@Override
2294-
public void ResetWorkflowExecution(ResetWorkflowExecutionRequest resetRequest, AsyncMethodCallback resultHandler) throws TException {
2295-
2296-
}
2294+
public void ResetWorkflowExecution(
2295+
ResetWorkflowExecutionRequest resetRequest, AsyncMethodCallback resultHandler)
2296+
throws TException {}
22972297

22982298
@Override
22992299
public void TerminateWorkflowExecution(
@@ -2338,8 +2338,7 @@ public void CountWorkflowExecutions(
23382338
}
23392339

23402340
@Override
2341-
public void GetSearchAttributes(AsyncMethodCallback resultHandler)
2342-
throws TException {
2341+
public void GetSearchAttributes(AsyncMethodCallback resultHandler) throws TException {
23432342
throw new UnsupportedOperationException("not implemented");
23442343
}
23452344

0 commit comments

Comments
 (0)