1
00:00:00,090 --> 00:00:07,260
In this video, we are going to create a lower state machine in a step function with using a measurement

2
00:00:07,260 --> 00:00:09,100
console for that purpose.

3
00:00:09,120 --> 00:00:13,530
Please open the machine console and go to a list of functions.

4
00:00:13,650 --> 00:00:17,220
So see that this is the beginning page of the step function.

5
00:00:17,490 --> 00:00:20,680
Step functions is performing business critical applications.

6
00:00:20,700 --> 00:00:26,520
Step function is a serverless function orchestrator that makes it easy to sequence a lambda functions

7
00:00:26,520 --> 00:00:30,390
and multiple sources into business critical applications.

8
00:00:30,690 --> 00:00:37,260
So through the visual interface, we can create and run sets of the check point and event driven workflows

9
00:00:37,260 --> 00:00:39,190
that maintain the application state.

10
00:00:39,210 --> 00:00:42,080
If you scroll down, you can see the how it works.

11
00:00:42,090 --> 00:00:44,730
This is very good illustration and explanation.

12
00:00:44,730 --> 00:00:50,310
The first step is we can define our visual workflow in workflow studio and the console.

13
00:00:50,490 --> 00:00:52,710
It will also generate the code for us.

14
00:00:52,710 --> 00:00:58,620
We can also code it ourself using the code snippet in the console or locally with images to decode.

15
00:00:58,710 --> 00:01:04,710
And the second step is specify the resources, for example, Lambda Function says topic and so on,

16
00:01:04,710 --> 00:01:07,200
that we want to trigger our workflow.

17
00:01:07,350 --> 00:01:13,920
And the third step is start an execution to visualize and verify that the steps of our workflow are

18
00:01:13,920 --> 00:01:15,810
executing expected.

19
00:01:15,810 --> 00:01:19,620
So if you scroll down, you can see the benefits and the features.

20
00:01:19,650 --> 00:01:22,350
These are the elements that we are talking about.

21
00:01:22,350 --> 00:01:26,130
And if you scroll down you can see the use cases, the latest services and so on.

22
00:01:26,370 --> 00:01:29,670
Please go on top of this page and click to get started.

23
00:01:29,670 --> 00:01:32,820
This will be run a helloworld example workflow.

24
00:01:32,850 --> 00:01:39,810
In our case, please click to get started and see that we can review the Helloworld example.

25
00:01:39,810 --> 00:01:43,620
This becomes a create a new state machine and this is the predefined state machine.

26
00:01:43,620 --> 00:01:50,340
For the Helloworld example, you can see that there is a state language and also visual representation

27
00:01:50,340 --> 00:01:50,940
in here.

28
00:01:50,970 --> 00:01:51,960
This is the example.

29
00:01:51,960 --> 00:01:57,000
Workflow is reader only and after creation we can edit it visually or encode.

30
00:01:57,000 --> 00:01:59,400
So this is the code bar, this is the visual part.

31
00:01:59,400 --> 00:02:03,960
And basically you can see that it is a start point and this is the test task.

32
00:02:04,150 --> 00:02:07,740
Helloworld example there is a boolean task, yes or no?

33
00:02:07,950 --> 00:02:10,650
Yes, we can wait 3 seconds and write helloworld.

34
00:02:10,680 --> 00:02:12,270
If no, we can go to end.

35
00:02:12,270 --> 00:02:18,600
And this is the R code, Amazon language, state language that we can use in a JSON format and edit

36
00:02:18,600 --> 00:02:19,530
from the format.

37
00:02:19,530 --> 00:02:20,760
So this is step one.

38
00:02:20,760 --> 00:02:26,460
And if you scroll down and click next button, we can give the state machine name and if you scroll

39
00:02:26,460 --> 00:02:28,730
down, you can give the required execution rules.

40
00:02:28,740 --> 00:02:31,440
We are going to create a new role for our step function.

41
00:02:31,440 --> 00:02:34,200
We can enable local tracing and so on.

42
00:02:34,320 --> 00:02:37,500
Just click the create submission by default settings.

43
00:02:37,500 --> 00:02:42,900
We can see that the our state mission is create successfully and immediately.

44
00:02:42,900 --> 00:02:45,540
They are asking to start an execution.

45
00:02:45,540 --> 00:02:51,990
This is the name of the execution and is the input which is the recording is helloworld example attribute

46
00:02:51,990 --> 00:02:54,060
and it is basically true or false.

47
00:02:54,060 --> 00:03:00,300
So we would like to give the true these attribute value so you can just click the start execution in

48
00:03:00,300 --> 00:03:03,240
order to call and invoke our step functions.

49
00:03:03,270 --> 00:03:09,390
After correct start execution, this will be start an execution and you can see the details, execution,

50
00:03:09,390 --> 00:03:11,400
input, output and definition.

51
00:03:11,400 --> 00:03:15,720
You just executed a sample workflow and now design our workflow.

