Hi and welcome back.
Now, in today's video, we will be discussing about this simple workflow service.
Now, before we go ahead and discuss more about it, first, it is important for us to understand what
exactly this workflow means.
So let's go ahead and understand more about.
So a high level overview of workflow is a sequence of tasks that processes a set of data or in a different
way of workflow is a set of activities that carry out some specific objective.
For example, let's say that you have an e-commerce system where users can go ahead and log in and purchase
some products.
Now, in the overall workflow in which a product can be purchased online, there are multiple different
steps that needs to be achieved.
For example, let's see first, the order needs to be verified, then the payment needs to be made,
then the shipment takes place, then the record completion process happens after the order is shipped,
and then the entire objective is completed.
So this is referred to as a workflow.
Now do note that for each stage in the workflow, there can be a different system that can perform the
objective.
For example, for verifying the orders.
There can be a certain applications in a different called the order verifies that will take care of
this.
Then again, there will be a credit card processes that will take care of the payment processing.
Then for shipment of orders again, you will need a warehouse employees that will take care of that.
So it spit in overflow can be taken care by individual system or different systems altogether.
And the workflow not only involves a set of systems, but it also involves a set of humans.
So humans place systems to perform a set of activities for a specific objective you can refer to as
a workflow.
Now that we understand what a workflow means at a high level overview.
Let's go ahead and understand what a simple workflow service refers to.
So a simple workflow service also referred to as Amazon is W.
It makes it easy to build applications that coordinate work across various distributed components.
Now, as we're discussing that in a specific workflow, there can be various distributed components
that can be involved.
Order verified application can mean a different region or a different server's credit card processor
application can be in a different region or a different servers as well.
So everything is distributed.
So in order for all of these to be connected as part of your workflow, you can make use of the Amazon
Simple Workflow Service.
So let's go ahead and understand this.
With this simple example, let's say that you have a simple application.
What it does, it converts the lower hello world to a specific format where the start character is capitalized.
So Helloworld is capitalized to capital H, hello and capital W void.
So this again is a specific workflow.
Now this workflow involves three different type of activities.
So first one is the start state.
Then you have the finish state.
You have first to open the rest to load and concatenate.
Now, if you're looking to it in more detail, you will see that once this specific string of message
is received from a customer, there are three different activities that we were discussing.
Now each activity will have its own separate code.
So if you are designing something in a simple workflow, so this you need to have a programming code,
right?
So for us to operate this will have its own code rate to lower will have its own code and concatenate
again, will have its own code.
So all of these will be integrated together in a simple workflow service in a manner that once this
thing of hello world is received into the simple workflow service, it being the user will get the payload
as the output and the necessary connection between this is taken care of by this single workflow service.
Again, it depends upon how the developer has designed the overall simple workflow service.
So this is a very high level overview.
Let's quickly look into it in a practical point of view.
So currently I am logged in to my editor this account.
Let's quickly open up the simple workflow service here.
Correct.
So this is how today's world really looks like.
Now, one thing that we can do is we can go ahead and run a sample workflow that it automatically provides.
So if we look into the sample workflow, you have activity of download image.
So what exactly this does?
It downloads a specific image.
So before we go ahead and discuss more towards it, let's look into what this workflow does.
This workflow takes the image and it can convert the image into either sepia.
Lot of Greece, depending upon what you need.
And once you select this option, it goes ahead and uploads the image to a specific stable.
Get a very simple what if?
So let's go ahead and quickly get started.
I do mean let's just call it a sample workflow.
Let's do a continue nudging.
You might not really have to implement it to understand it.
You can just look into the demo.
It will give you an understanding on how exactly it works.
So if we look over here, this specific workflow has a specific set of activities.
So first one is S3 downloads.
So it will go ahead and download a specific image.
Then you have either two activities colors, sepia transforming, grayscale transform.
Depending upon what transformation do you need on this specific image, one of these activities will
run and then you have the S3 upload activity, which is good, and upload the transformed image to S3
bucket only.
So let's quickly do a continue.
Now it is basically asking to deploy the code in a specific resource.
So let's say that we need to EC2 instance where this transformation really takes place and you can also
see terminate EC2 instance in a specific duration.
And this is fine, let's keep it simple.
I'll click on Continue.
So now what this will do is WS will go ahead and provisioning easy to instance with the sample code
that we have used.
So from a different tab if you will see a new easy to instance is been created over here.
So this is one of the first step.
Only after the easy do instance gets created will be able to decide whether we want the image to be
converted to a specific format.
So let's quickly wait for this specific stage to be completed.
All right.
So it has been around 3 to 4 minutes and easy, to instance, is currently deployed and running.
So let's quickly do a continue.
Now, the next step is to run an execution of this specific workflow.
Now, within this workflow, if you see you have a transformation, so you can select a transformation,
but either convert to a specific format or convert to a different specific format.
So let's see that I want to convert the image to grayscale.
And you can also specify the workflow execution idea.
Let's call it a00 saving I right now, once you do this, you can go ahead and run this specific execution.
So what it will do, it will take the image, which is a sample image, and it will transform that image
to a grayscale.
And then it can also upload that image to a specific S3 bucket that we defined.
So under your bucket you can specify which is three bucket.
You want to upload the image too.
So let me go ahead and select a S3 bucket here.
Now, there are multiple buckets there that are really well, let me just select a random bucket that
we have available.
And this is the bucket where the image will be uploaded to once done.
You can go ahead and run this specific execution.
Now, one important part to note is that as we were discussing that in a specific workflow execution,
so this entire process is referred to as a workflow execution.
Each activity will have its own set of separate code database.
How will is the blue if, nor on how to convert the image to grayscale?
And after conversion of that image to grayscale, how exactly to upload that image to S3 bucket.
So a code has to be defined.
So this since this is a simple workflow, the code is already provided by the E.W. scheme and you can
also go ahead and download the code and you can study on how exactly this works.
So let's quickly go to the console over here and if we look into the domain, so this is the sample
domain, which is the sample workflow that we had defined and in the completed it states one.
So ideally what would happen is that the S3 bucket that we had selected, that S3 bucket should have
a new grayscale image.
So let's verify that.
So let's quickly open up the S3 bucket over here.
And this is the S3 bucket that we had defined.
Let's quickly open this up.
And if you can see this is the bucket has one new object.
So this is basically the image that was converted to grayscale.
So you see the type is BNZ.
So let's go ahead and download this image.
Let's open this up and you see a sample image is now converted to grayscale grid.
So I hope at this stage you understood what at a high level overview, a simple workflow service does.
Now a few more things I wanted to show you.
If you look into the workflow execution us, select the execution status as closed and let's click on
list executions audio.
So that was one what flavor the kitchen with the idea of 007 that was completed and if you'll quickly
open this up under the activity.
You see that there are certain activities that had taken place.
First one is the S3 download.
Now, as you're discussing at each stage of the activities, there is a different goal that we have
to applaud.
So you need to have a specific programming goal that does that specific activity.
So first, the other is three download.
So this will have its own code which will download a specific image.
Then you have the greyscale transform degree, transform that specific image into greyscale.
It will then go ahead and upload that image and then it will also go ahead and delete it from the local
file.
So these are referred to as the set of activities in a specific workflow.
So this is the that data workflow.
In this there are certain set of activities like for us to operate to lower concatenate and so on.
And similarly here you have a specific workflow which has a set of activities.
Once this activity takes place, your objective is completed.
What is their objective?
Your objective is to convert the image to grayscale, upload it to a stream bucket, and then the workflow
ends.
Similarly, there can be any number of workflows that you can go ahead and design and integrate it as
part of the Simple Workflow Service and is the blue, if I can go ahead and take it of the inkjet execution
here.
So this is a very high level overview about the simple workflow service in aid of this.