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   705 use Moose;
  1         3  
  1         11  
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 * B<CancelTimer>: cancels a previously started timer and records
53             a C<TimerCanceled> event in the history.
54              
55             =item * B<CancelWorkflowExecution>: closes the workflow execution and
56             records a C<WorkflowExecutionCanceled> event in the history.
57              
58             =item * B<CompleteWorkflowExecution>: closes the workflow execution and
59             records a C<WorkflowExecutionCompleted> event in the history .
60              
61             =item * B<ContinueAsNewWorkflowExecution>: closes the workflow
62             execution and starts a new workflow execution of the same type using
63             the same workflow ID and a unique run ID. A
64             C<WorkflowExecutionContinuedAsNew> event is recorded in the history.
65              
66             =item * B<FailWorkflowExecution>: closes the workflow execution and
67             records a C<WorkflowExecutionFailed> event in the history.
68              
69             =item * B<RecordMarker>: records a C<MarkerRecorded> event in the
70             history. Markers can be used for adding custom information in the
71             history for instance to let deciders know that they do not need to look
72             at the history beyond the marker event.
73              
74             =item * B<RequestCancelActivityTask>: attempts to cancel a previously
75             scheduled activity task. If the activity task was scheduled but has not
76             been assigned to a worker, then it will be canceled. If the activity
77             task was already assigned to a worker, then the worker will be informed
78             that cancellation has been requested in the response to
79             RecordActivityTaskHeartbeat.
80              
81             =item * B<RequestCancelExternalWorkflowExecution>: requests that a
82             request be made to cancel the specified external workflow execution and
83             records a C<RequestCancelExternalWorkflowExecutionInitiated> event in
84             the history.
85              
86             =item * B<ScheduleActivityTask>: schedules an activity task.
87              
88             =item * B<ScheduleLambdaFunction>: schedules a AWS Lambda function.
89              
90             =item * B<SignalExternalWorkflowExecution>: requests a signal to be
91             delivered to the specified external workflow execution and records a
92             C<SignalExternalWorkflowExecutionInitiated> event in the history.
93              
94             =item * B<StartChildWorkflowExecution>: requests that a child workflow
95             execution be started and records a
96             C<StartChildWorkflowExecutionInitiated> event in the history. The child
97             workflow execution is a separate workflow execution with its own
98             history.
99              
100             =item * B<StartTimer>: starts a timer for this workflow execution and
101             records a C<TimerStarted> event in the history. This timer will fire
102             after the specified delay and record a C<TimerFired> event.
103              
104             =back
105              
106             B<Access Control>
107              
108             If you grant permission to use C<RespondDecisionTaskCompleted>, you can
109             use IAM policies to express permissions for the list of decisions
110             returned by this action as if they were members of the API. Treating
111             decisions as a pseudo API maintains a uniform conceptual model and
112             helps keep policies readable. For details and example IAM policies, see
113             Using IAM to Manage Access to Amazon SWF Workflows.
114              
115             B<Decision Failure>
116              
117             Decisions can fail for several reasons
118              
119             =over
120              
121             =item * The ordering of decisions should follow a logical flow. Some
122             decisions might not make sense in the current context of the workflow
123             execution and will therefore fail.
124              
125             =item * A limit on your account was reached.
126              
127             =item * The decision lacks sufficient permissions.
128              
129             =back
130              
131             One of the following events might be added to the history to indicate
132             an error. The event attribute's B<cause> parameter indicates the cause.
133             If B<cause> is set to OPERATION_NOT_PERMITTED, the decision failed
134             because it lacked sufficient permissions. For details and example IAM
135             policies, see Using IAM to Manage Access to Amazon SWF Workflows.
136              
137             =over
138              
139             =item * B<ScheduleActivityTaskFailed>: a ScheduleActivityTask decision
140             failed. This could happen if the activity type specified in the
141             decision is not registered, is in a deprecated state, or the decision
142             is not properly configured.
143              
144             =item * B<ScheduleLambdaFunctionFailed>: a ScheduleLambdaFunctionFailed
145             decision failed. This could happen if the AWS Lambda function specified
146             in the decision does not exist, or the AWS Lambda service's limits are
147             exceeded.
148              
149             =item * B<RequestCancelActivityTaskFailed>: a RequestCancelActivityTask
150             decision failed. This could happen if there is no open activity task
151             with the specified activityId.
152              
153             =item * B<StartTimerFailed>: a StartTimer decision failed. This could
154             happen if there is another open timer with the same timerId.
155              
156             =item * B<CancelTimerFailed>: a CancelTimer decision failed. This could
157             happen if there is no open timer with the specified timerId.
158              
159             =item * B<StartChildWorkflowExecutionFailed>: a
160             StartChildWorkflowExecution decision failed. This could happen if the
161             workflow type specified is not registered, is deprecated, or the
162             decision is not properly configured.
163              
164             =item * B<SignalExternalWorkflowExecutionFailed>: a
165             SignalExternalWorkflowExecution decision failed. This could happen if
166             the C<workflowID> specified in the decision was incorrect.
167              
168             =item * B<RequestCancelExternalWorkflowExecutionFailed>: a
169             RequestCancelExternalWorkflowExecution decision failed. This could
170             happen if the C<workflowID> specified in the decision was incorrect.
171              
172             =item * B<CancelWorkflowExecutionFailed>: a CancelWorkflowExecution
173             decision failed. This could happen if there is an unhandled decision
174             task pending in the workflow execution.
175              
176             =item * B<CompleteWorkflowExecutionFailed>: a CompleteWorkflowExecution
177             decision failed. This could happen if there is an unhandled decision
178             task pending in the workflow execution.
179              
180             =item * B<ContinueAsNewWorkflowExecutionFailed>: a
181             ContinueAsNewWorkflowExecution decision failed. This could happen if
182             there is an unhandled decision task pending in the workflow execution
183             or the ContinueAsNewWorkflowExecution decision was not configured
184             correctly.
185              
186             =item * B<FailWorkflowExecutionFailed>: a FailWorkflowExecution
187             decision failed. This could happen if there is an unhandled decision
188             task pending in the workflow execution.
189              
190             =back
191              
192             The preceding error events might occur due to an error in the decider
193             logic, which might put the workflow execution in an unstable state The
194             cause field in the event structure for the error event indicates the
195             cause of the error.
196              
197             A workflow execution may be closed by the decider by returning one of
198             the following decisions when completing a decision task:
199             C<CompleteWorkflowExecution>, C<FailWorkflowExecution>,
200             C<CancelWorkflowExecution> and C<ContinueAsNewWorkflowExecution>. An
201             UnhandledDecision fault will be returned if a workflow closing decision
202             is specified and a signal or activity event had been added to the
203             history while the decision task was being performed by the decider.
204             Unlike the above situations which are logic issues, this fault is
205             always possible because of race conditions in a distributed system. The
206             right action here is to call RespondDecisionTaskCompleted without any
207             decisions. This would result in another decision task with these new
208             events included in the history. The decider should handle the new
209             events and may decide to close the workflow execution.
210              
211             B<How to code a decision>
212              
213             You code a decision by first setting the decision type field to one of
214             the above decision values, and then set the corresponding attributes
215             field shown below:
216              
217             =over
218              
219             =item * ScheduleActivityTaskDecisionAttributes
220              
221             =item * ScheduleLambdaFunctionDecisionAttributes
222              
223             =item * RequestCancelActivityTaskDecisionAttributes
224              
225             =item * CompleteWorkflowExecutionDecisionAttributes
226              
227             =item * FailWorkflowExecutionDecisionAttributes
228              
229             =item * CancelWorkflowExecutionDecisionAttributes
230              
231             =item * ContinueAsNewWorkflowExecutionDecisionAttributes
232              
233             =item * RecordMarkerDecisionAttributes
234              
235             =item * StartTimerDecisionAttributes
236              
237             =item * CancelTimerDecisionAttributes
238              
239             =item * SignalExternalWorkflowExecutionDecisionAttributes
240              
241             =item * RequestCancelExternalWorkflowExecutionDecisionAttributes
242              
243             =item * StartChildWorkflowExecutionDecisionAttributes
244              
245             =back
246              
247              
248             =head1 ATTRIBUTES
249              
250              
251             =head2 CancelTimerDecisionAttributes => L<Paws::SimpleWorkflow::CancelTimerDecisionAttributes>
252              
253             Provides details of the C<CancelTimer> decision. It is not set for
254             other decision types.
255              
256              
257             =head2 CancelWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::CancelWorkflowExecutionDecisionAttributes>
258              
259             Provides details of the C<CancelWorkflowExecution> decision. It is not
260             set for other decision types.
261              
262              
263             =head2 CompleteWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::CompleteWorkflowExecutionDecisionAttributes>
264              
265             Provides details of the C<CompleteWorkflowExecution> decision. It is
266             not set for other decision types.
267              
268              
269             =head2 ContinueAsNewWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::ContinueAsNewWorkflowExecutionDecisionAttributes>
270              
271             Provides details of the C<ContinueAsNewWorkflowExecution> decision. It
272             is not set for other decision types.
273              
274              
275             =head2 B<REQUIRED> DecisionType => Str
276              
277             Specifies the type of the decision.
278              
279              
280             =head2 FailWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::FailWorkflowExecutionDecisionAttributes>
281              
282             Provides details of the C<FailWorkflowExecution> decision. It is not
283             set for other decision types.
284              
285              
286             =head2 RecordMarkerDecisionAttributes => L<Paws::SimpleWorkflow::RecordMarkerDecisionAttributes>
287              
288             Provides details of the C<RecordMarker> decision. It is not set for
289             other decision types.
290              
291              
292             =head2 RequestCancelActivityTaskDecisionAttributes => L<Paws::SimpleWorkflow::RequestCancelActivityTaskDecisionAttributes>
293              
294             Provides details of the C<RequestCancelActivityTask> decision. It is
295             not set for other decision types.
296              
297              
298             =head2 RequestCancelExternalWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::RequestCancelExternalWorkflowExecutionDecisionAttributes>
299              
300             Provides details of the C<RequestCancelExternalWorkflowExecution>
301             decision. It is not set for other decision types.
302              
303              
304             =head2 ScheduleActivityTaskDecisionAttributes => L<Paws::SimpleWorkflow::ScheduleActivityTaskDecisionAttributes>
305              
306             Provides details of the C<ScheduleActivityTask> decision. It is not set
307             for other decision types.
308              
309              
310             =head2 ScheduleLambdaFunctionDecisionAttributes => L<Paws::SimpleWorkflow::ScheduleLambdaFunctionDecisionAttributes>
311              
312            
313              
314              
315             =head2 SignalExternalWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::SignalExternalWorkflowExecutionDecisionAttributes>
316              
317             Provides details of the C<SignalExternalWorkflowExecution> decision. It
318             is not set for other decision types.
319              
320              
321             =head2 StartChildWorkflowExecutionDecisionAttributes => L<Paws::SimpleWorkflow::StartChildWorkflowExecutionDecisionAttributes>
322              
323             Provides details of the C<StartChildWorkflowExecution> decision. It is
324             not set for other decision types.
325              
326              
327             =head2 StartTimerDecisionAttributes => L<Paws::SimpleWorkflow::StartTimerDecisionAttributes>
328              
329             Provides details of the C<StartTimer> decision. It is not set for other
330             decision types.
331              
332              
333              
334             =head1 SEE ALSO
335              
336             This class forms part of L<Paws>, describing an object used in L<Paws::SimpleWorkflow>
337              
338             =head1 BUGS and CONTRIBUTIONS
339              
340             The source code is located here: https://github.com/pplu/aws-sdk-perl
341              
342             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
343              
344             =cut
345