52
00:03:15,750 --> 00:03:16,860
We can scroll down.

53
00:03:16,860 --> 00:03:24,270
You can see that this is the graphical representation, that our workflow works and goes these steps.

54
00:03:24,270 --> 00:03:26,910
So that means we are passing the Helloworld example.

55
00:03:26,910 --> 00:03:27,180
Yes.

56
00:03:27,180 --> 00:03:29,340
So that's why it goes to Yes.

57
00:03:29,340 --> 00:03:35,010
Flow and comes from this end statement with following the Green Pass.

58
00:03:35,100 --> 00:03:36,570
Okay, very good.

59
00:03:36,570 --> 00:03:40,170
So in here you can see that in the details.

60
00:03:40,170 --> 00:03:45,330
You can click the pass button and you can see the step input and output is you remember that we are

61
00:03:45,330 --> 00:03:47,880
passing the is helloworld attribute, which is true.

62
00:03:47,910 --> 00:03:54,120
We can see that these value comes to the task and output the same value from the test task.

63
00:03:54,120 --> 00:04:00,540
And if you come here, the second step is the our helloworld example step input and output following

64
00:04:00,540 --> 00:04:01,740
the same parameters.

65
00:04:01,740 --> 00:04:06,780
But you can extend these parameters for our use cases, but you got the idea.

66
00:04:06,780 --> 00:04:13,800
All task is input and output step that you can paste the values and variables from one to another.

67
00:04:13,800 --> 00:04:15,250
Task State okay.

68
00:04:15,270 --> 00:04:19,110
If you scroll down, you can see the execution event history.

69
00:04:19,110 --> 00:04:26,550
So that is almost a cloud which looks you can see the every step that is passing and running in our

70
00:04:26,550 --> 00:04:27,240
workflow.

71
00:04:27,270 --> 00:04:33,660
If you expand these steps history, you can see the input and output parameters more detailed.

72
00:04:33,660 --> 00:04:39,210
We can see that we are in a choice state and in the choice that we passed the Helloworld example, yes,

73
00:04:39,210 --> 00:04:41,610
this is the input and input data is in here.

74
00:04:41,610 --> 00:04:48,210
So advice it is goes and direct to these Helloworld example yes state yes workflow.

75
00:04:48,240 --> 00:04:49,890
Here you can see the execution role.

76
00:04:49,890 --> 00:04:52,740
If you scroll up, you can see other details.

77
00:04:52,740 --> 00:04:58,860
Execution input, execution output and definition definition is a state language and you can see the

78
00:04:58,860 --> 00:04:59,880
details and so on.

79
00:05:00,220 --> 00:05:06,610
So basically we can edit our state machine with clicking the edit state machine and change some of the

80
00:05:06,610 --> 00:05:07,000
codes.

81
00:05:07,000 --> 00:05:07,420
Order.

82
00:05:07,420 --> 00:05:10,920
Visualize our state workflow in here.

83
00:05:10,930 --> 00:05:13,080
But now I'm not going to change anything.

84
00:05:13,090 --> 00:05:18,550
If you come back to our step function, you can see the our lower step function and see that we have

85
00:05:18,550 --> 00:05:19,990
only one execution.

86
00:05:19,990 --> 00:05:21,680
And these are the other details.

87
00:05:21,700 --> 00:05:27,580
If you click the execution, you can see see all details about the execution and event history in this

88
00:05:27,580 --> 00:05:28,090
window.

89
00:05:28,210 --> 00:05:30,220
Now, let me start an execution.

90
00:05:30,220 --> 00:05:35,010
If you come on top of this page, in the execution page, you can click the execution.

91
00:05:35,020 --> 00:05:38,650
This time I would like to send is a level example as a false.

92
00:05:38,650 --> 00:05:45,940
So if you send a false and start execution, we will see that this time this will be close to false

93
00:05:45,940 --> 00:05:46,780
and no part.

94
00:05:46,780 --> 00:05:54,220
You can see that the workflow is following the Helloworld example and the no part and directly goes

95
00:05:54,220 --> 00:05:55,870
to end of the workflow.

96
00:05:55,870 --> 00:06:02,290
And if you click this task, you can see the step input as a false and output also false and you can

97
00:06:02,290 --> 00:06:05,020
see the no is a step input as a false.

98
00:06:05,020 --> 00:06:08,170
And this is the end of the our operation.

99
00:06:08,170 --> 00:06:15,400
And failing this end state, if you scroll down, you can see the all steps that we are going to process

100
00:06:15,400 --> 00:06:17,590
during the workflow execution.

101
00:06:17,590 --> 00:06:20,800
You can see that we are sending the false is a load example.

102
00:06:20,800 --> 00:06:27,700
So that's why it goes to failed state and in the failed state because the end of the workflow OC as

103
00:06:27,700 --> 00:06:33,430
you can see that we have created Helloworld state machine in the step function and start an execution

104
00:06:33,430 --> 00:06:35,350
with using the measurement console.
