From the course: AWS for Developers: SNS, SQS, and SWF
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
SWF deciders - Amazon Web Services (AWS) Tutorial
From the course: AWS for Developers: SNS, SQS, and SWF
SWF deciders
- [Instructor] Copy up to the server the file EnrollmentDecider.php. The first thing our decider does is poll for a decision task, and you can see how this lines up with step three in the AWS docs. The response from poll decision task will include a JSON object with an array of history events for this workflow execution. This events array will match the data you see in the SWF Console on the events tab, and the array is sorted so that the newest events will appear at the top. Our decider will loop over the event history for this workflow execution, and whenever it sees the event type matching activity task completed, it'll look at the returned result from the worker, and then decide the next course of action. Now we don't have any activity task completed events yet because the workflow just started, so it's just going to drop out of this loop, and just do the default action. If it didn't find activity tasks…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Create a SWF domain57s
-
(Locked)
Create an SWF workflow1m 56s
-
(Locked)
Create a SWF activity type2m 43s
-
(Locked)
Start a workflow execution4m 7s
-
(Locked)
SWF deciders2m 41s
-
(Locked)
SWF workers in PHP3m 54s
-
(Locked)
Testing the workflow3m 47s
-
(Locked)
Challenge: Create a new activity39s
-
(Locked)
Solution: Create a new activity1m 18s
-
(Locked)
-