@@ -905,6 +905,9 @@ private PollForDecisionTaskResponse pollForDecisionTask(PollForDecisionTaskReque
905
905
if (result .isSetEntityNotExistError ()) {
906
906
throw result .getEntityNotExistError ();
907
907
}
908
+ if (result .isSetClientVersionNotSupportedError ()) {
909
+ throw result .getClientVersionNotSupportedError ();
910
+ }
908
911
throw new TException ("PollForDecisionTask failed with unknown error:" + result );
909
912
} finally {
910
913
if (response != null ) {
@@ -950,6 +953,9 @@ private RespondDecisionTaskCompletedResponse respondDecisionTaskCompleted(
950
953
if (result .isSetEntityNotExistError ()) {
951
954
throw result .getEntityNotExistError ();
952
955
}
956
+ if (result .isSetClientVersionNotSupportedError ()) {
957
+ throw result .getClientVersionNotSupportedError ();
958
+ }
953
959
throw new TException ("RespondDecisionTaskCompleted failed with unknown error:" + result );
954
960
} finally {
955
961
if (response != null ) {
@@ -997,6 +1003,9 @@ private void respondDecisionTaskFailed(RespondDecisionTaskFailedRequest failedRe
997
1003
if (result .isSetEntityNotExistError ()) {
998
1004
throw result .getEntityNotExistError ();
999
1005
}
1006
+ if (result .isSetClientVersionNotSupportedError ()) {
1007
+ throw result .getClientVersionNotSupportedError ();
1008
+ }
1000
1009
throw new TException ("RespondDecisionTaskFailed failed with unknown error:" + result );
1001
1010
} finally {
1002
1011
if (response != null ) {
@@ -1042,6 +1051,9 @@ private PollForActivityTaskResponse pollForActivityTask(PollForActivityTaskReque
1042
1051
if (result .isSetLimitExceededError ()) {
1043
1052
throw result .getLimitExceededError ();
1044
1053
}
1054
+ if (result .isSetClientVersionNotSupportedError ()) {
1055
+ throw result .getClientVersionNotSupportedError ();
1056
+ }
1045
1057
throw new TException ("PollForActivityTask failed with unknown error:" + result );
1046
1058
} finally {
1047
1059
if (response != null ) {
@@ -1086,6 +1098,9 @@ private RecordActivityTaskHeartbeatResponse recordActivityTaskHeartbeat(
1086
1098
if (result .isSetLimitExceededError ()) {
1087
1099
throw result .getLimitExceededError ();
1088
1100
}
1101
+ if (result .isSetClientVersionNotSupportedError ()) {
1102
+ throw result .getClientVersionNotSupportedError ();
1103
+ }
1089
1104
throw new TException ("RecordActivityTaskHeartbeat failed with unknown error:" + result );
1090
1105
} finally {
1091
1106
if (response != null ) {
@@ -1133,6 +1148,9 @@ private RecordActivityTaskHeartbeatResponse recordActivityTaskHeartbeatByID(
1133
1148
if (result .isSetLimitExceededError ()) {
1134
1149
throw result .getLimitExceededError ();
1135
1150
}
1151
+ if (result .isSetClientVersionNotSupportedError ()) {
1152
+ throw result .getClientVersionNotSupportedError ();
1153
+ }
1136
1154
throw new TException ("RecordActivityTaskHeartbeatByID failed with unknown error:" + result );
1137
1155
} finally {
1138
1156
if (response != null ) {
@@ -1177,6 +1195,9 @@ private void respondActivityTaskCompleted(RespondActivityTaskCompletedRequest co
1177
1195
if (result .isSetLimitExceededError ()) {
1178
1196
throw result .getLimitExceededError ();
1179
1197
}
1198
+ if (result .isSetClientVersionNotSupportedError ()) {
1199
+ throw result .getClientVersionNotSupportedError ();
1200
+ }
1180
1201
throw new TException ("RespondActivityTaskCompleted failed with unknown error:" + result );
1181
1202
} finally {
1182
1203
if (response != null ) {
@@ -1222,6 +1243,9 @@ private void respondActivityTaskCompletedByID(
1222
1243
if (result .isSetLimitExceededError ()) {
1223
1244
throw result .getLimitExceededError ();
1224
1245
}
1246
+ if (result .isSetClientVersionNotSupportedError ()) {
1247
+ throw result .getClientVersionNotSupportedError ();
1248
+ }
1225
1249
throw new TException ("RespondActivityTaskCompletedByID failed with unknown error:" + result );
1226
1250
} finally {
1227
1251
if (response != null ) {
@@ -1266,6 +1290,9 @@ private void respondActivityTaskFailed(RespondActivityTaskFailedRequest failRequ
1266
1290
if (result .isSetLimitExceededError ()) {
1267
1291
throw result .getLimitExceededError ();
1268
1292
}
1293
+ if (result .isSetClientVersionNotSupportedError ()) {
1294
+ throw result .getClientVersionNotSupportedError ();
1295
+ }
1269
1296
throw new TException ("RespondActivityTaskFailed failed with unknown error:" + result );
1270
1297
} finally {
1271
1298
if (response != null ) {
@@ -1311,6 +1338,9 @@ private void respondActivityTaskFailedByID(RespondActivityTaskFailedByIDRequest
1311
1338
if (result .isSetLimitExceededError ()) {
1312
1339
throw result .getLimitExceededError ();
1313
1340
}
1341
+ if (result .isSetClientVersionNotSupportedError ()) {
1342
+ throw result .getClientVersionNotSupportedError ();
1343
+ }
1314
1344
throw new TException ("RespondActivityTaskFailedByID failedByID with unknown error:" + result );
1315
1345
} finally {
1316
1346
if (response != null ) {
@@ -1355,6 +1385,9 @@ private void respondActivityTaskCanceled(RespondActivityTaskCanceledRequest canc
1355
1385
if (result .isSetLimitExceededError ()) {
1356
1386
throw result .getLimitExceededError ();
1357
1387
}
1388
+ if (result .isSetClientVersionNotSupportedError ()) {
1389
+ throw result .getClientVersionNotSupportedError ();
1390
+ }
1358
1391
throw new TException ("RespondActivityTaskCanceled failed with unknown error:" + result );
1359
1392
} finally {
1360
1393
if (response != null ) {
@@ -1400,6 +1433,9 @@ private void respondActivityTaskCanceledByID(
1400
1433
if (result .isSetLimitExceededError ()) {
1401
1434
throw result .getLimitExceededError ();
1402
1435
}
1436
+ if (result .isSetClientVersionNotSupportedError ()) {
1437
+ throw result .getClientVersionNotSupportedError ();
1438
+ }
1403
1439
throw new TException ("RespondActivityTaskCanceledByID failed with unknown error:" + result );
1404
1440
} finally {
1405
1441
if (response != null ) {
@@ -1449,6 +1485,9 @@ private void requestCancelWorkflowExecution(RequestCancelWorkflowExecutionReques
1449
1485
if (result .isSetLimitExceededError ()) {
1450
1486
throw result .getLimitExceededError ();
1451
1487
}
1488
+ if (result .isSetClientVersionNotSupportedError ()) {
1489
+ throw result .getClientVersionNotSupportedError ();
1490
+ }
1452
1491
throw new TException ("RequestCancelWorkflowExecution failed with unknown error:" + result );
1453
1492
} finally {
1454
1493
if (response != null ) {
@@ -1492,6 +1531,9 @@ private void signalWorkflowExecution(SignalWorkflowExecutionRequest signalReques
1492
1531
if (result .isSetLimitExceededError ()) {
1493
1532
throw result .getLimitExceededError ();
1494
1533
}
1534
+ if (result .isSetClientVersionNotSupportedError ()) {
1535
+ throw result .getClientVersionNotSupportedError ();
1536
+ }
1495
1537
throw new TException ("SignalWorkflowExecution failed with unknown error:" + result );
1496
1538
} finally {
1497
1539
if (response != null ) {
@@ -1508,13 +1550,53 @@ public StartWorkflowExecutionResponse SignalWithStartWorkflowExecution(
1508
1550
() -> signalWithStartWorkflowExecution (signalWithStartRequest ));
1509
1551
}
1510
1552
1511
- // TODO: https://github.com/uber/cadence-java-client/issues/359
1512
1553
@ Override
1513
1554
public ResetWorkflowExecutionResponse ResetWorkflowExecution (
1514
1555
ResetWorkflowExecutionRequest resetRequest )
1515
1556
throws BadRequestError , InternalServiceError , EntityNotExistsError , ServiceBusyError ,
1516
1557
DomainNotActiveError , LimitExceededError , ClientVersionNotSupportedError , TException {
1517
- return null ;
1558
+ return measureRemoteCall (
1559
+ ServiceMethod .RESET_WORKFLOW_EXECUTION , () -> resetWorkflowExecution (resetRequest ));
1560
+ }
1561
+
1562
+ private ResetWorkflowExecutionResponse resetWorkflowExecution (
1563
+ ResetWorkflowExecutionRequest resetRequest ) throws TException {
1564
+ ThriftResponse <WorkflowService .ResetWorkflowExecution_result > response = null ;
1565
+ try {
1566
+ ThriftRequest <WorkflowService .ResetWorkflowExecution_args > request =
1567
+ buildThriftRequest (
1568
+ "ResetWorkflowExecution" ,
1569
+ new WorkflowService .ResetWorkflowExecution_args (resetRequest ));
1570
+ response = doRemoteCall (request );
1571
+ WorkflowService .ResetWorkflowExecution_result result =
1572
+ response .getBody (WorkflowService .ResetWorkflowExecution_result .class );
1573
+ if (response .getResponseCode () == ResponseCode .OK ) {
1574
+ return result .getSuccess ();
1575
+ }
1576
+ if (result .isSetBadRequestError ()) {
1577
+ throw result .getBadRequestError ();
1578
+ }
1579
+ if (result .isSetEntityNotExistError ()) {
1580
+ throw result .getEntityNotExistError ();
1581
+ }
1582
+ if (result .isSetServiceBusyError ()) {
1583
+ throw result .getServiceBusyError ();
1584
+ }
1585
+ if (result .isSetDomainNotActiveError ()) {
1586
+ throw result .getDomainNotActiveError ();
1587
+ }
1588
+ if (result .isSetLimitExceededError ()) {
1589
+ throw result .getLimitExceededError ();
1590
+ }
1591
+ if (result .isSetClientVersionNotSupportedError ()) {
1592
+ throw result .getClientVersionNotSupportedError ();
1593
+ }
1594
+ throw new TException ("ResetWorkflowExecution failed with unknown error:" + result );
1595
+ } finally {
1596
+ if (response != null ) {
1597
+ response .release ();
1598
+ }
1599
+ }
1518
1600
}
1519
1601
1520
1602
private StartWorkflowExecutionResponse signalWithStartWorkflowExecution (
@@ -1550,6 +1632,9 @@ private StartWorkflowExecutionResponse signalWithStartWorkflowExecution(
1550
1632
if (result .isSetDomainNotActiveError ()) {
1551
1633
throw result .getDomainNotActiveError ();
1552
1634
}
1635
+ if (result .isSetClientVersionNotSupportedError ()) {
1636
+ throw result .getClientVersionNotSupportedError ();
1637
+ }
1553
1638
throw new TException ("SignalWithStartWorkflowExecution failed with unknown error:" + result );
1554
1639
} finally {
1555
1640
if (response != null ) {
@@ -1594,6 +1679,9 @@ private void terminateWorkflowExecution(TerminateWorkflowExecutionRequest termin
1594
1679
if (result .isSetLimitExceededError ()) {
1595
1680
throw result .getLimitExceededError ();
1596
1681
}
1682
+ if (result .isSetClientVersionNotSupportedError ()) {
1683
+ throw result .getClientVersionNotSupportedError ();
1684
+ }
1597
1685
throw new TException ("TerminateWorkflowExecution failed with unknown error:" + result );
1598
1686
} finally {
1599
1687
if (response != null ) {
@@ -1635,6 +1723,9 @@ private ListOpenWorkflowExecutionsResponse listOpenWorkflowExecutions(
1635
1723
if (result .isSetLimitExceededError ()) {
1636
1724
throw result .getLimitExceededError ();
1637
1725
}
1726
+ if (result .isSetClientVersionNotSupportedError ()) {
1727
+ throw result .getClientVersionNotSupportedError ();
1728
+ }
1638
1729
throw new TException ("ListOpenWorkflowExecutions failed with unknown error:" + result );
1639
1730
} finally {
1640
1731
if (response != null ) {
@@ -1673,6 +1764,9 @@ private ListClosedWorkflowExecutionsResponse listClosedWorkflowExecutions(
1673
1764
if (result .isSetServiceBusyError ()) {
1674
1765
throw result .getServiceBusyError ();
1675
1766
}
1767
+ if (result .isSetClientVersionNotSupportedError ()) {
1768
+ throw result .getClientVersionNotSupportedError ();
1769
+ }
1676
1770
throw new TException ("ListClosedWorkflowExecutions failed with unknown error:" + result );
1677
1771
} finally {
1678
1772
if (response != null ) {
@@ -1922,6 +2016,9 @@ private void respondQueryTaskCompleted(RespondQueryTaskCompletedRequest complete
1922
2016
if (result .isSetLimitExceededError ()) {
1923
2017
throw result .getLimitExceededError ();
1924
2018
}
2019
+ if (result .isSetClientVersionNotSupportedError ()) {
2020
+ throw result .getClientVersionNotSupportedError ();
2021
+ }
1925
2022
throw new TException ("RespondQueryTaskCompleted failed with unknown error:" + result );
1926
2023
} finally {
1927
2024
if (response != null ) {
@@ -1958,7 +2055,9 @@ private QueryWorkflowResponse queryWorkflow(QueryWorkflowRequest queryRequest) t
1958
2055
if (result .isSetQueryFailedError ()) {
1959
2056
throw result .getQueryFailedError ();
1960
2057
}
1961
-
2058
+ if (result .isSetClientVersionNotSupportedError ()) {
2059
+ throw result .getClientVersionNotSupportedError ();
2060
+ }
1962
2061
throw new TException ("QueryWorkflow failed with unknown error:" + result );
1963
2062
} finally {
1964
2063
if (response != null ) {
@@ -2005,6 +2104,9 @@ private ResetStickyTaskListResponse resetStickyTaskList(ResetStickyTaskListReque
2005
2104
if (result .isSetLimitExceededError ()) {
2006
2105
throw result .getLimitExceededError ();
2007
2106
}
2107
+ if (result .isSetClientVersionNotSupportedError ()) {
2108
+ throw result .getClientVersionNotSupportedError ();
2109
+ }
2008
2110
throw new TException ("ResetStickyTaskList failed with unknown error:" + result );
2009
2111
} finally {
2010
2112
if (response != null ) {
@@ -2046,6 +2148,9 @@ private DescribeWorkflowExecutionResponse describeWorkflowExecution(
2046
2148
if (result .isSetLimitExceededError ()) {
2047
2149
throw result .getLimitExceededError ();
2048
2150
}
2151
+ if (result .isSetClientVersionNotSupportedError ()) {
2152
+ throw result .getClientVersionNotSupportedError ();
2153
+ }
2049
2154
throw new TException ("DescribeWorkflowExecution failed with unknown error:" + result );
2050
2155
} finally {
2051
2156
if (response != null ) {
@@ -2085,6 +2190,9 @@ private DescribeTaskListResponse describeTaskList(DescribeTaskListRequest descri
2085
2190
if (result .isSetLimitExceededError ()) {
2086
2191
throw result .getLimitExceededError ();
2087
2192
}
2193
+ if (result .isSetClientVersionNotSupportedError ()) {
2194
+ throw result .getClientVersionNotSupportedError ();
2195
+ }
2088
2196
throw new TException ("DescribeTaskList failed with unknown error:" + result );
2089
2197
} finally {
2090
2198
if (response != null ) {
@@ -2332,7 +2440,9 @@ public void SignalWithStartWorkflowExecution(
2332
2440
@ Override
2333
2441
public void ResetWorkflowExecution (
2334
2442
ResetWorkflowExecutionRequest resetRequest , AsyncMethodCallback resultHandler )
2335
- throws TException {}
2443
+ throws TException {
2444
+ throw new UnsupportedOperationException ("not implemented" );
2445
+ }
2336
2446
2337
2447
@ Override
2338
2448
public void TerminateWorkflowExecution (
0 commit comments