Skip to content

Commit 1524521

Browse files
author
awstools
committed
feat(client-swf): This release adds new API parameters to override workflow task list for workflow executions.
1 parent 09062bb commit 1524521

File tree

6 files changed

+247
-208
lines changed

6 files changed

+247
-208
lines changed

clients/client-swf/src/commands/GetWorkflowExecutionHistoryCommand.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ export interface GetWorkflowExecutionHistoryCommandOutput extends History, __Met
187187
* // },
188188
* // taskPriority: "STRING_VALUE",
189189
* // startToCloseTimeout: "STRING_VALUE",
190+
* // scheduleToStartTimeout: "STRING_VALUE",
190191
* // },
191192
* // decisionTaskStartedEventAttributes: { // DecisionTaskStartedEventAttributes
192193
* // identity: "STRING_VALUE",
@@ -196,9 +197,13 @@ export interface GetWorkflowExecutionHistoryCommandOutput extends History, __Met
196197
* // executionContext: "STRING_VALUE",
197198
* // scheduledEventId: Number("long"), // required
198199
* // startedEventId: Number("long"), // required
200+
* // taskList: {
201+
* // name: "STRING_VALUE", // required
202+
* // },
203+
* // taskListScheduleToStartTimeout: "STRING_VALUE",
199204
* // },
200205
* // decisionTaskTimedOutEventAttributes: { // DecisionTaskTimedOutEventAttributes
201-
* // timeoutType: "START_TO_CLOSE", // required
206+
* // timeoutType: "START_TO_CLOSE" || "SCHEDULE_TO_START", // required
202207
* // scheduledEventId: Number("long"), // required
203208
* // startedEventId: Number("long"), // required
204209
* // },
@@ -294,9 +299,7 @@ export interface GetWorkflowExecutionHistoryCommandOutput extends History, __Met
294299
* // control: "STRING_VALUE",
295300
* // input: "STRING_VALUE",
296301
* // executionStartToCloseTimeout: "STRING_VALUE",
297-
* // taskList: {
298-
* // name: "STRING_VALUE", // required
299-
* // },
302+
* // taskList: "<TaskList>", // required
300303
* // taskPriority: "STRING_VALUE",
301304
* // decisionTaskCompletedEventId: Number("long"), // required
302305
* // childPolicy: "TERMINATE" || "REQUEST_CANCEL" || "ABANDON", // required

clients/client-swf/src/commands/PollForDecisionTaskCommand.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ export interface PollForDecisionTaskCommandOutput extends DecisionTask, __Metada
216216
* // },
217217
* // taskPriority: "STRING_VALUE",
218218
* // startToCloseTimeout: "STRING_VALUE",
219+
* // scheduleToStartTimeout: "STRING_VALUE",
219220
* // },
220221
* // decisionTaskStartedEventAttributes: { // DecisionTaskStartedEventAttributes
221222
* // identity: "STRING_VALUE",
@@ -225,9 +226,13 @@ export interface PollForDecisionTaskCommandOutput extends DecisionTask, __Metada
225226
* // executionContext: "STRING_VALUE",
226227
* // scheduledEventId: Number("long"), // required
227228
* // startedEventId: Number("long"), // required
229+
* // taskList: {
230+
* // name: "STRING_VALUE", // required
231+
* // },
232+
* // taskListScheduleToStartTimeout: "STRING_VALUE",
228233
* // },
229234
* // decisionTaskTimedOutEventAttributes: { // DecisionTaskTimedOutEventAttributes
230-
* // timeoutType: "START_TO_CLOSE", // required
235+
* // timeoutType: "START_TO_CLOSE" || "SCHEDULE_TO_START", // required
231236
* // scheduledEventId: Number("long"), // required
232237
* // startedEventId: Number("long"), // required
233238
* // },
@@ -323,9 +328,7 @@ export interface PollForDecisionTaskCommandOutput extends DecisionTask, __Metada
323328
* // control: "STRING_VALUE",
324329
* // input: "STRING_VALUE",
325330
* // executionStartToCloseTimeout: "STRING_VALUE",
326-
* // taskList: {
327-
* // name: "STRING_VALUE", // required
328-
* // },
331+
* // taskList: "<TaskList>", // required
329332
* // taskPriority: "STRING_VALUE",
330333
* // decisionTaskCompletedEventId: Number("long"), // required
331334
* // childPolicy: "TERMINATE" || "REQUEST_CANCEL" || "ABANDON", // required

