►
From YouTube: Elsa Workflows Community Meeting 26
Description
Updates
- Composite activity input/output
- Child workflow
- Fixed deadlock
A
All
right,
so
a
couple
of
updates.
Basically
since
last
week,
since
the
demo,
where
we
run
into
a
few
limitations
and
issues
I've
been
working
on
those,
let
me
walk
you
through
it.
So,
let's
start
with
workflows
as
activities
and
I
will
continue
with
the
running
Workshop
workflow
and
then
we'll
go
through
the
bugs
okay,
so
I
got
two
solutions:
open
one
is
the
workflow
server,
the
other
one,
the
designer
both
are
starting,
let's
sign
into
designer,
and
then
last
week
we
talked
about
input
and
output.
A
B
A
Results
so
then
this
is
like
a
reusable
composite
activity
created
using
the
designer,
and
the
first
thing
you
need
to
do
in
order
to
make
a
workflow
usable
as
an
activity
is
to
enable
the
setting
here
usable
as
activity
needs
to
be
set
to.
Yes,
then
we
declare
two
inputs
value,
a
and
B
with
one
outputs
called
sum,
and
then
we
will
do
the
calculation
using
the
JavaScript
activity,
so
we'll
return,
get
value,
a
plus
gets
value
B
and
then
we'll
assign
the
output
directly
to
the
sum
output.
A
So
its
output
will
directly
be
assigned
to
the
output
of
this
composite
activity.
We'll
publish
this
we
upon
publishing,
we'll
see
the
composite
activity
appear
in
the
activity
picker.
So
now
we
can
create
a
new
workflow.
So
here
we
have
a
new
workflow
and
we'll
use
this
activity
here
and
then
we
can
configure
its
inputs,
so
we
redefined
two
inputs
A
and
B.
So
this
would
be
five
and
seven,
for
example,
and
then
this
is
the
output
we
defined
and
this
one
we
need
to
capture
using
a
variable.
A
So,
let's
create
one
we'll
call
it
the
sum
and
then
we'll
assign
the
output
to
that
new
variable.
The
sub
like
that
in
other,
we
have
this
variable.
We
can
do
something
with
it,
like
writing
it
to
the
HP
response.
So
let's
use
liquids.
We
could
also
use
JavaScript
doesn't
matter,
but
here
we
are
going
to
use
liquids
and
then,
in
order
to
access
workflow
variables
using
liquids
to
access
the
variables
object,
and
then
the
variable
name
like
this-
like
this
all
right.
A
So
let's
publish
this
workflow
and
capture
the
definition
ID
and
then
we'll
run
it
using
folks
man.
So
here
we
have
the
execute
endpoint
of
wherefore
definitions
here,
we'll
paste
in
the
definition
ID.
We
can
ignore
the
input,
that's
just
an
experiment.
All
right
now,
when
I
hit
send,
we
see
the
output
results
12.
A
so
that
entire
thing
worked.
So
that's
the
that's
one
way
to
reduce
output
from
a
composite
activity.
What
I
did
here
was
bind
the
output
of
the
JavaScript
activity
directly
to
the
output
of
the
composite
activity,
but
I
also
added
a
new
activity
called
set.
Workflow
output
to
this.
To
do
that
explicitly,
and
that
might
be
useful
in
case
you
want
to
get
get
some
value
from
someplace
else.
That's
not
made
available
through
an
output
of
of
another
activity.
Maybe
it's
a
hard-coded
value,
or
maybe
just
an
expression
directly
here
in
the
output
value.
A
That's
also
a
possibility,
whatever
the
case
may
be.
We
can
use
this
one
as
well
to
set
the
output,
so
we
can
select
the
output
from
this
field
here
and
then
here
we
Define
the
output.
So
let's
say
we
return.
42.
I'll
connect
these
together
so
that
the
software
flow
just
executes.
But
this
even
though
this
is
set
to
the
output,
this
should
be
overridden
when
this
activity
executes
next.
A
So
let's
see
that
it
works
as
well,
so
we'll
publish
this
one
and
then
we
need
to
also
update
the
workflow
using
this
thing,
because
currently
it's
using
version
one,
but
we
just
made
an
update
to
the
sum
composite
activity,
which
is
now
at
version
two
and
we
could
consider
updating,
usages
or
activity
instances
on
workflows
automatically.
It
can
because
it
can
be
dangerous
because
you
could
be
changing
behavior
that
you
may
want
to
test
in
different
workflows.
It's
it's
I,
think
it's
better
for
the
user.
A
For
this
to
be
an
explicit
action
and
of
course
we
can
create
some
tooling
to
automate
that
task,
but
but
for
now,
in
this
initial
version
you
will
have
to
go
into
your
workflow
definitions
that
use
your
composite
activities
and
then
manually
upgrades.
So
now
it's
upgraded
and
then,
when
you
upgrade,
you
basically
change
the
setting
on
the
activity,
which
means
you
changed
the
workflow
and
whenever
you
make
a
change
to
the
workflow,
it
will
create
a
draft
if
there
isn't
already
a
draft
so
make
sure
to
publish
this
change
as
well.
A
Alright,
so
now
it's
published
now
when
we
execute
it
should
I
would
expect
42
as
a
result.
But
clearly
that
didn't
happen
so
either
I
introduce
the
bug
today
or
or
maybe
it
was
there
before.
I
will
look
into
that.
Just
let's.
Let
me
quickly
double
check
a
few
things,
so
here
we
do
set
up
to
some
return,
this
value.
A
Let
me
just
clear
this
out:
maybe
there's
some
something
going
on
here,
where
the
output
of
the
previous
activity
isn't
of
written
by
this
one,
for
whatever
reason,
but
I
will
figure
that
out,
but
I
will
try
just
Again
by
after
updating
this
version
again.
Here
we
do
publish,
and
now
it
works
okay,
so
we
found
a
new
book,
but
that's
okay,
I'll
fix
it.
Alright,
so
I
also
wanted
to
show
this
versioning
system.
That's
that
that
works
the
way
it
works
right
now,
but
as
I
mentioned,
we
want
to
make
it
easier
in
future.
A
Iterations
and
one
important
thing
is,
is
visual
indication
so
without
knowing
about
this
system,
new
users
wouldn't
be
aware
of
it.
So
one
idea
I
have
is
to
show
little
little
bats
if
you
will
little
beds
with
maybe
an
exclamation
mark
or
something
like
that,
something
to
draw
your
attention
so
that
you
can
click
on
it
and
then
show
the
same
beds
on
the
version
tab.
A
So
you
know
how
to
click
on
it
and
then
then
you,
you
should
see,
what's
what's
expected
from
you
to
do,
but
this
also
ties
a
little
bit
into
the
holistic
validation
story
that
that
I
have
in
mind
as
well.
That
is
producing
output
from
composite
activities,
but
it
also
works
if
you
are
just
creating
a
child
workflow
and
you
invoke
it
as
a
as
a
workflow
and
not
as
an
activity
like
like
I've
been
doing
here.
A
So
let
me
show
that
as
well
for
that
I'll
create
two
new
workflows,
one
would
be
the
child
workflow
and
then
a
parent
workflow
running
the
child
workflow.
So,
let's
start
with
the
child's
workflow
first
and
this
child
workflow
will
just
use
some
outputs,
which
we'll
Define
here
we'll
call
it
output
1.
It
will
be
a
string.
Actually,
let's
call
this
a
message,
so
this
child
workflow
will
return
a
message
so
we'll
assign
a
value
to
this
output.
A
We'll
say
hello:
we
publish
this
workflow
and
now
we'll
create
a
parent
workflow
which
we'll
call
and
workflow
we'll
create
a
variable
to
capture
the
output
from
the
child
workflow.
So
we'll
call
that
child
output,
which
is
of
type
object
because
workflows
when
they
return
an
output-
that's
always
a
dictionary
of
outputs
and
one
entry
in
this.
This
output
will
be
the
message
as
we'll
see.
So
let's
do
something
with
that
result.
First,
we
need
to
invoke
the
child
workflow,
so
we'll
set
it
to
child
workflow.
A
That's
the
workflow
definition
asked
for
here
here
we
get
the
results.
This
will
be.
This
is
an
object
which
will
be
an
Dynamic
object
like
an
expander
object,
so,
let's
print
it
out
to
the
console,
so
here
I
had
a
right
line.
Activity
one
thing
I
forgot
is
that
whenever
you
dispatch
a
workflow
by
default,
it
will
not
wait
for
completion.
You
need
to
explicitly
check
wait
for
completion.
B
A
That's
that's
not
a
bad
idea
actually
to
visually
indicate
that
an
activity
will
be
blocking
or
not.
That's
certainly,
a
possibility
published
workflow
is
hanging
that
had
to
do
with
basically
a
deadlock
situation,
and
the
same
goes
for
for
this
issue,
where
we
try
to
start
at
two
two
triggers
to
the
workflow
and
it's
following
their
own
path.
When
we
try
it,
it
kept
spinning
the
postman
progress
indicators
kept
spinning,
and
that
was
because
of
a
deadlock
that
I
have
fixed,
which
means
if
we
now
create
a
new
workflow
and,
let's
add
two
endpoints.
A
So
let's
go
this
one
route,
one
this
one
route
two
and
then
we'll
do
a
response.
So
this
one
will
go
into
this
activity
in
this
one
into
this
one,
and
here
we'll
write
route.
One,
and
here
we'll
save
Route
2,
alright.
So
now
we
should
be
able
to
try
and
access
this
one.
There
are,
maybe
the
the
10th
time
that
I
just
forget
to
set
these
activities
to
can
start
workflows.
So
this
is
route
one
works
and
then
Route
2
works
as
well.
So
that's
that
scenarios
fully
supported
having
multiple
triggers.
A
Of
course,
this
will
create
two
separate
workflow
instances.
One
will
go
through
this
and
that
that's
a
start
to
end
workflow
instance
and
this
one
created
a
separate
work
lenses
as
well.
So
that's
this
one
and
this
one
how
this
workflow
is
hanging
so
that
had
to
do
with
the
event
and
publish
event
activities.
So
if
you
remember
I
think
it
was.
You
asked
the
question:
what
happens
if
your
child
workflow
starts
with
a
a
blocking
activity?
Yeah?
A
So
let's
see
what
happens,
let's
say
we
use
the
sum
and
we'll
start
this
one
with
an
event
and
we'll
call
this.
The
I
will
name
this
event
begin
some.
So
what
should
happen
when
this
activity
executes
it
will
encounter
this
activity,
which
would
then
create
a
bookmark
and
suspend
execution
of
this
path,
and
then
only
once
we
trigger
the
system.
With
this
event,
should
this
one
resume
right
so
we'll
we
publish
these
chains
and
now
we'll
go
back
to
this
workflow
here,
which
uses
the
sample
updated
to
the
latest
version
like
this.
A
Always
this
one
and
now
we'll
see
what
happens
when
we
execute
this
workflow
so
we'll
hit
send.
We
have
an
instance
ID
and
in
the
console
out,
we
shouldn't
see
what's
interesting
information
and
we
should
see
the
workflow
instance
being
running.
So
if
we
look
at
the
details
here
and
we
look
at
the
journal,
we
see
that
the
workflow
started
this
flowchart
started
and
some
has
started,
but
it's
not
finished
it
started.
None
of
these
are
finished,
so
we're
basically
blocked
here.
So
we're
gonna
trigger
this,
this
one
to
Json
and
provide
some
empty
object.
A
This
is
because
of
a
recent
update
to
fast
endpoints
library.
Now
it
requires
you
to
at
least
send
the
content
type
and,
and
when
you
do,
you
need
to
provide
a
valid
Json
object
all
right.
So
this
received
an
okay.
This
one.
We
try
to
write
an
HP
response
which
obviously
it's
not
going
to
work
and
the
reason
it's
not
going
to
work
because
it's
using
dispenser,
which
internally
uses
a
service
bus.
Let
me
just
change
the
activity
for
a
right
line,
so
we
can
see
that
it
just
works
all
right.
A
Sending
this
one
again,
not
this
one.
We
should
first
start
the
workflow
start
it,
and
now
we
will
trigger
the
events.
Then
we
should
see
in
the
in
the
console
the
sum
which
we
see
here.
The
sum
is
42
and
then,
of
course,
we
should
see
the
workflow
instance
being
finished
with
all
the
events
here.
So
we
see
all
of
these
activities
have
completed
I,
just
demoed
how
events
were,
but
not
how
to
publish
the
events
from
a
workflow.
A
Let's
do
that
as
well,
so
here
what
we
could
do
is
because
we
know
sum
as
an
event
and
that,
in
order
to
resume
that
event,
we
need
to
publish
an
event,
so
we
should
be
able
to
do
something
like
this.
Let's
say
we
have
a
start
node,
which
is
just
a
starting
Milestone.
It
doesn't
do
anything,
it
doesn't
have
any
actual
functionality,
but
it
allows
us
to
do
a
a
fork.
So
what
we
could
do
is
do
it
like
this.
A
We
will
introduce
a
small
delay
here,
so
what
this
will
do
is
will
it
will
schedule
both
activities
and
because
we
don't
know
what
it
if
this
one
is
going
to
be
executed
first
or
this
one?
So
I
will
do
a
small
delay
here,
let's
say
of
just
one
second
unblocking
and
then
from
here
we'll,
because
we
know
this
one
will
be
blocking
because
internally,
it
will
be
waiting
for
that
event.
We'll
publish
that
event,
so
we
use
the
publish
event
activity
like
this
and
the
event
name
was.
A
We
can
sum,
but
yeah
so
like
that
and
then
then
nothing
so.
This
will
just
publish
the
event
and
that
will
then
resume
this
activity,
which
will
then
ultimately
resume
this
one
so
effectively.
It
means
as
soon
as
we
start
the
workflow
one
second
later,
because
this
has
a
delay
of
one
second,
we
should
see
this
right
line
executing
the
sum.
So
let's
keep
an
eye
out
on
the
console
and
let
me
change
the
lock
level
to
warning
again
so
that
it's
not
as
noisy
all
right,
so
go
back
to
the
execute
endpoint
we'll.
A
Let's
just
make
sure
we
have
the
right
definition
ID,
which
I
think
we
have
yeah:
okay,
I
click,
Send
and
then
I'll
switch
quickly
to
the
console
here.
After
about
a
second,
we
indeed
see
the
sum
is
42,
so
we
didn't
have
to
manually
publish
the
event,
because
we
did
that
from
the
workflow
and,
of
course,
this
publish
event
can
be
invoked
from
any
workflow
and
it
will
affect
all
workflow
definitions
and
instances
that
are
either.
You
know
where
the
event
is
used
as
a
trigger
or
as
a
blocking
activity.
B
Very,
very
nice
and
interesting
and
I
think
it
opens
the
possibility
to
build
a
workflow
Library,
reusable
Library,
especially
with
love
that
we
can
pass
inputs
and
outputs
to
the
user.
Workflows
I
think
there
are
many
use
cases
where,
for
example,
we
are
building
certain
calculations
that
we
need
to
use
multiple
times
and
we
just
need
to
reuse
it
in
several
places
and
maybe
once
the
logic
is
changed,
we
can
keep
adding
it.
So
it's
it
really
helps
to
start
building
this
kind
of
library
of
workflows
that
are
reusable
redistributable.
B
B
But
if
you
see
it
visually
in
a
nice
representation
in
this
workflow-
and
you
can
evolve
it
over
time,
if
you
start
adding
some
new
conditions,
some
new
Logics
and
to
be
able
to
reuse
that
and
build
very
complex
workflows
on
top
of
it,
it's
really
powerful.
It
can
involve
the
you
know
organic
way
and
everybody
will
be
able
to
use
it,
not
just
the
developers
who
are
able
to
do
the
coding,
but
it
has
really
come
a
long
way
and
it's
in
a
very
good
shape.
As
you
can
see
that
yeah.
A
B
Be
really
interesting
because
I
have
seen
some
Consultants
who,
just
you
know,
spend
a
lot
of
time.
Building
these
vpnn.
You
know
the
designs,
but
at
the
end
of
the
day
it's
not
acceptable
until
you
convert
it
to
some
applications.
So
if
you
can
just
import
that
convert
it
to
a
workflow,
then
it's
it's
a
big
win.