File Coverage

blib/lib/Paws/SimpleWorkflow/Decision.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::SimpleWorkflow::Decision;
2 1     1   523 use Moose;
  1         3  
  1         10  
3             has CancelTimerDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::CancelTimerDecisionAttributes', request_name => 'cancelTimerDecisionAttributes', traits => ['NameInRequest']);
4             has CancelWorkflowExecutionDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::CancelWorkflowExecutionDecisionAttributes', request_name => 'cancelWorkflowExecutionDecisionAttributes', traits => ['NameInRequest']);
5             has CompleteWorkflowExecutionDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::CompleteWorkflowExecutionDecisionAttributes', request_name => 'completeWorkflowExecutionDecisionAttributes', traits => ['NameInRequest']);
6             has ContinueAsNewWorkflowExecutionDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::ContinueAsNewWorkflowExecutionDecisionAttributes', request_name => 'continueAsNewWorkflowExecutionDecisionAttributes', traits => ['NameInRequest']);
7             has DecisionType => (is => 'ro', isa => 'Str', request_name => 'decisionType', traits => ['NameInRequest'], required => 1);
8             has FailWorkflowExecutionDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::FailWorkflowExecutionDecisionAttributes', request_name => 'failWorkflowExecutionDecisionAttributes', traits => ['NameInRequest']);
9             has RecordMarkerDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::RecordMarkerDecisionAttributes', request_name => 'recordMarkerDecisionAttributes', traits => ['NameInRequest']);
10             has RequestCancelActivityTaskDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::RequestCancelActivityTaskDecisionAttributes', request_name => 'requestCancelActivityTaskDecisionAttributes', traits => ['NameInRequest']);
11             has RequestCancelExternalWorkflowExecutionDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::RequestCancelExternalWorkflowExecutionDecisionAttributes', request_name => 'requestCancelExternalWorkflowExecutionDecisionAttributes', traits => ['NameInRequest']);
12             has ScheduleActivityTaskDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::ScheduleActivityTaskDecisionAttributes', request_name => 'scheduleActivityTaskDecisionAttributes', traits => ['NameInRequest']);
13             has ScheduleLambdaFunctionDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::ScheduleLambdaFunctionDecisionAttributes', request_name => 'scheduleLambdaFunctionDecisionAttributes', traits => ['NameInRequest']);
14             has SignalExternalWorkflowExecutionDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::SignalExternalWorkflowExecutionDecisionAttributes', request_name => 'signalExternalWorkflowExecutionDecisionAttributes', traits => ['NameInRequest']);
15             has StartChildWorkflowExecutionDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::StartChildWorkflowExecutionDecisionAttributes', request_name => 'startChildWorkflowExecutionDecisionAttributes', traits => ['NameInRequest']);
16             has StartTimerDecisionAttributes => (is => 'ro', isa => 'Paws::SimpleWorkflow::StartTimerDecisionAttributes', request_name => 'startTimerDecisionAttributes', traits => ['NameInRequest']);
17             1;
18              
19             ### main pod documentation begin ###
20              
21             =head1 NAME
22              
23             Paws::SimpleWorkflow::Decision
24              
25             =head1 USAGE
26              
27             This class represents one of two things:
28              
29             =head3 Arguments in a call to a service
30              
31             Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
32             Each attribute should be used as a named argument in the calls that expect this type of object.
33              
34             As an example, if Att1 is expected to be a Paws::SimpleWorkflow::Decision object:
35              
36             $service_obj->Method(Att1 => { CancelTimerDecisionAttributes => $value, ..., StartTimerDecisionAttributes => $value });
37              
38             =head3 Results returned from an API call
39              
40             Use accessors for each attribute. If Att1 is expected to be an Paws::SimpleWorkflow::Decision object:
41              
42             $result = $service_obj->Method(...);
43             $result->Att1->CancelTimerDecisionAttributes
44              
45             =head1 DESCRIPTION
46              
47             Specifies a decision made by the decider. A decision can be one of
48             these types:
49              
50             =over
51              
52             =item *
53              
54             C<CancelTimer> E<ndash> Cancels a previously started timer and records
55             a C<TimerCanceled> event in the history.
56              
57             =item *
58              
59             C<CancelWorkflowExecution> E<ndash> Closes the workflow execution and
60             records a C<WorkflowExecutionCanceled> event in the history.
61              
62             =item *
63              
64             C<CompleteWorkflowExecution> E<ndash> Closes the workflow execution and
65             records a C<WorkflowExecutionCompleted> event in the history .
66              
67             =item *
68              
69             C<ContinueAsNewWorkflowExecution> E<ndash> Closes the workflow
70             execution and starts a new workflow execution of the same type using
71             the same workflow ID and a unique run Id. A
72             C<WorkflowExecutionContinuedAsNew> event is recorded in the history.
73              
74             =item *
75              
76             C<FailWorkflowExecution> E<ndash> Closes the workflow execution and
77             records a C<WorkflowExecutionFailed> event in the history.
78              
79             =item *
80              
81             C<RecordMarker> E<ndash> Records a C<MarkerRecorded> event in the
82             history. Markers can be used for adding custom information in the
83             history for instance to let deciders know that they don't need to look
84             at the history beyond the marker event.
85              
86             =item *
87              
88             C<RequestCancelActivityTask> E<ndash> Attempts to cancel a previously
89             scheduled activity task. If the activity task was scheduled but has not
90             been assigned to a worker, then it is canceled. If the activity task
91             was already assigned to a worker, then the worker is informed that
92             cancellation has been requested in the response to
93             RecordActivityTaskHeartbeat.
94              
95             =item *
96              
97             C<RequestCancelExternalWorkflowExecution> E<ndash> Requests that a
98             request be made to cancel the specified external workflow execution and
99             records a C<RequestCancelExternalWorkflowExecutionInitiated> event in
100             the history.
101              
102             =item *
103              
104             C<ScheduleActivityTask> E<ndash> Schedules an activity task.
105              
106             =item *
107              
108             C<SignalExternalWorkflowExecution> E<ndash> Requests a signal to be
109             delivered to the specified external workflow execution and records a
110             C<SignalExternalWorkflowExecutionInitiated> event in the history.
111              
112             =item *
113              
114             C<StartChildWorkflowExecution> E<ndash> Requests that a child workflow
115             execution be started and records a
116             C<StartChildWorkflowExecutionInitiated> event in the history. The child
117             workflow execution is a separate workflow execution with its own
118             history.
119              
120             =item *
121              
122             C<StartTimer> E<ndash> Starts a timer for this workflow execution and
123             records a C<TimerStarted> event in the history. This timer fires after
124             the specified delay and record a C<TimerFired> event.
125              
126             =back
127              
128             B<Access Control>
129              
130             If you grant permission to use C<RespondDecisionTaskCompleted>, you can
131             use IAM policies to express permissions for the list of decisions
132             returned by this action as if they were members of the API. Treating
133             decisions as a pseudo API maintains a uniform conceptual model and
134             helps keep policies readable. For details and example IAM policies, see
135             Using IAM to Manage Access to Amazon SWF Workflows in the I<Amazon SWF
136             Developer Guide>.
137              
138             B<Decision Failure>
139              
140             Decisions can fail for several reasons
141              
142             =over
143              
144             =item *
145              
146             The ordering of decisions should follow a logical flow. Some decisions
147             might not make sense in the current context of the workflow execution
148             and therefore fails.
149              
150             =item *
151              
152             A limit on your account was reached.
153              
154             =item *
155              
156             The decision lacks sufficient permissions.
157              
158             =back
159              
160             One of the following events might be added to the history to indicate
161             an error. The event attribute's C<cause> parameter indicates the cause.
162             If C<cause> is set to C<OPERATION_NOT_PERMITTED>, the decision failed
163             because it lacked sufficient permissions. For details and example IAM
164             policies, see Using IAM to Manage Access to Amazon SWF Workflows in the
165             I<Amazon SWF Developer Guide>.
166              
167             =over
168              
169             =item *
170              
171             C<ScheduleActivityTaskFailed> E<ndash> A C<ScheduleActivityTask>
172             decision failed. This could happen if the activity type specified in
173             the decision isn't registered, is in a deprecated state, or the
174             decision isn't properly configured.
175              
176             =item *
177              
178             C<RequestCancelActivityTaskFailed> E<ndash> A
179             C<RequestCancelActivityTask> decision failed. This could happen if
180             there is no open activity task with the specified activityId.
181              
182             =item *
183              
184             C<StartTimerFailed> E<ndash> A C<StartTimer> decision failed. This
185             could happen if there is another open timer with the same timerId.
186              
187             =item *
188              
189             C<CancelTimerFailed> E<ndash> A C<CancelTimer> decision failed. This
190             could happen if there is no open timer with the specified timerId.
191              
192             =item *
193              
194             C<StartChildWorkflowExecutionFailed> E<ndash> A
195             C<StartChildWorkflowExecution> decision failed. This could happen if
196             the workflow type specified isn't registered, is deprecated, or the
197             decision isn't properly configured.
198              
199             =item *
200              
201             C<SignalExternalWorkflowExecutionFailed> E<ndash> A
202             C<SignalExternalWorkflowExecution> decision failed. This could happen
203             if the C<workflowID> specified in the decision was incorrect.
204              
205             =item *
206              
207             C<RequestCancelExternalWorkflowExecutionFailed> E<ndash> A
208             C<RequestCancelExternalWorkflowExecution> decision failed. This could
209             happen if the C<workflowID> specified in the decision was incorrect.
210              
211             =item *
212              
213             C<CancelWorkflowExecutionFailed> E<ndash> A C<CancelWorkflowExecution>
214             decision failed. This could happen if there is an unhandled decision
215             task pending in the workflow execution.
216              
217             =item *
218              
219             C<CompleteWorkflowExecutionFailed> E<ndash> A
220             C<CompleteWorkflowExecution> decision failed. This could happen if
221             there is an unhandled decision task pending in the workflow execution.
222              
223             =item *
224              
225             C<ContinueAsNewWorkflowExecutionFailed> E<ndash> A
226             C<ContinueAsNewWorkflowExecution> decision failed. This could happen if
227             there is an unhandled decision task pending in the workflow execution
228             or the ContinueAsNewWorkflowExecution decision was not configured
229             correctly.
230              
231             =item *
232              
233             C<FailWorkflowExecutionFailed> E<ndash> A C<FailWorkflowExecution>
234             decision failed. This could happen if there is an unhandled decision
235             task pending in the workflow execution.
236              
237             =back
238              
239             The preceding error events might occur due to an error in the decider
240             logic, which might put the workflow execution in an unstable state The
241             cause field in the event structure for the error event indicates the
242             cause of the error.
243              
244             A workflow execution may be closed by the decider by returning one of
245             the following decisions when completing a decision task:
246             C<CompleteWorkflowExecution>, C<FailWorkflowExecution>,
247             C<CancelWorkflowExecution> and C<ContinueAsNewWorkflowExecution>. An
248             C<UnhandledDecision> fault is returned if a workflow closing decision
249             is specified and a signal or activity event had been added to the
250             history while the decision task was being performed by the decider.
251             Unlike the above situations which are logic issues, this fault is
252             always possible because of race conditions in a distributed system. The
253             right action here is to call RespondDecisionTaskCompleted without any
254             decisions. This would result in another decision task with these new
255             events included in the history. The decider should handle the new
256             events and may decide to close the workflow execution.
257              
258             B<How to Code a Decision>
259              
260             You code a decision by first setting the decision type field to one of
261             the above decision values, and then set the corresponding attributes
262             field shown below:
263              
264             =over
265              
266             =item *
267              
268             C<ScheduleActivityTaskDecisionAttributes>
269              
270             =item *
271              
272             C<RequestCancelActivityTaskDecisionAttributes>
273              
274             =item *
275              
276             C<CompleteWorkflowExecutionDecisionAttributes>
277              
278             =item *
279              
280             C<FailWorkflowExecutionDecisionAttributes>
281              
282             =item *
283              
284             C<CancelWorkflowExecutionDecisionAttributes>
285              
286             =item *
287              
288             C<ContinueAsNewWorkflowExecutionDecisionAttributes>
289              
290             =item *
291              
292             C<RecordMarkerDecisionAttributes>
293              
294             =item *
295              
296             C<StartTimerDecisionAttributes>
297              
298             =item *
299              
300             C<CancelTimerDecisionAttributes>
301              
302             =item *
303              
304             C<SignalExternalWorkflowExecutionDecisionAttributes>
305              
306             =item *
307              
308             C<RequestCancelExternalWorkflowExecutionDecisionAttributes>
309              
310             =item *
311              
312             C<StartChildWorkflowExecutionDecisionAttributes>
313              
314             =back
315              
316              
317             =head1 ATTRIBUTES
318              
319              
320             =head2 CancelTimerDecisionAttributes => L<Paws::SimpleWorkflow::CancelTimerDecisionAttributes>
321              
322             Provides the details of the C<CancelTimer> decision. It isn't set for
323             other decision types.
324              
325              
326             =head2 CancelWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::CancelWorkflowExecutionDecisionAttributes>
327              
328             Provides the details of the C<CancelWorkflowExecution> decision. It
329             isn't set for other decision types.
330              
331              
332             =head2 CompleteWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::CompleteWorkflowExecutionDecisionAttributes>
333              
334             Provides the details of the C<CompleteWorkflowExecution> decision. It
335             isn't set for other decision types.
336              
337              
338             =head2 ContinueAsNewWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::ContinueAsNewWorkflowExecutionDecisionAttributes>
339              
340             Provides the details of the C<ContinueAsNewWorkflowExecution> decision.
341             It isn't set for other decision types.
342              
343              
344             =head2 B<REQUIRED> DecisionType => Str
345              
346             Specifies the type of the decision.
347              
348              
349             =head2 FailWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::FailWorkflowExecutionDecisionAttributes>
350              
351             Provides the details of the C<FailWorkflowExecution> decision. It isn't
352             set for other decision types.
353              
354              
355             =head2 RecordMarkerDecisionAttributes => L<Paws::SimpleWorkflow::RecordMarkerDecisionAttributes>
356              
357             Provides the details of the C<RecordMarker> decision. It isn't set for
358             other decision types.
359              
360              
361             =head2 RequestCancelActivityTaskDecisionAttributes => L<Paws::SimpleWorkflow::RequestCancelActivityTaskDecisionAttributes>
362              
363             Provides the details of the C<RequestCancelActivityTask> decision. It
364             isn't set for other decision types.
365              
366              
367             =head2 RequestCancelExternalWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::RequestCancelExternalWorkflowExecutionDecisionAttributes>
368              
369             Provides the details of the C<RequestCancelExternalWorkflowExecution>
370             decision. It isn't set for other decision types.
371              
372              
373             =head2 ScheduleActivityTaskDecisionAttributes => L<Paws::SimpleWorkflow::ScheduleActivityTaskDecisionAttributes>
374              
375             Provides the details of the C<ScheduleActivityTask> decision. It isn't
376             set for other decision types.
377              
378              
379             =head2 ScheduleLambdaFunctionDecisionAttributes => L<Paws::SimpleWorkflow::ScheduleLambdaFunctionDecisionAttributes>
380              
381             Provides the details of the C<ScheduleLambdaFunction> decision. It
382             isn't set for other decision types.
383              
384              
385             =head2 SignalExternalWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::SignalExternalWorkflowExecutionDecisionAttributes>
386              
387             Provides the details of the C<SignalExternalWorkflowExecution>
388             decision. It isn't set for other decision types.
389              
390              
391             =head2 StartChildWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::StartChildWorkflowExecutionDecisionAttributes>
392              
393             Provides the details of the C<StartChildWorkflowExecution> decision. It
394             isn't set for other decision types.
395              
396              
397             =head2 StartTimerDecisionAttributes => L<Paws::SimpleWorkflow::StartTimerDecisionAttributes>
398              
399             Provides the details of the C<StartTimer> decision. It isn't set for
400             other decision types.
401              
402              
403              
404             =head1 SEE ALSO
405              
406             This class forms part of L<Paws>, describing an object used in L<Paws::SimpleWorkflow>
407              
408             =head1 BUGS and CONTRIBUTIONS
409              
410             The source code is located here: https://github.com/pplu/aws-sdk-perl
411              
412             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
413              
414             =cut
415