clients/client-swf/src/commands/RespondDecisionTaskCompletedCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ export interface RespondDecisionTaskCompletedCommandOutput extends __MetadataBea
166166
* },
167167
* ],
168168
* executionContext: "STRING_VALUE",
169+
* taskList: {
170+
* name: "STRING_VALUE", // required
171+
* },
172+
* taskListScheduleToStartTimeout: "STRING_VALUE",
169173
* };
170174
* const command = new RespondDecisionTaskCompletedCommand(input);
171175
* const response = await client.send(command);

clients/client-swf/src/endpoint/ruleset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ o={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[n,"supportsDualStack"]}]},
2828
p=[j],
2929
q=[k],
3030
r=[{[v]:"Region"}];
31-
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]}]},{type:b,rules:[{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://swf-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://swf.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://swf-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://swf.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://swf.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
31+
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]},{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{endpoint:{url:"https://swf-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://swf.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://swf-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{endpoint:{url:"https://swf.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://swf.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
3232
export const ruleSet: RuleSetObject = _data;

clients/client-swf/src/models/models_0.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2618,6 +2618,18 @@ export interface DecisionTaskCompletedEventAttributes {
26182618
* events leading up to this event.</p>
26192619
*/
26202620
startedEventId: number | undefined;
2621+
2622+
/**
2623+
* @public
2624+
* <p>Represents a task list.</p>
2625+
*/
2626+
taskList?: TaskList;
2627+
2628+
/**
2629+
* @public
2630+
* <p>The maximum amount of time the decision task can wait to be assigned to a worker.</p>
2631+
*/
2632+
taskListScheduleToStartTimeout?: string;
26212633
}
26222634

26232635
/**
@@ -2647,6 +2659,12 @@ export interface DecisionTaskScheduledEventAttributes {
26472659
* <p>The duration is specified in seconds, an integer greater than or equal to <code>0</code>. You can use <code>NONE</code> to specify unlimited duration.</p>
26482660
*/
26492661
startToCloseTimeout?: string;
2662+
2663+
/**
2664+
* @public
2665+
* <p>The maximum amount of time the decision task can wait to be assigned to a worker.</p>
2666+
*/
2667+
scheduleToStartTimeout?: string;
26502668
}
26512669

26522670
/**
@@ -2674,6 +2692,7 @@ export interface DecisionTaskStartedEventAttributes {
26742692
* @enum
26752693
*/
26762694
export const DecisionTaskTimeoutType = {
2695+
SCHEDULE_TO_START: "SCHEDULE_TO_START",
26772696
START_TO_CLOSE: "START_TO_CLOSE",
26782697
} as const;
26792698

@@ -6699,6 +6718,19 @@ export interface RespondDecisionTaskCompletedInput {
66996718
* <p>User defined context to add to workflow execution.</p>
67006719
*/
67016720
executionContext?: string;
6721+
6722+
/**
6723+
* @public
6724+
* <p>The task list to use for the future decision tasks of this workflow execution. This list overrides the original task list you specified while starting the workflow execution. </p>
6725+
*/
6726+
taskList?: TaskList;
6727+
6728+
/**
6729+
* @public
6730+
* <p>Specifies a timeout (in seconds) for the task list override. When this parameter is missing, the task list override is permanent. This parameter makes it possible to temporarily override the task list. If a decision task scheduled on the override task list is not started within the timeout, the decision task will time out. Amazon SWF will revert the override and schedule a new decision task to the original task list.</p>
6731+
* <p>If a decision task scheduled on the override task list is started within the timeout, but not completed within the start-to-close timeout, Amazon SWF will also revert the override and schedule a new decision task to the original task list.</p>
6732+
*/
6733+
taskListScheduleToStartTimeout?: string;
67026734
}
67036735

67046736
/**

0 commit comments

Comments
 (0)