►
From YouTube: Elsa Workflows Community Meeting 12 ( 2022-06-07 )
Description
Meeting 12
Topics
- Liquid
- Elsa 3 updates
○ Activity execution events / workflow journal
○ Variables management
- Infinite loops
○ Detection
○ Workflow cancellation
§ https://github.com/elsa-workflows/elsa-core/issues/3093
A
Apparently
not
let
me
fix
that
all
right
topics-
there's
a
bunch
of
stuff
that
I
would
like
to
talk
about.
One
of
them
is
liquid.
I
think
it
was
chris
last
about
it
yeah
about
liquid
what
it
is
some
people
haven't
heard
of
it.
So
would
be
good
to
cover
that
briefly,
and
you
know
all
about
it
about
liquid,
just
a
little
elsa
3
updates.
I
don't.
B
A
B
A
B
A
Haven't
but
let's
take
this
opportunity
to
talk
about
the
the
infinite
loop
situation,
you
mentioned
all
right,
that's
good
agenda.
Let's
start
with
liquid,
that's
a
fun
one,
so
I
will
start
the
elsa
server.
So
we
have
something
to
look
at
and
it's
okay
if
it
takes
a
long
time
to
start,
because
my
brother
will
be
taking
his
time
to
edit
this
and
speed
it
up
for
the
recording.
I
I
changed
my
screen
resolution.
So
now
it's
all
weird,
all
right,
that's
one
and
and
I'm
looking
for
a
studio,
same
problem.
A
I
wonder
how
others
are
doing
it
when
they
record
their
screens
while
giving
demos-
maybe
they
they
have
all
of
the
ids
started
up
from
because
it's
it's
quite
sluggish
when
recording
is
happening.
A
B
A
A
A
A
Okay,
interesting
I'll
keep
an
eye
out
all
right.
So
back
to
the
issue
at
hand,
we
have
else
server
running.
We
have
nelson
dashboard
2.8.
So,
let's,
let's
take
a
look
at
the
at
what
is
liquid
as
a
brief
summary,
liquid
is
a
templating
syntax
that
you
can
compare
to
others
like
razer,
where
razer
is
also
a
templating
syntax.
That's
typically
used
to
create
html
views,
and
it's
it's
a
mixture
between
html
tags
and
c-sharp
code
for
vb
code.
I
think
they
at
some
point
supported.
A
I
don't
know
if
that's
still
the
case
and
there's
many
templates
in
template.
Syntaxes
like
handlebars
is
another
one
and
mustache
in
terms
of
syntax.
They
look
like
liquid
and
liquid
itself
was
created
by
shopify,
so
here
they
have
a
liquid
reference.
They
explain
what
is
a
template
language.
Well,
first,
let's
take
a
look
at
the
add
an
example
of
the
syntax.
So
here's
a
very
simple
example:
this
only
shows
the
liquid
syntax.
It
doesn't
show
any
text
surrounding
it.
Typically,
it's
used
with
html,
but
it
doesn't
have
to
be.
Of
course
it
could
be.
A
I
don't
know,
maybe
generating
a
markdown
document,
but
you
want
it
to
be
dynamically
created
based
on
some
data
model
that
you
use
as
an
input
to
your
markdown
template
where
you
use
liquid
filters
and
processors
or
entities
that
they
have
filters
and
tags,
that's
what
they
use
to
basically
replace
placeholders
or
liquid
entities
like
these.
Like
these.
This
is
a
thing
I
think
it's
a
it's
a
filter,
or
in
this
case
it's
it's
immediately,
inserting
a
variable
at
runtime.
A
So
it's
it's
a
way
to
generate
documents
like
what
you
do
with
razer
or
if
you
have
a
like
a
well.
If
you
use
shopify-
and
you
have
web
pages
that
you
create,
then
you
want
to
have
it-
render
your
products,
your
product,
catalog
dynamically
at
runtime.
So
that's
a
typical
use
case
for
liquid
stars,
handlebars
and
the
like.
Why
else
are
using
this
elsa,
as,
as
you
may
know,
and
send
email
activity
and
the
send
email
activity
has
a
body?
A
Let's
take
a
look
at
that,
so
let's
say
we
create
a
new
workflow
and
all
we
do
is
send
an
email
so
we'll
send
something
from
some
email
address
to
some
recipient.
So
here
we
have
a
subject.
This
could
be
a
static
field,
a
static
value,
for
example.
Something
like
this.
You
could
also
maybe
want
to
insert
a
dynamic
value,
maybe
based
on
some
workflow
variable
or
some
input
that
was
received
into
this
activity
like
a
product
title.
So
you
would
want
to
insert
that
so
there's
two
ways
to
do
that
out
of
the
box.
A
One
way
is
to
change
this
to
javascript,
so
you
could
say
something
like
hey
by
this
and
then
use
some
variable.
Let's
pretend
this
variable
exists
for
a
second,
and
in
this
way
we
are
using
javascript
string,
concatenation
or
some
string
building
to
to
return
so
for
small,
simple
strings.
This
is
fine.
A
So,
instead,
what
is
recommended
to
use
is
to
use
the
liquid
syntax
and
liquid
when
it's
evaluated,
it
always
returns
as
a
string.
So
that's
this
is
important.
When
you
use
javascript,
it
can
return
any
type
of
object.
So
in
this
case
it's
just
a
string
and
that's
supposed
to
happen
because
the
subject
input
field
of
this
activity
expects
a
string
but
other
fields
like
attachments.
A
They
don't
expect
strings.
They
expect
a
list
of
either
a
path
of
urls
or
a
stream
or
a
byte
array.
So
in
those
cases
you
cannot
use
liquid
because
liquids
always
return
strings,
but
you
can
use
javascript
because
in
javascript
you
can
actually
return
other
types
of
objects,
so
that's
an
important
distinction.
So
in
the
case
of
liquid
you
could
just
say
well
here
I
have
some
html
and
I
have
some
body
and
then
here
I
could
maybe
iterate
over
a
list
of
objects
so
using
the
liquid
syntax.
A
We
would
have
to
take
a
look
at
the
at
the
liquid
syntax
here.
This
is
the
documentation
for
liquids,
there's
a
different
page,
where
it's
more
convenient
to
look
at
to
have
a
quick
overview
of
the
of
the
filters
you
can
use
and
the
tags
yeah
that
this
is
the
one.
So,
for
example,
iteration
here
you
use
a
block,
so
we
could
copy
this
into
our
party.
So
let's
say
we
we
do
have
a
collection
variable.
A
Then
this
is
the
way
to
access
it
or
I
think
it's
variables
and
then
let's
imagine,
we
actually
have
a
variable
called
collection.
It's
an
object
that
has
a
property
of
products,
and
this
is
how
you
would
access
it.
There
is
also
documentation
about
liquid
syntax
used
in
elsa,
which
explains
how
to
access
variables.
A
So
if
you're
not
sure
you
can
always
go
to
documentation
website,
then
there
is
a
section
called
expressions
liquid
and
then
here,
for
example,
if
you
want
to
access
your
workflow
variable,
so
you
always
start
with
variables,
and
so
this
is
like
a
global
object
and
then
that
object
contains
your
workflow
variable.
So
this
would
be
the
way
to
access
your
variables
in
liquid
syntax.
That's
liquid,
in
a
nutshell,
very
handy
for
certain
use
cases
such
as
this
one,
all
right.
A
So
let's
go
over
the
lc3
updates
that
I've
been
working
on
for
the
past
week.
I
started
with
the
following
item:
let
me
look
it
up
the
workflow
journal
and
the
workflow
journal
is
we
have
it
in
elsa
too?
It
basically
displays
the
execution
log
records
that
were
created
by
activities
as
they
execute
and
in
lc2
they
emit
two
types
of
records.
One
is
the
executing
record
and
the
other
type
is
the
executed
record
and
then
those
two
types
are
used
to
compute
the
time
it
took
for
an
activity
to
execute.
A
A
You
would
see
the
time
it
took
for
each
activity
to
execute
for
individual
child
activities,
which
in
itself
is
useful,
but
it
becomes
hard
to
see
what
time
it
took
for
the
container
activity
to
execute
and,
of
course,
some
container
activities
could
have
blocking
activities
that
could
cause
the
workflow
to
be
suspended
for
minutes
hours
days
weeks
and,
ideally
from
the
warfare
journal.
You
would
be
able
to
see
that
also
too.
A
This
is
tricky
and
also
it's
much
easier
thanks
to
the
notion
of
activity,
events
or
signals,
and
in
elsa
three
we
have
two
of
those.
So
we
have
the
started
event
for
an
activity
and
the
completed
event
and
the
completed
event
is
triggered
when
a
activity
completes
so
for
small
activities
like
right
line,
read
line
etc
will
be
fast,
although
readline
could
be
very
slow
because
it
actually
requires
the
user
to
input
some
line
into
the
console.
A
Let's
take
a
look
at
that,
so
here
we
have
the
elsa
3
designer
and
I'm
going
to
show
one
of
the
workflow
instances
that
I've
been
testing
with,
so
don't
pay
attention
to
the
way
it
looks
right
now.
This
is
under
heavy
development.
So
it's
not
gonna
end
up
looking
like
this,
but
it
does
help
to
show
what
I
mean
so
first,
let's,
let's
take
a
look
at
the
workflow
itself.
So
here's
the
this
is
the
workflow.
A
Let's
move
this
away
for
a
second
and
it's
very
simple,
so
it
starts
with
a
rightline
activity
you
can
recognize
by
this
icon.
Then
it
executes
a
for
each
activity
in
the
four
each
iterates
over
this
set
of
items.
So
it
is
an
array
of
strings
so
for
each
item.
It
will
execute
its
body,
which
is
connected
to
another
writeline
which
will
simply
print
the
current
language.
So
this
is
a
variable
that
it
will
print
in.
A
This
variable
is
captured
from
this
activity,
we'll
get
to
that
in
a
minute
and
then,
when
this
activity
is
done,
it
will
print
the
text
done.
So
this
is
the
workflow.
So
I
have
executed
this
some
number
of
times
and
then
this
is
the
the
data
as
it's
recorded
in
the
database.
So
what
we
see
here
is
the
first
activity
is
the
flowchart
itself.
So
that's,
basically,
this
workflow
itself
is
a
flowchart
activity.
A
It
started,
but
as
you
can
see,
that
there's
no
end
it
right
here
we
have
to
scroll
all
the
way
to
the
bottom,
to
see
that
it's
completed
and
using
this
information
we
can
tell
what
time
it
took
for
the
overall
workflow
to
complete
and,
of
course,
for
each
child
activity.
We
can
do
the
same.
So
then
brightline
one
started:
that's
this
activity
in
brightline
one.
It
started
at
second
26.
It
completed
22nd
26,
which
makes
sense.
A
Then
the
four
e's
activity
started,
and
then
these
four
eats
then
of
course
iterates
over
each
item
in
its
list
and
then
the
only
activity
in
its
body
is
this
right
line
here.
So
we
see
that
here
execute
it
completed,
then
the
second
iteration
third
iteration
and
the
fourth
iteration
and
then
the
four.
A
Now
these
individual
records
are
what
I
want
to
do,
instead
of
displaying
it
them
as
individual
events.
I
want
to
basically
combine
them
into
a
single
card
if
you
will
in
this
list,
so
that
you
can
have
a
at
a
quick
glance,
see
the
overview
of
the
of
the
the
root
activities.
If
you
will
so
that's
start
for
each
and
done
that's
those
three
cards,
you
would
see
in
the
workflow
journal,
but
then
you
could
drill
into
each
card
if
you
will
so,
for
example,
the
for
each
activity.
A
If
you
expand
it,
it
would
show
the
iterations,
so
maybe
it
would
have
three
or
four
cards
called
iteration
one
through
four
or
zero
through
three.
If
it's
zero-based
and
then
you
can
expand
those.
So
this
way
it
should
be
a
little
bit
easier
to
look
at
the
workflow,
but
we'll
see
I'm
experimenting
with
this
yeah.
So
this
is
a
work
in
progress.
A
The
workflow
journal,
another
improvement
compared
to
ls2
is
that
this
journal
will
be
loaded
in
pages
and
also
to
the
entire
journal
is
loaded
in
one
call,
which
is
fine
for
small
workflow
executions,
but
a
big
problem.
If
you
have
a
workflow
that
executes
for
a
long
time,
especially
if
you
have
looping
and
branching
back
into
previously
executed
activities
generating
a
lot
of
execution
lock
records,
you
can
imagine
loading
all
of
this
data.
When
you
look
at
the
workflow
instance,
freeward
can
take
some
time.
That's
not
good!
A
B
A
The
workflow
journal
for
now
I've
also
been
working
on
variable
management,
and
this
is
completely
different
compared
to
elsa
2
in
a
few
important
ways.
So
let
me
load
the
workflow
here
and
let's,
let's
go
through
this
workflow
again,
there's
something
important
going
on
here
and
actually,
let's
take
a
look
at
the
print
current
language
activity.
As
you
can
see
the
input
it
uses
javascript
and
it
builds
a
string
based
on
something
called
current
language.
So
this
is
a
variable,
and
this
variable
is
a
workflow
variable
and
to
create
workflow
variables.
A
You
click
somewhere
on
the
canvas,
selecting
the
workflow
effect
effectively.
So
here
you
can
see
that
the
for
each
demo
workflow
is
selected.
It's
a
workflow
definition,
which
itself,
of
course
has
properties,
like
definition,
id
version
d,
the
version
its
publication
status,
some
labels
etc.
So
it
also
has
a
new
tab
called
variables,
and
this
is
where
you
manage
variables.
You
can
add,
as
many
as
you
like,
you
give
them
a
name,
a
type,
a
default
value,
that's
optional
and
storage,
but
we'll
get
into
that
in
a
second.
A
Another
variable
called
current
language
of
type
string,
so
this
now
exists
in
my
workflow
and
here
I'm
using
that.
But,
of
course,
what
we
want
to
display
is
the
current
value
of
the
for
each
activity
so
for
each
item
in
its
list,
the
first
iteration
the
value
will
be
c,
sharp,
javascript,
etc.
The
way
to
capture
the
current
value
being
iterated
on
is
through
the
output
tab,
so
activities
can
have
input
activities.
A
They
are
like
input
arguments
of
a
function
if
you
will
and
they
can
have
output
properties
which
are
analogous
to
the
return
value
of
a
function.
So
the
for
each
activity
has
a
single
output
property
called
current
value
in
lsat
2.
To
capture
this
value,
you
would
either
reference
the
activity
directly
from,
for
example,
this
rightline
activity
to
get
the
current
value
or
you
would
set
it
into
a
workflow
variable
using
the
set
variable
activity,
but
in
elsa
3
you
don't
need
that
activity
for
this
scenario.
A
B
A
B
A
Will
have
access
to
the
current
value
of
this
for
each
activity.
So
that's
what
we
see
here
here
is
being
used.
So
another
important
change
with
ls3
is
the
is
the
the
storage
mechanism
of
activity,
input
and
output
in
elsa
2?
All
activity,
input
and
output
would
be
stored
by
default
as
part
of
the
workflow
instance
document,
which,
on
the
one
hand,
is
convenient
because
everything
is
stored.
A
That
would
just
basically
break
your
workflow
instance
as
it
is
today
in
order
to
work
around
that
we
have
to
mark
the
output
properties
to
use
transient
storage.
So
that
means
it
only
exists
briefly
in
memory,
and
this
then
affects
all
subsequent
activities
that
use
this
value.
We
have
to
make
sure
that
all
of
these
properties
are
using
a
transient
storage
provider
in
ls3.
Everything
is
transient
by
default,
so
that
means
all
activity.
Input
output
only
exists
while
the
activity
executes
and
when
its
child
activity
executes.
So
as
long
as.
B
A
Activity
has
child
activities
executing
the
parent
activity
execution
context.
They
exist
in
memory,
but
as
soon
as
that's
done,
the
output
is
gone
as
well.
Of
course,
whenever
an
activity
executes
its
input
is
re-evaluated.
So
this
would.
This
is
already
persistent
as
part
of
the
input
property
of
the
activity,
so
that's
persisted
as
part
of
the
workflow
definition,
but
at
runtime
in
the
workflow
instance
that
information
gets
lost
and
if
you
don't
want
that
to
get
lost.
For
example,
you
want
to
store
some
output
of
some
activity
for
the
duration
of
the
workflow.
A
You
can
capture
it
using
a
variable,
but
variables
by
default
are
also
stored
transiently.
So
you
have
to
configure
your
variables
in
a
way
and
that's
where
the
storage
field
comes
in
again,
the
reason
for
the
transient
by
default
is
to
avoid
situations
where
you
accidentally
capture
some
object
that
gets
serialized
as
part
of
the
workflow
instance
document,
which
is
not
serializable
or
de-serializable,
causing
issues.
A
For
that
matter,
that's
flexible
and
that's
here
as
well,
but
here
in
ls3
you
configure
this
storage
mechanism
on
the
variable,
the
workflow
variable
level,
which
I
think
simplifies
it
a
little
bit
yeah.
So
workflow
here
store
the
output
or
the
variable
value
as
part
of
the
workflow
document.
There's
no
blob
source
yet,
but
this
is
an
extensible
mechanism
so
to
see
how
this
works.
Let
me
open
postman
here.
I
have
an
api
request
prepared,
so
this
execute
endpoint
lets
me
execute
a
workflow
that
I
created
so
the
way
it
works.
A
I
have
some
well
the
the
url
to
my
asp.net
core
server,
some
endpoint
path
or
for
definitions,
the
id,
the
definition
id
of
the
workflow
and
the
executes
command
here.
So,
in
this
case
the
workflow
definition
id
is
this
value,
so
we
can
copy
this.
This
was
already
the
same
value
and
then,
when
I
hit
send
it
executed
and
it
returned
the
workflow
state
in
the
workflow
state.
This
is
a
representation
of
the
workflow
instance,
but
just
the
most
basic
information.
A
The
workflow
instance
object
itself
lives
in
a
separate
layer
in
the
persistence
layer
and
it
has
more
data.
But
this
this
is
the
workflow
runtime
state.
If
you
will
and
as
you
can
see,
it
has
a
field
called
persistent
variables
and
this
just
stores
what
variables
were
captured
that
were
configured
to
use
a
storage
mechanism
and
then
because
we
use
the
workflow
storage
provider,
that
provider
uses
the
same
workflow
state
object
and
then
adds
a
custom
property
of
with
this
name
and
then
some
the
latest
value.
A
In
this
case
it
makes
sense
it's
ruby,
because
ruby
was
the
last
value
iterated.
So
that
means
the
its
output.
Lastly,
was
group
and
that's
the
last
value
stored
for
this
simple
workflow.
Of
course,
it's
not
necessary
to
persist
the
current
language
variable,
so
we
can
just
change
it
to
not
use
storage
and
if
we
publish
this
and
then
execute
again,
then
we
see
this
is
a
bug.
It
should
not
have
displayed
anything
because
the
storage
drive
ready
is
null.
B
A
Here
it's
captured
the
display
text,
so
that's
a
little
bug
I
will
fix,
but
when
that
that
is
fixed,
this
should
be
empty,
and
that
means
this
variable
will
not
be
stored
anywhere
and
that's
okay
for
this
particular
workflow,
but
for
long
running
workflows.
If
we
had
maybe
some
http
endpoint
at
some
point
like
here,
then
this
would
be
blocking
and
then
we
would
resume
interesting.
I
will
check
that
later.
A
So,
as
I
was
saying,
let's
say
if
it's
resumed
at
some
point
when
an
hp
request
comes
in
at
this
point,
when
this
resumes
the
variable
would
be
empty,
which
may
or
may
not
be
desirable.
Probably
in
this
case
it
will
not
be
desirable.
So
it's
important
for
that
variable
to
be
persistent,
like
this
all
right,
moving
right
along
infinite
loops.
So
what
is
an
infinite
loop?
A
That's
in
c-sharp
terms
could
be
a
while
loop,
with
a
condition
of
true
that
the
always
evaluates
to
true
and
if
there's
no
return
or
break
statement
inside
of
that
loop,
you
will
basically
melt
your
cpu
and
your
program
will
execute
forever
until
you
kill
it
forcibly
and
in
workflows.
You
can
set
up
the
same
situation
so,
for
example,
there
is
a
four
activity
I
haven't
exposed
it
here,
but
imagine
that
this
is
a
for
loop
and
the
input
condition
is
set
to
true.
Then
it
will
always
execute.
A
So
that's
one
way
to
create
a
loop.
Actually,
let's,
let's
do
it
in
lc2.
Actually,
let's
use
the
while
it's
better.
So
here
we
say
true
and
then
we
say
hello.
So
when
this
workflow
executes
this
will
run
forever
and
we
can
we
can
risk
trying
it.
Let's
see
how
my
computer
holds
up,
but
let
me
be
at
ready
to
hit
the
stop
button
here.
I'm
now
gonna.
A
Actually,
let
me
just
introduce
a
little
timer,
just
a
small
delay
so
that
I
don't
freeze
the
computer,
so
this
workflow
will
loop
forever,
so
it
will
for
every
iteration
write
something
to
the
console.
Wait
one
second,
and
since
this
is
the
last
activity
in
the
iterate
prints,
the
control
flow
will
go
back
to
while
and
then
execute
the
next
iteration
and
so
forth.
So
let's
give
this
a
quick
name,
publish
this
one,
and
now
we
will
execute
it.
A
So,
as
you
can
see,
it's
printing
hello
every
second
and
it's
never
gonna
stop
so
here,
of
course,
I
did
it
intentionally
full
well,
knowing
what
I'm
doing,
but
it's
also
possible
that
you
do
this
by
accident
and
this
could
be
disastrous,
especially
if
you're
changing
workflows
at
runtime
in
a
production
environment.
If
you're
not
careful,
it's
easy
to
create
an
infinite
loop,
it
happened
to
me
once
maybe
twice,
and
that
was
a
big
issue.
The
entire
server
would
become
unresponsive
to
other
requests.
So
it's
a
big
problem.
A
One
way
to
deal
with
that
is
to
configure
a
infinite
loop
detection
strategy
in
elsa.
There's
one
out
of
the
box
that
I
will
show
first.
Let
me
stop
this.
So
here's
a
sample
project
in
the
samples
folder
underneath
asp.net-
and
this
is
another
example
of
an
infinite
looping
workflow.
So
it's
it
basically
does
the
same
thing
forever.
It
will
set
a
variable
increase
the
count,
and
then
this
should
never
execute.
So
here
what
we
see
in
the
startup,
we
have
a.
We
can
configure
a
cooldown
loop
handler
options.
Oh
to
configure
it.
A
We
do
it
right
here,
okay,
so
we
have
a
loop
detector.
So
that's
a
strategy
to
detect
workflow
looping,
because
for
some
scenarios
maybe
you
do
want
to
iterate
a
thousand
times
and
not
have
elsa,
detect
a
infinite
loop
situation,
so
you
may
want
to
either
not
install
it
or
or
install
it,
but
maybe
cause
the
workflow
to
cool
down,
stop
execution
after
1500
executions
as
an
example.
So
the
first
thing
to
do
is
to
install
the
loop
detector
here.
So
here
we
have
an
activity.
A
Excuse
account
loop,
detector,
which
is
built
in,
I
think
yeah,
it's
part
of
core
and
the
way
it
works
it.
It
basically
counts
the
number
of
times
a
given
activity
executes.
So
for
each
activity
executing
it
looks
up
the
id
and
then
increases
the
count
and
then,
if
it
reaches
some
threshold,
so
the
max
execution
count
which
is
configurable.
It
will
return
true.
So.
B
A
Then
the
outer
code
that
invokes
this
will
do
something
with
that.
That's
the
default
loop
handler.
So
that's
basically
saying
in
case
a
infinite
loop
is
detected.
How
do
you
want
to
handle
it
so
here
there's
a
thing
called
a
cool
downloop
handler,
which
is
also
built
in
and
so
okay.
So
the
way
this
works
is
it
does
two
things.
First,
it
checks.
If
the
cooldown
events
execution
count
reaches
a
certain
threshold,
then
it
will
throw
an
exception.
A
Ending
your
workflow,
so
your
workflow
will
enter
a
vaulted
state,
but
as
long
as
it
doesn't
reach
this
threshold,
it
will
induce
a
cooldown
period
of
a
configurable
amount
of
time.
So,
for
example,
this
could
be
10
seconds,
even
if
you
are
in
an
infinite
tight
loop
after
let's
say
100
cycles.
If
that's
what
it
is,
that's
how
it's
configured
it
will
just
stop
executing
for
a
minute
if
that's
what's
configured
and
then
it
will
try
again.
A
So
these
are
some
default
strategies
that
can
be
installed
and,
of
course,
you
can
install
your
own
logic,
all
right
so
in
in
this
code.
Here
is
actually
configuring
that
cooldown
loop
handler.
So
here
I'm
saying
I
want
to
use
this
handler.
This
cooldown
loop
handler
injects
a
eye
options
of
cooldown
loop,
handler
options
which
you
can
configure
like
this.
I'm
allowing
my
maximum
cooldown
maximum
number
of
cooldown
gains
for
three,
and
then
I
want
to
cool
down
for
seven
seconds.
So
this
is
one
strategy
to
deal
with
infinite
loops,
very
important
in
production
environments.
A
Another
way
that
doesn't
exist
today,
but
that
would
be
to
allow
a
user
a
developer,
somebody
who
has
access
to
the
dashboard
to
cancel
the
workflow
all
together.
Now
there
is
a
api
endpoint
that
lets
you
cancel
workflow
instances.
The
current
implementation
only
changes
the
status
from
suspended
or
running
or
whatever
the
state
may
be,
to
cancel
so
that
the
workflow
instance
will
not
be
resumed
anymore.
A
But
this
does
not
impact
actively
executing
workflow
instances,
so,
as
a
workflow
instance
executes,
there's
no
way
currently
to
cancel
it
other
than
killing
the
server
or
the
application
on
the
server.
But
what
I
want
to
do
is
change
that
so
that,
even
if
you
invoke
cancel
on
a
currently
executing
workflow
instance,
that
workflow
instance
will
stop
executing,
which
is
very
useful
in
case
it
is
in
a
tight
loop
in
production,
you're
panicking,
and
you
want
to
just
stop
that
particular
workflow
instance.
This
cancel
method
should
work
for
you
once
it's
implemented.
A
B
A
B
A
A
Yeah
that
makes
sense
yeah
and
that's
what
this
issue
is
about.
So
somebody
raised
this
in
this
discussion
where
they
ask
how
to
cancel
our
workplaces,
that
is
in
a
loop.
So
it
sounds
like
similar
to
your
scenario
so
yeah
it
doesn't
work
today,
but
we
need
to
make
that
work,
and
here
I
propose
a
way
to
do
so.
Oh
actually,
this
is
not
my
text,
I
think
no,
I
just
reference
it.
I
should
update
this
with
a
proposal
of
how
to
implement
it.
B
A
A
So
that's
all
from
my
end
as
well.
Thank
you
for
watching
and
we'll
see
you
next
time.