What is the Workflows: Dapr in Action - Ep. 10
0 views
Aug 6, 2025
In this episode, you will understand what the workflow is, what are some of its concrete component implementations and how you can use it in your own applications. 📺 CSharp TV - Dev Streaming Destination http://csharp.tv 🌎 C# Corner - Community of Software and Data Developers https://www.c-sharpcorner.com #CSharpTV #csharpcorner #Dapr #LiveShow
View Video Transcript
0:05
[Music]
0:13
[Music]
0:33
hi friends this is now another episode
0:35
hi friends this is now another episode
0:35
hi friends this is now another episode of the Dapper in action series my name
0:38
of the Dapper in action series my name
0:38
of the Dapper in action series my name is
0:38
is
0:39
is Rodrigo and
0:41
Rodrigo and
0:41
Rodrigo and today we're GNA see the workflows
0:44
today we're GNA see the workflows
0:44
today we're GNA see the workflows building
0:45
building
0:45
building block so this is helpful when you are
0:50
block so this is helpful when you are
0:50
block so this is helpful when you are trying to execute long running
0:54
trying to execute long running
0:54
trying to execute long running processes um actually if you happen to
0:57
processes um actually if you happen to
0:57
processes um actually if you happen to be an aure functions developer
1:01
be an aure functions developer
1:01
be an aure functions developer this workflows component is actually
1:05
this workflows component is actually
1:05
this workflows component is actually very similar to the one that we use in a
1:07
very similar to the one that we use in a
1:07
very similar to the one that we use in a durable
1:08
durable
1:08
durable functions um in other words you can
1:11
functions um in other words you can
1:11
functions um in other words you can transfer your existing
1:13
transfer your existing
1:13
transfer your existing knowledge and aure durable functions and
1:18
knowledge and aure durable functions and
1:18
knowledge and aure durable functions and build long running processes in Dapper
1:22
build long running processes in Dapper
1:22
build long running processes in Dapper by using this um building block remember
1:26
by using this um building block remember
1:26
by using this um building block remember I use component and building block
1:28
I use component and building block
1:28
I use component and building block interchangeably sometimes s but I'm
1:31
interchangeably sometimes s but I'm
1:31
interchangeably sometimes s but I'm referring to the feature that allows us
1:33
referring to the feature that allows us
1:33
referring to the feature that allows us to execute long running processes here
1:37
to execute long running processes here
1:37
to execute long running processes here in
1:38
in
1:38
in Dapper so that is actually what I'm
1:40
Dapper so that is actually what I'm
1:40
Dapper so that is actually what I'm going to do today um I'm going to show
1:44
going to do today um I'm going to show
1:44
going to do today um I'm going to show you the workflow documentation you can
1:49
you the workflow documentation you can
1:49
you the workflow documentation you can navigate to dogs.
1:52
navigate to dogs.
1:52
navigate to dogs. doer. and then find the workflow
1:56
doer. and then find the workflow
1:56
doer. and then find the workflow overview and there you can find of
2:00
overview and there you can find of
2:00
overview and there you can find of course all the existing documentation
2:03
course all the existing documentation
2:03
course all the existing documentation about this fantastic uh building
2:07
about this fantastic uh building
2:07
about this fantastic uh building block so what are uh some of the use
2:11
block so what are uh some of the use
2:11
block so what are uh some of the use cases for executing
2:14
cases for executing
2:14
cases for executing workflows um I don't know maybe you are
2:16
workflows um I don't know maybe you are
2:16
workflows um I don't know maybe you are processing data maybe you are uh you
2:19
processing data maybe you are uh you
2:19
processing data maybe you are uh you have this uh process in your business or
2:24
have this uh process in your business or
2:24
have this uh process in your business or company that is required to execute
2:27
company that is required to execute
2:27
company that is required to execute different services so instead of uh
2:31
different services so instead of uh
2:31
different services so instead of uh calling each
2:33
calling each
2:33
calling each service
2:34
service
2:34
service separately and
2:36
separately and
2:37
separately and synchronously you can always create this
2:39
synchronously you can always create this
2:39
synchronously you can always create this kind of uh objects in your
2:44
kind of uh objects in your
2:44
kind of uh objects in your application and other use cases I don't
2:48
application and other use cases I don't
2:48
application and other use cases I don't know maybe you want to create a report
2:50
know maybe you want to create a report
2:50
know maybe you want to create a report or you want to process data or you want
2:53
or you want to process data or you want
2:53
or you want to process data or you want to even you want to create agentic um
2:58
to even you want to create agentic um
2:58
to even you want to create agentic um applications right by using a large
3:01
applications right by using a large
3:01
applications right by using a large language model and so on you can
3:05
language model and so on you can
3:05
language model and so on you can Implement those capabilities by using
3:08
Implement those capabilities by using
3:08
Implement those capabilities by using the workflow building
3:11
the workflow building
3:11
the workflow building block so it's important to highlight the
3:16
block so it's important to highlight the
3:16
block so it's important to highlight the different patterns that you can
3:17
different patterns that you can
3:17
different patterns that you can Implement by using this uh
3:21
Implement by using this uh
3:21
Implement by using this uh feature this is actually the one that
3:24
feature this is actually the one that
3:24
feature this is actually the one that I'm going to use today task chaining or
3:26
I'm going to use today task chaining or
3:26
I'm going to use today task chaining or activity chaining meaning that you can
3:30
activity chaining meaning that you can
3:30
activity chaining meaning that you can execute an activity say a process and
3:34
execute an activity say a process and
3:34
execute an activity say a process and then you wait for the response and then
3:36
then you wait for the response and then
3:36
then you wait for the response and then you use that output as the input for
3:39
you use that output as the input for
3:39
you use that output as the input for other activity and so on but of course
3:43
other activity and so on but of course
3:43
other activity and so on but of course there are other patterns such as the fan
3:46
there are other patterns such as the fan
3:46
there are other patterns such as the fan out fan in this is when you want to
3:48
out fan in this is when you want to
3:48
out fan in this is when you want to execute different things at the same
3:50
execute different things at the same
3:50
execute different things at the same time in parallel um eing HTTP apis if
3:55
time in parallel um eing HTTP apis if
3:55
time in parallel um eing HTTP apis if you want to call um maybe you want you
3:58
you want to call um maybe you want you
3:59
you want to call um maybe you want you want to call and external apis and
4:02
want to call and external apis and
4:02
want to call and external apis and monitor as well and some others um as I
4:06
monitor as well and some others um as I
4:06
monitor as well and some others um as I was mentioning before this is very
4:08
was mentioning before this is very
4:08
was mentioning before this is very similar to the ones that we use in
4:10
similar to the ones that we use in
4:10
similar to the ones that we use in durable
4:11
durable
4:11
durable functions so we have function chaining
4:14
functions so we have function chaining
4:14
functions so we have function chaining this is the task chaining that I was
4:16
this is the task chaining that I was
4:16
this is the task chaining that I was talking about and fan out find in Asing
4:20
talking about and fan out find in Asing
4:20
talking about and fan out find in Asing HTTP API so you can easily see how you
4:24
HTTP API so you can easily see how you
4:24
HTTP API so you can easily see how you can transfer your existing knowledge to
4:28
can transfer your existing knowledge to
4:28
can transfer your existing knowledge to Dapper perfect so so let's Jump Right In
4:31
Dapper perfect so so let's Jump Right In
4:31
Dapper perfect so so let's Jump Right In let's create a new
4:33
let's create a new
4:33
let's create a new application my intention here is to
4:36
application my intention here is to
4:36
application my intention here is to create a
4:37
create a
4:37
create a workflow initially with a
4:40
workflow initially with a
4:40
workflow initially with a single activity I want to make it simple
4:44
single activity I want to make it simple
4:44
single activity I want to make it simple to understand and then we can add
4:46
to understand and then we can add
4:46
to understand and then we can add additional
4:48
additional
4:48
additional activities and let's see how it goes
4:51
activities and let's see how it goes
4:51
activities and let's see how it goes okay so first you have this existing
4:57
okay so first you have this existing
4:57
okay so first you have this existing folder this is actually empty right now
5:00
folder this is actually empty right now
5:00
folder this is actually empty right now so let's create a new web API regular
5:03
so let's create a new web API regular
5:03
so let's create a new web API regular stuff doaction dot let's name it I don't
5:08
stuff doaction dot let's name it I don't
5:08
stuff doaction dot let's name it I don't know
5:09
know
5:09
know workflows workflow
5:11
workflows workflow
5:11
workflows workflow service right and use
5:15
service right and use
5:15
service right and use controllers just a regular web
5:18
controllers just a regular web
5:18
controllers just a regular web API and this is the project where I'm
5:22
API and this is the project where I'm
5:22
API and this is the project where I'm gonna add the workflows
5:25
gonna add the workflows
5:25
gonna add the workflows SDK which happens to be a different SDK
5:29
SDK which happens to be a different SDK
5:29
SDK which happens to be a different SDK so I'm not want going to uh reference
5:32
so I'm not want going to uh reference
5:32
so I'm not want going to uh reference Dapper aspet core but instead Dapper
5:37
Dapper aspet core but instead Dapper
5:37
Dapper aspet core but instead Dapper workflow so let's do this um before I go
5:42
workflow so let's do this um before I go
5:42
workflow so let's do this um before I go further let's create another
5:45
further let's create another
5:45
further let's create another one uh let's name it service
5:48
one uh let's name it service
5:48
one uh let's name it service a so I have two projects let's create a
5:52
a so I have two projects let's create a
5:52
a so I have two projects let's create a new
5:53
new
5:53
new solution do new solution and doer action
5:58
solution do new solution and doer action
5:58
solution do new solution and doer action workflows
6:00
workflows
6:00
workflows oh workflows with the correct spelling
6:04
oh workflows with the correct spelling
6:05
oh workflows with the correct spelling and let's
6:06
and let's
6:06
and let's remove this one this one okay cool and
6:09
remove this one this one okay cool and
6:09
remove this one this one okay cool and then Net Solution add service a
6:14
then Net Solution add service a
6:14
then Net Solution add service a and the other one which is workflow
6:17
and the other one which is workflow
6:17
and the other one which is workflow service right so doer inaction workflows
6:21
service right so doer inaction workflows
6:21
service right so doer inaction workflows dos sln this is the one that I want to
6:25
dos sln this is the one that I want to
6:25
dos sln this is the one that I want to you know open here in Visual Studio but
6:28
you know open here in Visual Studio but
6:28
you know open here in Visual Studio but of course you can follow the same code
6:30
of course you can follow the same code
6:30
of course you can follow the same code by using visual studio code if you
6:32
by using visual studio code if you
6:32
by using visual studio code if you happen to love Visual Studio code more
6:36
happen to love Visual Studio code more
6:36
happen to love Visual Studio code more than 2022 which is not my my case I
6:41
than 2022 which is not my my case I
6:41
than 2022 which is not my my case I truly love uh
6:45
truly love uh
6:45
truly love uh 2022 so yeah this is a regular template
6:49
2022 so yeah this is a regular template
6:49
2022 so yeah this is a regular template we have that weather forecast
6:51
we have that weather forecast
6:51
we have that weather forecast thingy um so here let's add a new nug
6:57
thingy um so here let's add a new nug
6:57
thingy um so here let's add a new nug package and let's search
7:00
package and let's search
7:00
package and let's search for doer. workflow this is the name
7:04
for doer. workflow this is the name
7:04
for doer. workflow this is the name okay at the time of this recording the
7:07
okay at the time of this recording the
7:07
okay at the time of this recording the latest one is 1.14 as you can see here
7:10
latest one is 1.14 as you can see here
7:11
latest one is 1.14 as you can see here on the screen but of course the Dapper
7:13
on the screen but of course the Dapper
7:13
on the screen but of course the Dapper team is
7:15
team is
7:15
team is working in version 1.15
7:18
working in version 1.15
7:18
working in version 1.15 nowadays
7:20
nowadays
7:20
nowadays anyway um let's use 1.14 and let's
7:24
anyway um let's use 1.14 and let's
7:24
anyway um let's use 1.14 and let's install this nugget package in this
7:28
install this nugget package in this
7:28
install this nugget package in this project
7:30
project
7:30
project okay
7:31
okay
7:31
okay so
7:33
so
7:33
so now let's do the following I want to
7:37
now let's do the following I want to
7:37
now let's do the following I want to create a workflow with a single
7:40
create a workflow with a single
7:40
create a workflow with a single activity in workflows you have inputs of
7:45
activity in workflows you have inputs of
7:45
activity in workflows you have inputs of course and then you send out an output
7:49
course and then you send out an output
7:49
course and then you send out an output right so you have inputs and outputs
7:52
right so you have inputs and outputs
7:53
right so you have inputs and outputs that is actually it uh so let's create a
7:56
that is actually it uh so let's create a
7:56
that is actually it uh so let's create a new activity let's name it uh um my
8:00
new activity let's name it uh um my
8:00
new activity let's name it uh um my activity or first
8:03
activity or first
8:03
activity or first activity so here in
8:06
activity so here in
8:06
activity so here in Dapper the base class that you need to
8:09
Dapper the base class that you need to
8:09
Dapper the base class that you need to inherit from is workflow activity okay
8:14
inherit from is workflow activity okay
8:14
inherit from is workflow activity okay so that's why you need the S
8:15
so that's why you need the S
8:16
so that's why you need the S dek so this is D.W workflow. workflow
8:20
dek so this is D.W workflow. workflow
8:20
dek so this is D.W workflow. workflow activity and you can see this is a
8:21
activity and you can see this is a
8:21
activity and you can see this is a generic class that takes two types the
8:25
generic class that takes two types the
8:25
generic class that takes two types the first one is about the input that you
8:27
first one is about the input that you
8:27
first one is about the input that you want to send to the activity
8:30
want to send to the activity
8:30
want to send to the activity and the other one of course is about the
8:33
and the other one of course is about the
8:33
and the other one of course is about the output so let's say that I want to
8:35
output so let's say that I want to
8:36
output so let's say that I want to process a string I don't want to make it
8:38
process a string I don't want to make it
8:38
process a string I don't want to make it super uh you know difficult in this
8:42
super uh you know difficult in this
8:42
super uh you know difficult in this session of course you in the real world
8:46
session of course you in the real world
8:46
session of course you in the real world you maybe want to send uh I don't know a
8:50
you maybe want to send uh I don't know a
8:50
you maybe want to send uh I don't know a complex class or a structure or what
8:53
complex class or a structure or what
8:53
complex class or a structure or what have you right a record or something but
8:55
have you right a record or something but
8:55
have you right a record or something but in this case I just want to send a
8:58
in this case I just want to send a
8:58
in this case I just want to send a string and I want to Output the string
9:02
string and I want to Output the string
9:02
string and I want to Output the string right I want to make it
9:04
right I want to make it
9:04
right I want to make it simple now this is a base class
9:08
simple now this is a base class
9:08
simple now this is a base class and if we press F12 you can see this is
9:13
and if we press F12 you can see this is
9:13
and if we press F12 you can see this is an abstract class that implements the ey
9:17
an abstract class that implements the ey
9:17
an abstract class that implements the ey workflow
9:19
workflow
9:19
workflow activity and interface and actually you
9:22
activity and interface and actually you
9:22
activity and interface and actually you need to implement run
9:24
need to implement run
9:24
need to implement run aing in other words you need to
9:27
aing in other words you need to
9:27
aing in other words you need to implement this abstract class run async
9:30
implement this abstract class run async
9:30
implement this abstract class run async you're receiving this context and you're
9:33
you're receiving this context and you're
9:33
you're receiving this context and you're receiving the
9:35
receiving the
9:35
receiving the input
9:36
input
9:36
input right so I don't know maybe I just want
9:40
right so I don't know maybe I just want
9:40
right so I don't know maybe I just want to return the string that I'm receiving
9:43
to return the string that I'm receiving
9:43
to return the string that I'm receiving as the I don't know the uppercase
9:46
as the I don't know the uppercase
9:46
as the I don't know the uppercase version of that string in other words
9:49
version of that string in other words
9:49
version of that string in other words let's return input to
9:53
let's return input to
9:53
let's return input to Upper and of course task from
9:57
Upper and of course task from
9:57
Upper and of course task from resol and input to
10:00
resol and input to
10:00
resol and input to oper right so this is the first activity
10:03
oper right so this is the first activity
10:03
oper right so this is the first activity I'm receiving whatever
10:05
I'm receiving whatever
10:05
I'm receiving whatever string I'm passing to the activity and
10:08
string I'm passing to the activity and
10:08
string I'm passing to the activity and the activity itself is going to return
10:12
the activity itself is going to return
10:12
the activity itself is going to return the uppercase version of this
10:15
the uppercase version of this
10:15
the uppercase version of this string right quite ay thing to
10:18
string right quite ay thing to
10:18
string right quite ay thing to understand
10:19
understand
10:19
understand here okay so this is the first activity
10:22
here okay so this is the first activity
10:22
here okay so this is the first activity the first and only activity that I want
10:24
the first and only activity that I want
10:24
the first and only activity that I want to have in this first workflow and now
10:28
to have in this first workflow and now
10:28
to have in this first workflow and now we need to create the workflow
10:32
we need to create the workflow
10:32
we need to create the workflow itself so those activity objects are the
10:37
itself so those activity objects are the
10:37
itself so those activity objects are the one that are going to have the
10:40
one that are going to have the
10:40
one that are going to have the logic okay and the workflow object is
10:44
logic okay and the workflow object is
10:44
logic okay and the workflow object is going to
10:46
going to
10:46
going to orchestrate the entire process the
10:48
orchestrate the entire process the
10:48
orchestrate the entire process the entire workflow right that hence the
10:51
entire workflow right that hence the
10:51
entire workflow right that hence the name so fantastic let's create a new
10:54
name so fantastic let's create a new
10:54
name so fantastic let's create a new workflow let's name it my workflow
10:59
workflow let's name it my workflow
10:59
workflow let's name it my workflow I hope you can see my screen in the font
11:03
I hope you can see my screen in the font
11:03
I hope you can see my screen in the font size correctly let's increase it a
11:06
size correctly let's increase it a
11:06
size correctly let's increase it a little
11:08
little
11:08
little bit and so my
11:11
bit and so my
11:11
bit and so my workflow and let's inherit from workflow
11:15
workflow and let's inherit from workflow
11:15
workflow and let's inherit from workflow this is another Base Class that we can
11:17
this is another Base Class that we can
11:17
this is another Base Class that we can find in doer.
11:20
find in doer.
11:20
find in doer. workflow and similarly to what we had
11:24
workflow and similarly to what we had
11:24
workflow and similarly to what we had before you can specify the input type
11:27
before you can specify the input type
11:27
before you can specify the input type and then the output type
11:31
and then the output type
11:31
and then the output type again it depends on the requirements of
11:34
again it depends on the requirements of
11:34
again it depends on the requirements of your uh the application that you're
11:36
your uh the application that you're
11:36
your uh the application that you're building in this case I just want to
11:38
building in this case I just want to
11:39
building in this case I just want to process some
11:40
process some
11:40
process some strings so um I'm I'm gonna delete this
11:46
strings so um I'm I'm gonna delete this
11:46
strings so um I'm I'm gonna delete this um co-pilot here is U
11:49
um co-pilot here is U
11:49
um co-pilot here is U hallucinating uh workflow this is BAS
11:52
hallucinating uh workflow this is BAS
11:52
hallucinating uh workflow this is BAS Base Class input string output string
11:56
Base Class input string output string
11:56
Base Class input string output string and again I need to implement this
12:00
and again I need to implement this
12:01
and again I need to implement this abstract class which is quite similar to
12:03
abstract class which is quite similar to
12:03
abstract class which is quite similar to the one that we had
12:05
the one that we had
12:05
the one that we had before and now we're ready to execute
12:09
before and now we're ready to execute
12:09
before and now we're ready to execute the
12:10
the
12:10
the activities so I'm going to use context
12:13
activities so I'm going to use context
12:13
activities so I'm going to use context and then col
12:16
and then col
12:16
and then col activity right very very uh easy thing
12:22
activity right very very uh easy thing
12:22
activity right very very uh easy thing to understand here I think the API is
12:25
to understand here I think the API is
12:25
to understand here I think the API is quite fresh and
12:27
quite fresh and
12:28
quite fresh and clean uh
12:30
clean uh
12:30
clean uh so that's the thing that you need to do
12:33
so that's the thing that you need to do
12:33
so that's the thing that you need to do here activity call activity a sync and
12:38
here activity call activity a sync and
12:38
here activity call activity a sync and let's do this call activity a sync
12:43
let's do this call activity a sync
12:43
let's do this call activity a sync and we have two versions input and
12:45
and we have two versions input and
12:45
and we have two versions input and output and then the name of activity
12:48
output and then the name of activity
12:48
output and then the name of activity which is first activity and then I pass
12:52
which is first activity and then I pass
12:52
which is first activity and then I pass input so this is one way this is another
12:56
input so this is one way this is another
12:56
input so this is one way this is another way okay actually I think the generic
12:59
way okay actually I think the generic
13:00
way okay actually I think the generic version only supports one
13:02
version only supports one
13:02
version only supports one type which is the input value anyway I'm
13:05
type which is the input value anyway I'm
13:05
type which is the input value anyway I'm GNA use this one and here I'm just uh
13:08
GNA use this one and here I'm just uh
13:08
GNA use this one and here I'm just uh you know using
13:10
you know using
13:10
you know using co-pilot and using this first activity
13:13
co-pilot and using this first activity
13:13
co-pilot and using this first activity string of course you can use name off
13:17
string of course you can use name off
13:17
string of course you can use name off instead anyway let's I don't know res
13:22
instead anyway let's I don't know res
13:22
instead anyway let's I don't know res equals a weit overr aing and I'm
13:26
equals a weit overr aing and I'm
13:26
equals a weit overr aing and I'm receiving the result here
13:29
receiving the result here
13:29
receiving the result here let's see what's going
13:31
let's see what's going
13:31
let's see what's going on um cannot sign void this is not this
13:35
on um cannot sign void this is not this
13:35
on um cannot sign void this is not this is not returning
13:37
is not returning
13:37
is not returning anything okay no result here just wait
13:42
anything okay no result here just wait
13:42
anything okay no result here just wait and what's going
13:44
and what's going
13:44
and what's going on
13:46
on
13:46
on so col
13:49
so col
13:49
so col activity is this uh just returning task
13:54
activity is this uh just returning task
13:54
activity is this uh just returning task let's see if this other one has
13:56
let's see if this other one has
13:56
let's see if this other one has something interesting
13:59
something interesting
13:59
something interesting so string and yeah I think this one is
14:04
so string and yeah I think this one is
14:04
so string and yeah I think this one is better so first activity and then input
14:09
better so first activity and then input
14:09
better so first activity and then input bar result
14:11
bar result
14:11
bar result wait I think this other overload is fine
14:15
wait I think this other overload is fine
14:15
wait I think this other overload is fine when you just want to fight and forget
14:18
when you just want to fight and forget
14:18
when you just want to fight and forget in this case I just want to return the
14:21
in this case I just want to return the
14:21
in this case I just want to return the value um and I think we're
14:24
value um and I think we're
14:24
value um and I think we're fine return result and just uh as simple
14:30
fine return result and just uh as simple
14:30
fine return result and just uh as simple as
14:31
as
14:31
as that I'm calling the activity I'm
14:34
that I'm calling the activity I'm
14:34
that I'm calling the activity I'm sending the input I'm receiving the
14:37
sending the input I'm receiving the
14:37
sending the input I'm receiving the output and I'm returning this as part of
14:40
output and I'm returning this as part of
14:40
output and I'm returning this as part of my
14:41
my
14:42
my result so as you can see here is easy to
14:46
result so as you can see here is easy to
14:46
result so as you can see here is easy to understand how you can chain things
14:48
understand how you can chain things
14:48
understand how you can chain things together since you can wait for an
14:51
together since you can wait for an
14:51
together since you can wait for an activity wait for the response and then
14:54
activity wait for the response and then
14:54
activity wait for the response and then use that output as the input for another
14:58
use that output as the input for another
14:58
use that output as the input for another one in other words I can use context.
15:02
one in other words I can use context.
15:02
one in other words I can use context. call activity
15:03
call activity
15:03
call activity async and to call another different
15:07
async and to call another different
15:07
async and to call another different activity so but yeah let's keep it
15:11
activity so but yeah let's keep it
15:11
activity so but yeah let's keep it simple right now and I think we're ready
15:14
simple right now and I think we're ready
15:14
simple right now and I think we're ready to register the
15:16
to register the
15:16
to register the activity okay you define those classes
15:20
activity okay you define those classes
15:20
activity okay you define those classes and you define the workflow itself but
15:23
and you define the workflow itself but
15:23
and you define the workflow itself but of course you need to register if you
15:26
of course you need to register if you
15:26
of course you need to register if you happen to be using net you need to
15:29
happen to be using net you need to
15:29
happen to be using net you need to register those activities and the
15:31
register those activities and the
15:31
register those activities and the workflow here in program.cs so Builder
15:37
workflow here in program.cs so Builder
15:37
workflow here in program.cs so Builder do
15:39
do
15:39
do services and let's see what we have
15:42
services and let's see what we have
15:42
services and let's see what we have here um
15:45
here um
15:45
here um add workflow do we have something about
15:49
add workflow do we have something about
15:49
add workflow do we have something about workflows add
15:51
workflows add
15:51
workflows add workflow add
15:57
workflow I think this is
15:59
workflow I think this is
15:59
workflow I think this is it this is the name that I was looking
16:02
it this is the name that I was looking
16:02
it this is the name that I was looking for or Dapper
16:06
workflow H using Dapper do workflow and
16:13
workflow H using Dapper do workflow and
16:13
workflow H using Dapper do workflow and let's see what we have here at Dapper
16:16
let's see what we have here at Dapper
16:17
let's see what we have here at Dapper workflow yes I was right at dopper
16:21
workflow yes I was right at dopper
16:21
workflow yes I was right at dopper workflow so my intelligence is not
16:24
workflow so my intelligence is not
16:24
workflow so my intelligence is not working uh perfectly today anyway you
16:29
working uh perfectly today anyway you
16:29
working uh perfectly today anyway you can pass this
16:30
can pass this
16:31
can pass this action which is the object that we use
16:35
action which is the object that we use
16:35
action which is the object that we use for registering the activities and the
16:38
for registering the activities and the
16:38
for registering the activities and the workflow
16:39
workflow
16:39
workflow itself so options and you can see that
16:43
itself so options and you can see that
16:43
itself so options and you can see that we have register activity in register
16:46
we have register activity in register
16:46
we have register activity in register workflow so let's register activity
16:50
workflow so let's register activity
16:50
workflow so let's register activity first activity and I think that's it um
16:54
first activity and I think that's it um
16:54
first activity and I think that's it um register activity T
16:57
register activity T
16:57
register activity T activity I think this is the
17:01
activity I think this is the
17:01
activity I think this is the overload
17:03
overload
17:03
overload yes rer activity as simple as
17:07
yes rer activity as simple as
17:07
yes rer activity as simple as that we have to sure to be sure col
17:10
that we have to sure to be sure col
17:10
that we have to sure to be sure col activity return type I think yes
17:14
activity return type I think yes
17:14
activity return type I think yes soan yes col activity return type yes I
17:18
soan yes col activity return type yes I
17:18
soan yes col activity return type yes I was using these other word uh you know
17:21
was using these other word uh you know
17:21
was using these other word uh you know the other
17:22
the other
17:22
the other overload um the other one is for firing
17:27
overload um the other one is for firing
17:27
overload um the other one is for firing and forget
17:29
and forget
17:29
and forget you know context call activity acing if
17:32
you know context call activity acing if
17:32
you know context call activity acing if you use this
17:34
you use this
17:34
you use this one this particular one is just
17:37
one this particular one is just
17:37
one this particular one is just returning a task so just just
17:41
returning a task so just just
17:41
returning a task so just just await and that's it you know when you're
17:45
await and that's it you know when you're
17:45
await and that's it you know when you're processing something and you're not
17:46
processing something and you're not
17:46
processing something and you're not expecting a result in this case I'm
17:49
expecting a result in this case I'm
17:49
expecting a result in this case I'm using this older overload where you
17:51
using this older overload where you
17:51
using this older overload where you specify the type and of course you can
17:54
specify the type and of course you can
17:54
specify the type and of course you can use the result here and save it in the
17:57
use the result here and save it in the
17:57
use the result here and save it in the variable and so on
17:59
variable and so on
17:59
variable and so on on fantastic so we're registering the
18:03
on fantastic so we're registering the
18:03
on fantastic so we're registering the activity and now we need to register the
18:06
activity and now we need to register the
18:06
activity and now we need to register the workflow
18:07
workflow
18:07
workflow itself so very similar to what happened
18:11
itself so very similar to what happened
18:11
itself so very similar to what happened here just register workflow and then use
18:15
here just register workflow and then use
18:15
here just register workflow and then use this generic version of the method in my
18:19
this generic version of the method in my
18:19
this generic version of the method in my workflow and I think that's it yes
18:23
workflow and I think that's it yes
18:23
workflow and I think that's it yes that's
18:24
that's
18:24
that's it
18:26
it
18:26
it fantastic now
18:30
fantastic now
18:30
fantastic now the workflow is registered the activity
18:32
the workflow is registered the activity
18:32
the workflow is registered the activity is registered we need to use the
18:34
is registered we need to use the
18:34
is registered we need to use the workflow somewhere so I'm going to uh
18:38
workflow somewhere so I'm going to uh
18:38
workflow somewhere so I'm going to uh create a
18:40
create a
18:40
create a new um task I action
18:44
new um task I action
18:44
new um task I action result method name start since this is
18:48
result method name start since this is
18:48
result method name start since this is the one that I want to
18:50
the one that I want to
18:50
the one that I want to use for starting the
18:53
use for starting the
18:54
use for starting the workflow so how in the world I can do
18:57
workflow so how in the world I can do
18:57
workflow so how in the world I can do that uh
18:59
that uh
18:59
that uh um so I think we need to inject the toer
19:03
um so I think we need to inject the toer
19:03
um so I think we need to inject the toer client
19:04
client
19:04
client object just let we uh been doing this
19:09
object just let we uh been doing this
19:09
object just let we uh been doing this series in other words let's see if I can
19:14
series in other words let's see if I can
19:14
series in other words let's see if I can daer client right here dopper client and
19:17
daer client right here dopper client and
19:18
daer client right here dopper client and then use dopper client here and we have
19:21
then use dopper client here and we have
19:21
then use dopper client here and we have start workflow
19:23
start workflow
19:23
start workflow acing this is a method for starting in
19:27
acing this is a method for starting in
19:27
acing this is a method for starting in executing the workflow
19:30
okay so you just inject drer
19:34
okay so you just inject drer
19:34
okay so you just inject drer client so you need to specify workflow
19:38
client so you need to specify workflow
19:39
client so you need to specify workflow component the so this is Dapper it has
19:42
component the so this is Dapper it has
19:42
component the so this is Dapper it has to be Dapper
19:45
to be Dapper
19:45
to be Dapper and workflow name my workflow this is
19:50
and workflow name my workflow this is
19:50
and workflow name my workflow this is correct and
19:52
correct and
19:52
correct and then you
19:54
then you
19:54
then you pass an instance
19:57
pass an instance
19:57
pass an instance ID an in instance ID so this is uh this
20:01
ID an in instance ID so this is uh this
20:01
ID an in instance ID so this is uh this is for you to specify this is for you to
20:06
is for you to specify this is for you to
20:06
is for you to specify this is for you to you know
20:08
you know
20:08
you know to
20:09
to
20:09
to uh to create and to race there
20:14
uh to create and to race there
20:14
uh to create and to race there somewhere in other words you need to
20:17
somewhere in other words you need to
20:17
somewhere in other words you need to pass in a string that um identifies and
20:23
pass in a string that um identifies and
20:23
pass in a string that um identifies and uniquely identifies this workflow
20:26
uniquely identifies this workflow
20:26
uniquely identifies this workflow because you you can run this same
20:29
because you you can run this same
20:29
because you you can run this same workflow many many many times so I
20:35
workflow many many many times so I
20:35
workflow many many many times so I think good not good and then to string
20:39
think good not good and then to string
20:39
think good not good and then to string and I think that's it
20:41
and I think that's it
20:41
and I think that's it right since if you happen to be using
20:45
right since if you happen to be using
20:45
right since if you happen to be using other I don't know ID strategies such as
20:49
other I don't know ID strategies such as
20:49
other I don't know ID strategies such as I don't know consecutive numbers
20:52
I don't know consecutive numbers
20:52
I don't know consecutive numbers or I don't know I think this is
20:57
or I don't know I think this is
20:57
or I don't know I think this is better so I'm going to use the goid and
21:01
better so I'm going to use the goid and
21:01
better so I'm going to use the goid and then I need to pass
21:03
then I need to pass
21:03
then I need to pass input this is a
21:05
input this is a
21:05
input this is a string that I want to use for sending to
21:09
string that I want to use for sending to
21:09
string that I want to use for sending to the workflow right so HTTP
21:15
the workflow right so HTTP
21:15
the workflow right so HTTP post HTTP post
21:19
post HTTP post
21:19
post HTTP post and let's receive
21:22
and let's receive
21:22
and let's receive data and you know let's
21:25
data and you know let's
21:25
data and you know let's use uh let's use the query Str instead
21:29
use uh let's use the query Str instead
21:29
use uh let's use the query Str instead of using a body and defining a model and
21:33
of using a body and defining a model and
21:33
of using a body and defining a model and so on I think this is fine so data and
21:39
so on I think this is fine so data and
21:39
so on I think this is fine so data and wait so you can see that I'm receiving
21:43
wait so you can see that I'm receiving
21:43
wait so you can see that I'm receiving this
21:44
this
21:45
this error but I think today nowadays is um
21:49
error but I think today nowadays is um
21:49
error but I think today nowadays is um safe to just uh
21:53
safe to just uh
21:53
safe to just uh suppress this
21:56
suppress this
21:56
suppress this um this error
22:01
okay and this is because the workflow
22:04
okay and this is because the workflow
22:04
okay and this is because the workflow component sorry uh the workflow building
22:07
component sorry uh the workflow building
22:07
component sorry uh the workflow building block was in U Alpha State let's go back
22:12
block was in U Alpha State let's go back
22:12
block was in U Alpha State let's go back to the
22:16
documentation and overview D workflow is
22:20
documentation and overview D workflow is
22:20
documentation and overview D workflow is currently in beta I think that is the
22:23
currently in beta I think that is the
22:23
currently in beta I think that is the reason
22:24
reason
22:24
reason why okay is in beta and I believe in the
22:30
why okay is in beta and I believe in the
22:30
why okay is in beta and I believe in the next version of dapper this is going to
22:32
next version of dapper this is going to
22:32
next version of dapper this is going to be released as a ga
22:36
be released as a ga
22:36
be released as a ga component but of course let's wait and
22:38
component but of course let's wait and
22:38
component but of course let's wait and see and let's obtain the
22:42
see and let's obtain the
22:42
see and let's obtain the result and I think that's it return okay
22:47
result and I think that's it return okay
22:47
result and I think that's it return okay result
22:49
result
22:49
result and I'm receiving the
22:52
and I'm receiving the
22:52
and I'm receiving the result just think take into account that
22:54
result just think take into account that
22:54
result just think take into account that you're receiving this is not the string
22:57
you're receiving this is not the string
22:57
you're receiving this is not the string result okay you're returning
23:00
result okay you're returning
23:00
result okay you're returning here start workflow
23:05
response so this is the
23:08
response so this is the
23:08
response so this is the response this is the place where the
23:12
response this is the place where the
23:12
response this is the place where the engine Returns the information about the
23:16
engine Returns the information about the
23:16
engine Returns the information about the workflow and in
23:18
workflow and in
23:18
workflow and in state okay so I believe this is very
23:22
state okay so I believe this is very
23:22
state okay so I believe this is very helpful let's see how it goes and I
23:26
helpful let's see how it goes and I
23:26
helpful let's see how it goes and I think we're ready to start the workflow
23:29
think we're ready to start the workflow
23:29
think we're ready to start the workflow we created activity we created the
23:31
we created activity we created the
23:31
we created activity we created the workflow we registered activity in the
23:33
workflow we registered activity in the
23:33
workflow we registered activity in the workflow and then we're starting the
23:36
workflow and then we're starting the
23:36
workflow and then we're starting the workflow and returning the
23:39
workflow and returning the
23:40
workflow and returning the result okay so let's Jump Right In right
23:46
result okay so let's Jump Right In right
23:46
result okay so let's Jump Right In right here to this
23:50
folder and let's start the dopper side
23:55
folder and let's start the dopper side
23:55
folder and let's start the dopper side car
23:56
car
23:57
car okay so Dapper
24:01
okay so Dapper
24:01
okay so Dapper run you know the drill right application
24:05
run you know the drill right application
24:05
run you know the drill right application ID workflow or my workflow or what have
24:08
ID workflow or my workflow or what have
24:08
ID workflow or my workflow or what have you and then dopper HTTP Port let's use
24:16
you and then dopper HTTP Port let's use
24:16
you and then dopper HTTP Port let's use 55,000 and I Port
24:21
5500 and oh before I
24:26
5500 and oh before I
24:26
5500 and oh before I continue let me show you one additional
24:29
continue let me show you one additional
24:29
continue let me show you one additional thing that you be you have to be careful
24:31
thing that you be you have to be careful
24:31
thing that you be you have to be careful about so let's navigate to the Home
24:35
about so let's navigate to the Home
24:35
about so let's navigate to the Home folder and then do
24:37
folder and then do
24:37
folder and then do dapper remember that this is a place
24:39
dapper remember that this is a place
24:39
dapper remember that this is a place where the default components are
24:41
where the default components are
24:41
where the default components are installed when you Dapper in
24:44
installed when you Dapper in
24:44
installed when you Dapper in it so if I navigate to components I can
24:48
it so if I navigate to components I can
24:48
it so if I navigate to components I can find the state store so the thing about
24:51
find the state store so the thing about
24:51
find the state store so the thing about the workflow engine is that uh it needs
24:55
the workflow engine is that uh it needs
24:55
the workflow engine is that uh it needs a state store for storing the work state
25:00
a state store for storing the work state
25:00
a state store for storing the work state right so this is going to use the state
25:03
right so this is going to use the state
25:03
right so this is going to use the state store that is right here of course you
25:06
store that is right here of course you
25:06
store that is right here of course you can specify All State stores in this
25:10
can specify All State stores in this
25:10
can specify All State stores in this case I'm using
25:12
case I'm using
25:12
case I'm using redis
25:14
redis
25:14
redis okay and I of course I happen to be
25:18
okay and I of course I happen to be
25:18
okay and I of course I happen to be executing Docker desktop in this
25:22
executing Docker desktop in this
25:22
executing Docker desktop in this computer right
25:24
computer right
25:24
computer right here okay so this is important important
25:28
here okay so this is important important
25:29
here okay so this is important important this parameter that you're passing to
25:31
this parameter that you're passing to
25:31
this parameter that you're passing to the ready state
25:33
the ready state
25:33
the ready state store and actually you need to pass to
25:36
store and actually you need to pass to
25:36
store and actually you need to pass to other kind of state stores for using
25:40
other kind of state stores for using
25:40
other kind of state stores for using workflows and this is because under
25:43
workflows and this is because under
25:43
workflows and this is because under needed all the workflow engine is using
25:46
needed all the workflow engine is using
25:46
needed all the workflow engine is using the actor state store I mean you have to
25:49
the actor state store I mean you have to
25:49
the actor state store I mean you have to enable this and the parameter name is
25:53
enable this and the parameter name is
25:53
enable this and the parameter name is actor State Thor and you have to specify
25:55
actor State Thor and you have to specify
25:56
actor State Thor and you have to specify the value as true in other words
25:58
the value as true in other words
25:58
the value as true in other words you need to enable
26:00
you need to enable
26:00
you need to enable this okay
26:03
this okay
26:03
this okay luckily this was enabled
26:06
luckily this was enabled
26:06
luckily this was enabled before I don't recall enabling enabling
26:10
before I don't recall enabling enabling
26:10
before I don't recall enabling enabling this in my computer so I believe back in
26:13
this in my computer so I believe back in
26:13
this in my computer so I believe back in the day I mean back uh I don't know two
26:18
the day I mean back uh I don't know two
26:18
the day I mean back uh I don't know two or three months ago when I Dapper in it
26:21
or three months ago when I Dapper in it
26:21
or three months ago when I Dapper in it in this computer this value was
26:25
in this computer this value was
26:25
in this computer this value was set so anyway you have to have it let's
26:29
set so anyway you have to have it let's
26:29
set so anyway you have to have it let's return doer in action 10 and
26:34
return doer in action 10 and
26:34
return doer in action 10 and then uh workflow
26:36
then uh workflow
26:36
then uh workflow service and D run D HTTP port a port
26:44
service and D run D HTTP port a port
26:44
service and D run D HTTP port a port and I want to use the default components
26:47
and I want to use the default components
26:47
and I want to use the default components so that's why I'm not going to pass
26:49
so that's why I'm not going to pass
26:49
so that's why I'm not going to pass researches path or components path I
26:53
researches path or components path I
26:53
researches path or components path I just want to
26:55
just want to
26:55
just want to use net and then urls
26:58
use net and then urls
26:58
use net and then urls and specify
27:01
and specify
27:01
and specify HTTP plus
27:04
HTTP plus
27:04
HTTP plus 5500 because I want to match those app
27:07
5500 because I want to match those app
27:07
5500 because I want to match those app port in the net application Port of
27:10
port in the net application Port of
27:10
port in the net application Port of course and let's execute
27:13
course and let's execute
27:13
course and let's execute this so app process exceeded uh net
27:18
this so app process exceeded uh net
27:18
this so app process exceeded uh net URLs
27:20
URLs
27:20
URLs um you miss pel the built-in net command
27:24
um you miss pel the built-in net command
27:24
um you miss pel the built-in net command did I yes net Ron
27:28
did I yes net Ron
27:28
did I yes net Ron net run this is the command URLs and
27:32
net run this is the command URLs and
27:32
net run this is the command URLs and we're ready to
27:35
rumble okay so yes this is
27:41
running this is running okay the engine
27:44
running this is running okay the engine
27:44
running this is running okay the engine is
27:45
is
27:45
is running but of course the workflow
27:48
running but of course the workflow
27:48
running but of course the workflow itself is not running at all I need to
27:51
itself is not running at all I need to
27:51
itself is not running at all I need to execute
27:52
execute
27:52
execute it so let's go back here to visual
27:56
it so let's go back here to visual
27:56
it so let's go back here to visual studio and let's uh I don't know let's
27:59
studio and let's uh I don't know let's
27:59
studio and let's uh I don't know let's set some break points
28:01
set some break points
28:01
set some break points here and here as well and I want to
28:08
here and here as well and I want to
28:08
here and here as well and I want to attach to the dopper in action workflow
28:11
attach to the dopper in action workflow
28:11
attach to the dopper in action workflow service
28:13
service
28:13
service process that is right
28:15
process that is right
28:15
process that is right here you know because I want to debug
28:19
here you know because I want to debug
28:19
here you know because I want to debug this application I want to show you
28:21
this application I want to show you
28:21
this application I want to show you exactly what's going
28:24
exactly what's going
28:24
exactly what's going on and I think that is it let's use post
28:28
on and I think that is it let's use post
28:28
on and I think that is it let's use post man or you can use
28:30
man or you can use
28:30
man or you can use Curl or you can just use this HTTP
28:34
Curl or you can just use this HTTP
28:34
Curl or you can just use this HTTP file let's use
28:36
file let's use
28:36
file let's use post
28:38
post
28:38
post to is that the name weather forecast oh
28:41
to is that the name weather forecast oh
28:41
to is that the name weather forecast oh my God anyway I didn't change the name
28:45
my God anyway I didn't change the name
28:45
my God anyway I didn't change the name so weather forecast is fine uh
28:49
so weather forecast is fine uh
28:49
so weather forecast is fine uh 5500 post and remember that I'm using
28:53
5500 post and remember that I'm using
28:53
5500 post and remember that I'm using this query string so data I don't know
28:57
this query string so data I don't know
28:57
this query string so data I don't know hello
28:59
hello
28:59
hello hello from daer in
29:01
hello from daer in
29:01
hello from daer in action daer in action is this um
29:07
action daer in action is this um
29:07
action daer in action is this um escaping the string no this is not
29:09
escaping the string no this is not
29:09
escaping the string no this is not escaping the string so blank space I
29:12
escaping the string so blank space I
29:12
escaping the string so blank space I think is is that percentage
29:17
20 I think so
29:19
20 I think so
29:19
20 I think so right hello from doing
29:23
right hello from doing
29:23
right hello from doing action okay cool send request
29:28
action okay cool send request
29:28
action okay cool send request so we are sending the request this is
29:31
so we are sending the request this is
29:31
so we are sending the request this is starting the
29:32
starting the
29:32
starting the workflow and it's returning
29:36
workflow and it's returning
29:36
workflow and it's returning and of course the workflow is being
29:40
and of course the workflow is being
29:40
and of course the workflow is being called and the workflow itself is
29:43
called and the workflow itself is
29:43
called and the workflow itself is executing the activity and this is just
29:46
executing the activity and this is just
29:46
executing the activity and this is just returning the uppercase version of that
29:49
returning the uppercase version of that
29:49
returning the uppercase version of that string remember this is the place where
29:52
string remember this is the place where
29:52
string remember this is the place where you implement the logic that you want to
29:54
you implement the logic that you want to
29:54
you implement the logic that you want to have in your solution
29:58
have in your solution
29:58
have in your solution I'm just returning oper um and I think
30:03
I'm just returning oper um and I think
30:03
I'm just returning oper um and I think that's it that's it this is
30:06
that's it that's it this is
30:06
that's it that's it this is executing and this is just returning an
30:09
executing and this is just returning an
30:09
executing and this is just returning an instance
30:10
instance
30:10
instance ID okay this is the instance ID of the
30:14
ID okay this is the instance ID of the
30:14
ID okay this is the instance ID of the workflow that we're
30:18
executing so of course you need another
30:21
executing so of course you need another
30:21
executing so of course you need another end point for inspecting the status of
30:24
end point for inspecting the status of
30:24
end point for inspecting the status of the
30:25
the
30:25
the warf so let's do that
30:28
warf so let's do that
30:28
warf so let's do that uh let's stop
30:30
uh let's stop
30:30
uh let's stop this let's go back here and end the
30:35
this let's go back here and end the
30:35
this let's go back here and end the execution and you know what I really
30:39
execution and you know what I really
30:39
execution and you know what I really really hate weather forecast blah blah
30:42
really hate weather forecast blah blah
30:42
really hate weather forecast blah blah blah let's change it to uh
30:45
blah let's change it to uh
30:45
blah let's change it to uh workflows
30:47
workflows
30:47
workflows workflows
30:49
workflows
30:49
workflows controller and let's get rid of weather
30:53
controller and let's get rid of weather
30:53
controller and let's get rid of weather forast um
30:56
forast um
30:56
forast um anyway Warf of course I need to change
30:59
anyway Warf of course I need to change
30:59
anyway Warf of course I need to change this right uh let's
31:04
this right uh let's
31:04
this right uh let's change
31:06
change
31:06
change um
31:08
um
31:08
um workflows okay
31:10
workflows okay
31:10
workflows okay cool okay let's go back to the
31:14
cool okay let's go back to the
31:14
cool okay let's go back to the controller as I was saying you need to
31:16
controller as I was saying you need to
31:16
controller as I was saying you need to implement another endpoint for
31:18
implement another endpoint for
31:18
implement another endpoint for inspecting status of the workflow so
31:22
inspecting status of the workflow so
31:22
inspecting status of the workflow so public is in task you know the drill I
31:26
public is in task you know the drill I
31:26
public is in task you know the drill I action res
31:28
action res
31:28
action res let's name it get or get status or
31:31
let's name it get or get status or
31:31
let's name it get or get status or something this is going to be an HTTP
31:35
something this is going to be an HTTP
31:35
something this is going to be an HTTP get uh method so I need to
31:40
get uh method so I need to
31:40
get uh method so I need to pass the instance
31:44
pass the instance
31:44
pass the instance ID right I think that is it good
31:48
ID right I think that is it good
31:48
ID right I think that is it good instance ID and from
31:54
query and I want to use that that
31:57
query and I want to use that that
31:58
query and I want to use that that instance
31:59
instance
31:59
instance ID here get workflow
32:03
ID here get workflow
32:03
ID here get workflow Asing so in this case you just pass the
32:07
Asing so in this case you just pass the
32:07
Asing so in this case you just pass the instance ID instance ID to string and
32:10
instance ID instance ID to string and
32:10
instance ID instance ID to string and then workflow component it's going to be
32:14
then workflow component it's going to be
32:14
then workflow component it's going to be daer and if you happen to have a
32:17
daer and if you happen to have a
32:17
daer and if you happen to have a cancellation token you can pass it here
32:21
cancellation token you can pass it here
32:21
cancellation token you can pass it here I'm not using the cancellation
32:23
I'm not using the cancellation
32:23
I'm not using the cancellation token so let's await the result
32:28
token so let's await the result
32:28
token so let's await the result oh bar res away just like this right and
32:34
oh bar res away just like this right and
32:34
oh bar res away just like this right and return okay
32:35
return okay
32:35
return okay result um
32:40
so this API is currently not
32:44
so this API is currently not
32:44
so this API is currently not stable I think this is the the same
32:47
stable I think this is the the same
32:47
stable I think this is the the same thing as
32:48
thing as
32:48
thing as before so let's suppress this right here
32:52
before so let's suppress this right here
32:52
before so let's suppress this right here of course you can
32:54
of course you can
32:54
of course you can use that suppression in the CSR file in
32:59
use that suppression in the CSR file in
32:59
use that suppression in the CSR file in instead um but that's a net thing um get
33:03
instead um but that's a net thing um get
33:03
instead um but that's a net thing um get workflow I'm returning the
33:06
workflow I'm returning the
33:06
workflow I'm returning the result get workflow um
33:10
result get workflow um
33:10
result get workflow um response and I think we have different
33:14
response and I think we have different
33:14
response and I think we have different things that we can
33:15
things that we can
33:15
things that we can expect last updated ad because remember
33:19
expect last updated ad because remember
33:19
expect last updated ad because remember those workflows can be running for a
33:22
those workflows can be running for a
33:22
those workflows can be running for a long
33:23
long
33:23
long time um so last updated ad properties
33:28
time um so last updated ad properties
33:28
time um so last updated ad properties instance C and so on let's return the
33:31
instance C and so on let's return the
33:31
instance C and so on let's return the entire object just to see what's going
33:34
entire object just to see what's going
33:34
entire object just to see what's going on
33:37
and so let's remove those break
33:42
and so let's remove those break
33:42
and so let's remove those break points
33:45
points
33:45
points and let's
33:47
and let's
33:47
and let's run this project
33:52
again okay perfect let's go back to the
33:56
again okay perfect let's go back to the
33:56
again okay perfect let's go back to the HTTP file
33:59
HTTP file
33:59
HTTP file F let's let's uh start a new workflow
34:03
F let's let's uh start a new workflow
34:03
F let's let's uh start a new workflow this is a new instance
34:06
this is a new instance
34:06
this is a new instance ID
34:08
ID
34:08
ID and I can actually go ahead and create a
34:12
and I can actually go ahead and create a
34:12
and I can actually go ahead and create a new request here
34:15
new request here
34:15
new request here get
34:19
um forward slwl I don't need
34:23
um forward slwl I don't need
34:23
um forward slwl I don't need the this query string I need instance ID
34:29
the this query string I need instance ID
34:29
the this query string I need instance ID and let's pass
34:31
and let's pass
34:32
and let's pass this of course you can use this other
34:38
syntax toer in action workflow service
34:41
syntax toer in action workflow service
34:41
syntax toer in action workflow service blah blah blah you can connect the you
34:43
blah blah blah you can connect the you
34:43
blah blah blah you can connect the you know the response from the previous
34:45
know the response from the previous
34:45
know the response from the previous request as a input in this uh query
34:47
request as a input in this uh query
34:47
request as a input in this uh query string and I'm just going to pass this
34:51
string and I'm just going to pass this
34:51
string and I'm just going to pass this uh value
34:53
uh value
34:53
uh value directly and send a request and this is
34:56
directly and send a request and this is
34:56
directly and send a request and this is returning let's increase the
35:00
returning let's increase the
35:00
returning let's increase the size so this is returning the workflow
35:03
size so this is returning the workflow
35:03
size so this is returning the workflow name the instance ID nothing new
35:06
name the instance ID nothing new
35:06
name the instance ID nothing new workflow component name Dapper created
35:09
workflow component name Dapper created
35:09
workflow component name Dapper created ad last updated ad I think those are
35:12
ad last updated ad I think those are
35:12
ad last updated ad I think those are those two values are UTC values
35:15
those two values are UTC values
35:15
those two values are UTC values roundtime
35:17
roundtime
35:17
roundtime status I believe this is a we need to
35:20
status I believe this is a we need to
35:20
status I believe this is a we need to verify in the documentation but I think
35:23
verify in the documentation but I think
35:23
verify in the documentation but I think it's like a completed or something
35:25
it's like a completed or something
35:25
it's like a completed or something because the activity
35:28
because the activity
35:28
because the activity executed and finished
35:30
executed and finished
35:31
executed and finished already so the input was hello from daer
35:34
already so the input was hello from daer
35:34
already so the input was hello from daer in
35:35
in
35:35
in action no custom status and then the
35:38
action no custom status and then the
35:38
action no custom status and then the output is Hello from daer in action in
35:42
output is Hello from daer in action in
35:42
output is Hello from daer in action in uppercase right so this is great you can
35:46
uppercase right so this is great you can
35:46
uppercase right so this is great you can easily see how you can create additional
35:50
easily see how you can create additional
35:51
easily see how you can create additional activities right so in the workflow
35:54
activities right so in the workflow
35:54
activities right so in the workflow itself you're
35:56
itself you're
35:56
itself you're chaining those
35:58
chaining those
35:58
chaining those Uh u values
36:02
Uh u values
36:02
Uh u values remember this is the pattern that I'm
36:05
remember this is the pattern that I'm
36:05
remember this is the pattern that I'm using today which is Task
36:08
using today which is Task
36:08
using today which is Task chaining but of course you can use other
36:11
chaining but of course you can use other
36:11
chaining but of course you can use other patterns such as the fan out fan in
36:14
patterns such as the fan out fan in
36:14
patterns such as the fan out fan in Asing HTTP
36:17
Asing HTTP
36:17
Asing HTTP apis
36:18
apis
36:19
apis monitor um external system interaction
36:22
monitor um external system interaction
36:22
monitor um external system interaction and you can actually add a human in the
36:26
and you can actually add a human in the
36:26
and you can actually add a human in the loop um kind of process meaning
36:32
loop um kind of process meaning
36:32
loop um kind of process meaning that um I don't know maybe a person
36:35
that um I don't know maybe a person
36:35
that um I don't know maybe a person needs
36:37
needs
36:37
needs to you know verify needs to update
36:40
to you know verify needs to update
36:40
to you know verify needs to update something needs to check something needs
36:43
something needs to check something needs
36:43
something needs to check something needs to I don't know
36:45
to I don't know
36:45
to I don't know approve
36:47
approve
36:47
approve um the process that you're building or
36:49
um the process that you're building or
36:49
um the process that you're building or something so you can send uh an email or
36:54
something so you can send uh an email or
36:54
something so you can send uh an email or a notification and then that person can
36:58
a notification and then that person can
36:58
a notification and then that person can execute the thing that is
37:01
execute the thing that is
37:01
execute the thing that is expecting you know the workflow is
37:03
expecting you know the workflow is
37:04
expecting you know the workflow is expecting to
37:07
continue okay so again it depends it
37:11
continue okay so again it depends it
37:11
continue okay so again it depends it depends on what you're trying to
37:14
depends on what you're trying to
37:14
depends on what you're trying to execute so what happens when you have in
37:19
execute so what happens when you have in
37:19
execute so what happens when you have in your
37:20
your
37:20
your workflow one
37:23
activity and that
37:26
activity and that
37:26
activity and that activity is related to service in your
37:31
activity is related to service in your
37:31
activity is related to service in your solution in other words let's say that I
37:34
solution in other words let's say that I
37:34
solution in other words let's say that I have
37:36
have
37:36
have here another activity let's name
37:40
here another activity let's name
37:40
here another activity let's name it second
37:44
activity and of course I need to stop
37:48
activity and of course I need to stop
37:49
activity and of course I need to stop this and workflow activity string is
37:53
this and workflow activity string is
37:53
this and workflow activity string is string doesn't
37:56
string doesn't
37:56
string doesn't matter so
38:00
let's say that you want
38:02
let's say that you want
38:02
let's say that you want to I don't know maybe this service a
38:06
to I don't know maybe this service a
38:06
to I don't know maybe this service a thing is running and you can use the
38:09
thing is running and you can use the
38:09
thing is running and you can use the service to service invocation building
38:12
service to service invocation building
38:12
service to service invocation building block so how can you do that um I think
38:18
block so how can you do that um I think
38:18
block so how can you do that um I think here oh sorry about that let's return
38:22
here oh sorry about that let's return
38:22
here oh sorry about that let's return let's see what we have in context do we
38:26
let's see what we have in context do we
38:26
let's see what we have in context do we have the client no we don't have
38:28
have the client no we don't have
38:28
have the client no we don't have anything additional so here you can
38:32
anything additional so here you can
38:32
anything additional so here you can inject drer
38:34
inject drer
38:34
inject drer client and use upper client
38:37
client and use upper client
38:37
client and use upper client invoke remember do you remember that so
38:42
invoke remember do you remember that so
38:43
invoke remember do you remember that so that was one of the first building
38:45
that was one of the first building
38:45
that was one of the first building blocks that we saw in this series so you
38:49
blocks that we saw in this series so you
38:49
blocks that we saw in this series so you can use invoke method for invoking
38:54
can use invoke method for invoking
38:54
can use invoke method for invoking something that is running in service a
38:56
something that is running in service a
38:56
something that is running in service a that is Expos
38:58
that is Expos
38:58
that is Expos exposing uh the service a is exposing
39:02
exposing uh the service a is exposing
39:02
exposing uh the service a is exposing make
39:04
make
39:04
make sense right so here the technique is
39:07
sense right so here the technique is
39:07
sense right so here the technique is just inject the toer
39:09
just inject the toer
39:09
just inject the toer client and then pass the input that
39:12
client and then pass the input that
39:12
client and then pass the input that you're want to send to that
39:16
you're want to send to that
39:16
you're want to send to that endpoint and I think that's
39:18
endpoint and I think that's
39:18
endpoint and I think that's it so first activity I mean not first
39:22
it so first activity I mean not first
39:22
it so first activity I mean not first activity second activity those two are
39:24
activity second activity those two are
39:24
activity second activity those two are not
39:26
not
39:26
not different uh
39:27
different uh
39:27
different uh then what what happened
39:30
then what what happened
39:30
then what what happened here I'm sorry second activity was the
39:34
here I'm sorry second activity was the
39:34
here I'm sorry second activity was the one that I wanted to update anyway first
39:38
one that I wanted to update anyway first
39:38
one that I wanted to update anyway first activity and second activity are not
39:40
activity and second activity are not
39:40
activity and second activity are not different than any
39:42
different than any
39:42
different than any other you know service or application in
39:46
other you know service or application in
39:46
other you know service or application in Dapper so you can
39:49
Dapper so you can
39:49
Dapper so you can inject the Dapper client and then use
39:52
inject the Dapper client and then use
39:52
inject the Dapper client and then use invoke method or you can use any of the
39:56
invoke method or you can use any of the
39:56
invoke method or you can use any of the other
39:59
um methods that the SDK is
40:04
exposing let's see doer client in B
40:07
exposing let's see doer client in B
40:07
exposing let's see doer client in B method
40:09
method
40:09
method right and yeah you pass the I don't know
40:14
right and yeah you pass the I don't know
40:14
right and yeah you pass the I don't know you can say this is a HTTP request this
40:16
you can say this is a HTTP request this
40:16
you can say this is a HTTP request this is a get and then the app ID it has to
40:20
is a get and then the app ID it has to
40:20
is a get and then the app ID it has to be the app ID that you specify when you
40:23
be the app ID that you specify when you
40:23
be the app ID that you specify when you run the service and then the method name
40:26
run the service and then the method name
40:26
run the service and then the method name and so on
40:27
and so on
40:27
and so on again I'm not going to do this but you
40:30
again I'm not going to do this but you
40:30
again I'm not going to do this but you can easily see how you can
40:32
can easily see how you can
40:32
can easily see how you can connect the workflow thing and the
40:36
connect the workflow thing and the
40:36
connect the workflow thing and the activity itself with the service to
40:38
activity itself with the service to
40:39
activity itself with the service to service invocation uh
40:42
service invocation uh
40:42
service invocation uh feature and I'm not going to do that
40:45
feature and I'm not going to do that
40:45
feature and I'm not going to do that today because of time
40:47
today because of time
40:47
today because of time constraints but again you can do that as
40:51
constraints but again you can do that as
40:51
constraints but again you can do that as a as a homework for you
40:55
a as a homework for you
40:55
a as a homework for you okay quite easy thing to do and
40:59
okay quite easy thing to do and
40:59
okay quite easy thing to do and understand so I think the main thing
41:02
understand so I think the main thing
41:02
understand so I think the main thing about the workflow building block is
41:05
about the workflow building block is
41:05
about the workflow building block is that the engine is being managed by
41:08
that the engine is being managed by
41:09
that the engine is being managed by topper
41:10
topper
41:10
topper itself and you just specified activities
41:14
itself and you just specified activities
41:14
itself and you just specified activities and orchestrate those activities and the
41:17
and orchestrate those activities and the
41:17
and orchestrate those activities and the storage is going to be managed by
41:20
storage is going to be managed by
41:20
storage is going to be managed by Dapper and I think that's it I think
41:24
Dapper and I think that's it I think
41:24
Dapper and I think that's it I think this is
41:25
this is
41:25
this is fantastic um
41:28
fantastic um
41:28
fantastic um so I'm not going to use service a today
41:32
so I'm not going to use service a today
41:32
so I'm not going to use service a today but of
41:34
but of
41:34
but of course uh let's I don't
41:37
course uh let's I don't
41:37
course uh let's I don't know you can return something about this
41:41
know you can return something about this
41:41
know you can return something about this other input in this second activity
41:44
other input in this second activity
41:44
other input in this second activity let's say that you're
41:46
let's say that you're
41:46
let's say that you're processing uh I don't know let's return
41:50
processing uh I don't know let's return
41:50
processing uh I don't know let's return second con
41:54
activity just like this and
41:57
activity just like this and
41:57
activity just like this and you know I'm just I just want to
42:01
you know I'm just I just want to
42:01
you know I'm just I just want to um I just want to change the output
42:05
um I just want to change the output
42:05
um I just want to change the output here okay and remember in task
42:11
here okay and remember in task
42:11
here okay and remember in task chaining this is the place where you
42:14
chaining this is the place where you
42:14
chaining this is the place where you wait for the first activity and then
42:17
wait for the first activity and then
42:17
wait for the first activity and then await context call activity string
42:19
await context call activity string
42:19
await context call activity string second activity and pass the result
42:22
second activity and pass the result
42:22
second activity and pass the result actually co-pilot here is right you can
42:25
actually co-pilot here is right you can
42:25
actually co-pilot here is right you can pass the output from the first activity
42:27
pass the output from the first activity
42:27
pass the output from the first activity to the second activity and you're
42:29
to the second activity and you're
42:29
to the second activity and you're chaining those
42:30
chaining those
42:31
chaining those tasks
42:33
tasks
42:33
tasks together okay make
42:37
sense
42:39
sense
42:39
sense awesome I think that's it I think
42:43
awesome I think that's it I think
42:43
awesome I think that's it I think you just watched the main things and the
42:47
you just watched the main things and the
42:47
you just watched the main things and the main trades about the workflow building
42:51
main trades about the workflow building
42:51
main trades about the workflow building blog of course there are other
42:54
blog of course there are other
42:54
blog of course there are other interesting things about this in and I
42:57
interesting things about this in and I
42:57
interesting things about this in and I totally recommend to go to the official
43:01
totally recommend to go to the official
43:01
totally recommend to go to the official documentation and understand the
43:03
documentation and understand the
43:03
documentation and understand the different patterns and the different
43:06
different patterns and the different
43:06
different patterns and the different parameters that you can
43:07
parameters that you can
43:08
parameters that you can use and otherwise this is
43:11
use and otherwise this is
43:11
use and otherwise this is um this is it this is the gist of dapper
43:17
um this is it this is the gist of dapper
43:17
um this is it this is the gist of dapper workflows
43:21
and so thank you for your time friends
43:24
and so thank you for your time friends
43:24
and so thank you for your time friends and I suggest you go back in time and
43:27
and I suggest you go back in time and
43:27
and I suggest you go back in time and watch the other sessions that we have
43:29
watch the other sessions that we have
43:29
watch the other sessions that we have here in C TV this is session 10 I'm
43:34
here in C TV this is session 10 I'm
43:34
here in C TV this is session 10 I'm Rodrigo and see you next time
43:37
Rodrigo and see you next time
43:37
Rodrigo and see you next time [Music]
#Computers & Electronics