►
From YouTube: Elsa Workflows Community Meeting 18 ( 2022-07-12)
Description
Meeting 18
Topics
- Updates
○ Activity Definitions
○ API endpoints
- Transient data/storage
- Parallel flowchart flow
Notes
- Reconsider using Input/Output variables for custom activity definitions
○ Users should be able to configure input attributes like supported syntax etc.
Bug with storage provider API
A
A
It
required
a
bit
of
refactoring
to
make
things
more
modular
from
the
designer's
point
of
view,
so
that
I
can
reuse
the
designer,
for
example,
there's
that
I've
also
been
working
on
making
the
apis
more
modular
specifically
when
it
comes
to
customizing
the
authorization
using
policies
and
permissions
and
claims,
and
I
think
I
want
to
show
you
a
little
bit
of
what
I'm
using
there
just
to
get
your
opinion
on
on
the
direction
and,
of
course,
if
anyone
has
any
additional
topics
they
would
like
to
discuss.
Let
me
know.
C
C
I'm
trying
to
I'm
having
an
workflow
which
handles
a
big
blob
of
data,
and
I
have
to
do
it
in
different
activities
to
handle
it.
But
now
the
whole
activity
data
in
the
workflow
instance
gets
too
big.
While
I
really
don't
need
it
because,
as
I
looked
into
the
documentation,
it
said
transient
is
yeah
store
it,
but
don't
cry
if
it
gets
lost.
When
something
happens,
and
that's
fine
for
me,
but
I
can't
get
it
to
work
that
the
data
is
getting
minimized
or
less
as
big.
C
I've
been
looking
into
the
discussion
of
last
week
with
parallel
didn't
come
to
the
final
conclusions.
I
looked
into
another
engine,
kamunda
and
bpmn,
how
they
do
it
yeah.
I
think
we
you
can't
escape
having
explicit
fork
and
join,
make
it
all
happen.
Okay,.
A
Yeah
sure
all
right,
so
let
me
start
with
the
api
endpoints.
So
as
part
of
this
new
feature
that
I'm
working
on
with
the
custom
activities,
it
needs
its
own
little
back
end,
I'm
implementing
it
as
a
separate
module.
So
just
to
show
you
here,
there's
the
modules
and
then
here's
the
custom
activities
module
and
it
has
a
bunch
of
endpoints
to
manage
activity,
definitions
and
an
activity.
Definition
is
like
a
workflow
definition,
where
it
stores
activities
and
connections
between
them.
A
So
it's
at
the
root,
it's
a
flowchart,
and
for
that
you
need
to
be
able
to
persist,
work
for
definition,
activity,
definitions
and
read
them
of
course,
and
update
them.
But
the
tricky
part
that
we
have
with
lsat
2
is
how
do
we
allow
users
of
the
elsa
library
to
control
authorization
and
authentication?
A
At
the
same
time,
we
need
to
allow
users
to
to
make
customizations.
So
what
I
found
was
a
little
library
called
fast
endpoints,
and
then
you
ask
what
is
fast
endpoints,
that
is
a
lightweight
rest.
Api
framework
for
a
spin
at
six,
and
the
nice
thing
about
this
is
that
it
literally
lets
you
implement
endpoints
in
the
most
simplest
of
ways.
So
I've
already
started
this
pattern
with
the
existing
api
endpoints.
So
here,
for
example,
we
have
not
this
one,
that's
a
wrong
example.
Here,
for
example,
we
have
the
workflow
definitions,
endpoints
and
each
class.
A
Here
is
a
controller,
but
the
pattern
I'm
employing
here
is
every
controller
represents
a
single
endpoint.
So
that
means
every
controller
has
a
single
action
and
that
works
fine.
But
in
order
to
implement
things
like
authorization
using
policies
or
role
names,
one
has
to
use
the
authorized
attributes,
but
this
of
course,
is
very
static.
A
To
give
that
level
of
flexibility,
but
at
the
very
least
we
need
to
provide
some
security
mechanisms.
The
fast
end
point
allows
us
to
do
it
a
little
bit
differently
more
dynamically
and
also
the
fact
that
it
implements
this
pattern
where
you
have
one
action
per
endpoint
is
what
I
really
like.
So
what
does
that
look
like
so,
for
example,
here
we
have
a
resource
called
activity
definitions,
and
now
we
have
a
bunch
of
operations
on
that.
A
So,
for
example,
to
get
an
activity
definition
you
implement
class
called,
or
you
derive
your
class
from
an
input
from
an
endpoint
based
class.
You
specify
the
request
type
and
the
response
type.
If
you
have
any
and
then
you
implement
a
single
method
that
implements
your
endpoint
basically,
so
here
I'm
just
loading
the
activity
definition
being
requested
using
a
definition,
id
route
parameter
from
the
store,
and
then
I
return
it.
So
it's
very
straightforward,
but
look
at
the
configure
method
here
here
we
can
specify
the
route
as
you
can
do,
with
controllers
specify
the
verbs.
A
A
So
basically,
what
they
rely
on
is
storing
a
list
of
feature
or
permissions
in
a
claim
of
the
token,
if
you're,
using
better
authentication,
you
don't
have
to
use
that,
of
course,
but
it's
very
convenient,
because
this
way
we
can
have
per
endpoint
have
a
set
of
permissions
that
the
user
needs
to
have
could
be
any
of
the
specified
permissions
in
this
list,
or
you
can
configure
this
to
require
all
specified
permissions
using
the
permissions
or
but
let's
say
for
this
endpoint,
the
user
needs
the
get
activity.
Definition
permission
so
just
like
this.
A
This
will
be
your
name
and
then
what
we
can
do
is
have
a
default
token
endpoint
that
allows
you
to
create
a
bare
token
with
a
bunch
of
permissions
for
a
user.
So
this
way
the
user
of
the
elsa
framework
can
make
a
very
advanced
fine-trained
user
management
screen
if
they
wanted
to
and
give
precise
permissions
to
a
user.
A
C
A
A
Perfect
question,
so
let
me
show
you
what
I'm
doing
here
so
as
to
answer
that
question:
let's
take
a
look
at
the
get
endpoint.
Actually
this
should
be
next
list,
so
this
endpoint
will
return
a
list
of
activity,
definitions
and
here
I'm
starting
to
experiment
with
that.
Exactly
that
question.
What
name
do
you
use
and
do
you
even
need
to
require
a
list
of
permissions?
So
what
I
did
here,
I
created
a
base
class
called
protected
endpoint
which
looks
like
this
and
what
it's
you
it's
doing.
A
A
The
user
would
not
have
to
care
about
permissions
policies
or
roles
or
if
they
do
care
about
that,
they
can
choose
whether
they
want
to
just
use
role
names
and
not
be
bothered
with
policies
or
permissions
or
use
permissions
or
policies
or
all
of
them,
although
using
all
of
them
probably
doesn't
make
much
sense,
maybe
for
some
endpoints
it
makes
sense,
maybe
not
for
others.
Generally,
probably
the
user
will
pick
one
strategy
and
go
with
that.
A
So
for
this
list,
specific
endpoint,
I'm
using
the
list
activity,
definitions,
permissions
that
looks
like
this,
so
here
I
have
a
constants
class
in
this
folder.
That
also
holds
the
endpoint
and
I
basically
provide
a
name
for
all
three
strategies
that
the
user
can
use.
So
if
the
user
wants
to
require
the
user
to
meet
a
certain
policy
requirement,
then
this
is
the
policy
name,
so
that
means
the
user
will
have
from
the
startup
class.
A
C
D
A
So
that's
a
different
story
and
requires
a
different
strategy,
probably
because
workflows
that
represent
an
api
or
an
endpoint
and
hd
endpoint
are
not
implemented
using
these
fast
endpoints
libraries,
so
that
will
be
done
through
some
middleware.
So
we
we
need
a
different
solution
for
that
and
that's
out
of
scope
for
this
particular
piece.
But
it's
a
very
important
topic
as
well
to
implement,
but
as
a
separate
task.
A
D
A
Users
or
a
security
module,
but
it's
not
required,
so
the
the
developer
can
just
configure
security
from
the
startup
and
then
it's
up
to
them.
If
they
want
to
issue
tokens,
you
know
access
tokens
if
they
want
to
use
jwt
security
or
if
they
want
to
use
active
directory
security,
that's
up
to
the
implementer.
Ultimately,
this
is
just
about
the
user
principle.
Okay,
and
how.
D
D
A
D
A
When
trying
to
direction
yeah,
so
one
solution
could
be
for
the
front
end
to
read
the
token.
Of
course,
this
assumes
that
we
will
use
access
tokens
following
the
giad
standard
or
the
jwt
standard,
so
that
we
can
read
the
claims
and
then
based
on
the
claims.
One
claim
will
be
a
set
of
permissions,
so
we
could
read
the
set
of
permissions
or
the
roles
or
the
policies.
Of
course
the
policies
doesn't
make
sense
on
the
client
side,
because
the
implementation
depends
on
whatever
the
developer
chose
to
on
the
server
side.
C
A
library
of
you
that
you
chose,
because
this
issue
is
normally
handled
by
hus,
which
is
the
fourth
level
of
restful
api,
which
basically
wraps
content
back
into
an
envelope
and
having
all
the
allowed
method
on
that
resource
as
metadata
in
it.
And
that's
the
normal
way.
I
do
it
usually
to
have
that
separation
in
the
ui
and
the
rights
of
the
back
end
to
be
synchronized.
A
C
Another
question
would
be
because
I
was
looking
into
an
issue
of
elsa
2,
where
the
workflow
instances
in
the
ui
get
really
slow
because
of
the
data.
It's
really
big
and
it
is
not
in
the
list.
It's
not
necessary
and
do
we
do
implement
data
shaping
on
the
endpoints.
You
could
say
only
those
fields,
I'm
interested
in
to.
A
A
certain
extent
right
now.
Ideally,
we
use
something
like
graphql
to
do
so.
For
now,
for
example,
the
workflow
definitions
returns
a
list
of
workflow
definition
summaries,
so
just
a
small
version
of
important
fields.
That's
used
for
the
definition
browser
for
example,
and
then
that
window
obviously
doesn't
need
the
actual
data
to
work
for
definition.
So,
for
example,
here
we
have
the
list
endpoint
for
workflow
definitions,
and
here,
as
you
can
see,
it's
gonna
get
a
list
of
definition
summaries
in
elsa
2.
We
have
that
as
well.
A
It
only
returns
a
smaller
shape
of
a
word
definition,
but
the
problem
there
is
it's
getting
the
full
object,
the
full
record
from
the
database.
So
it's
kind
of
useless.
It
saves
a
bit
of
bandwidth,
but
it's
still
quite
slow,
relatively
speaking,
to
get
the
entire
set
of
data
from
or
pages
of,
workflow
definitions.
But
here
it's
done
the
right
way.
I
think
it's
just
getting
the
workflow
definition
summary
from
the
from
the
query.
Yeah.
A
C
C
A
Exactly
right,
yeah,
so
here
it's
it's
solved
because
it's
only
getting
the
the
fields
it
needs,
but
in
lsat
2
it
gets
the
full
object,
including
the
data
column,
which
can
be
quite
big,
okay,
so
yeah.
So
these
fast
endpoints,
I
I
really
like
them,
they're,
very
modular.
It
seems
and
they
are
fully
featured,
so
they
support
swagger,
even
request
throttling,
which
is
also
now
supported
by
asp.net
core,
I
think
but
rate
limiting
and
that's
now
supported,
but
all
the
important
stuff
is
there.
It's
an
interesting
approach
and
also
it
doesn't
have
to.
A
It
doesn't
interfere
with
other
applications
that
use
regular,
asp.net,
mtc
and
api
controllers.
It's
just
it's
implemented
using
its
own
little
middleware.
So
it
can.
I
think
it
can
work
nicely
side
by
side.
In
fact,
it's
already
working
side
by
side,
because
the
current
modules,
the
workflow
or
module,
which
exposes
a
bunch
of
api
endpoints,
is
our
regular
api
controllers.
But
then
the
activity
definitions,
a
module,
uses
fast,
endpoints
and
yeah
works
nicely.
But
it's
not
yet,
though,
it's
still
a
work
in
progress,
so
yeah.
A
So
that's
one
thing:
I've
been
working
on
so
also
taking
security
into
account.
The
other
thing
is
the
designer
for
the
activity
definition.
So
the
way
it's
gonna
work
is
from
designer.
You
should
be
able
to
create
a
new
activity
definition
next
to
workflow
definition,
and
then
you
will
see
this
designer.
It
will
look
pretty
much
the
same
right,
so
there
will
be
a
toolbox
of
activities
that
you
can
add
to.
A
But
to
make
this
work,
I
had
to
do
some
refactoring
so
that
this
canvas
this
designer
is
reusable
it
was.
It
was
too
thin
if
you
will
so.
I
did
too
little
and
there
was
a
lot
of
code
duplication
from
the
workload
definition
editor.
So
let
me
just
show
you
the
composition.
Actually,
so
the
canvas
is
implemented
as
a
component
called
flowchart,
so
this
represents
the
flowchart
activity
with
the
editor.
So
that's
that
basically
uses
the
x6
diagramming
library.
A
So
that's
that's
very
low
level
compared
to
the
other
primitives
of
elsa,
and
then
this
component,
the
float
component,
is
wrapped
by
a
component
called
the
workflow
definition
editor,
but
it's
also
wrapped
by
the
workflow
instance
editor
and
soon
to
be
wrapped
also
by
the
activity.
Definition
editor.
But
there
was
a
lot
of
code
handling
or
handling
of
the
hierarchy
of
the
workflow
and
by
id
I
mean
you
see
this
little
breadcrumb
here.
If
I
add
this
one
here
and
then
click
on
the
plus
you
see
now
we
are
in
a
lower
level.
A
If
you
will
of
the
hierarchy
of
this
workflow.
This
handling
was
implemented
as
part
of
the
workflow
definition
editor
component,
which
means
it
has
to
be
duplicated
to
work,
for
instance,
editor
component
and
the
activity
definition
editor,
which
is
now
good.
So
it's
moved
to
a
lower
level
so
to
the
flowchart
component,
so
that
it's
automatically
implemented
when
I
use
activity
definition,
editor
component,
so
that's
one
big,
refactoring
and
another-
is
to
create
more
a
modular
architecture
so
that
it's
ease.
A
That's
so
that
this
system
is
easily
extensible
with
other
extensive
components
and
these
modules
allow
you
to
control
what
button
is
displayed
in
the
toolbar,
for
example,
what
menu
items
are
displayed
here?
What
happens
when
you
click
on
those
menu
items
and
yeah
and
everything
nicely
packaged
in
a
single
module?
So
that's
what
I'm
currently
working
on
once
that's
refactored.
A
We
will
start
seeing
activity
definitions,
the
ability
to
manage
them,
create
them
and
then
use
them,
and
at
that
point
I
think
we're
very
far
ahead
with
the
roadmap
for
lsat3
just
to
show
the
structure
a
little
bit.
So
we
still
have
components.
These
will
be
primitives
if
you
will,
and
then
here
are
the
modules
and
by
packaging.
These
things
in
separate
modules
allows
the
implementer
or
the
developer
to
control
what
features
they
want
to
enable
and
which
ones
they
do
not
want
to
include,
for
example,
the
label
management
module.
A
Maybe
some
users
don't
want
to
use
it,
or
maybe
people
don't
want
to
use
notifications,
although
it's
unlikely,
they
don't
want
to
use
it,
but
it's
at
least
it's
an
option
this
way,
and
it's
also
a
nice
way
to
flesh
out
the
modular
architecture,
because
the
the
real
value
of
course
comes
from
developers
wanting
to
add
their
own
application,
specific
modules
to
the
system.
Yeah.
That's
what
I've
been
working
on
any
questions
about
that.
D
For
the
activity
designer,
then,
how
do
you
specify
the
properties
for
the
customer
activity
and
outputs?
That's.
A
A
D
A
Will
happen
is,
for
example,
if
you
provide
a
variable
that
has
a
it's
marked
as
an
output,
then
that
will
be
available
when
this
workflow
is
executed
as
an
activity
in
some
other
workflow.
The
same
goes
for
input,
so
you
can
specify
or
define
a
bunch
of
input
variables.
So
let's
say
this
is
an
a
custom
activity
and
then
here
I
say
let's
say
this
is
a
send
email
activity
and
then
as
an
input.
A
I
want
the
recipient
address,
for
example,
of
type
string
right,
so
this
will
then
become
now
imagine
I
will
add
this
custom
activity
to
another
workflow
and
I
select
that
activity.
Then
here
at
the
bottom,
you
will
see
underneath
settings,
you
will
see
recipient
address
and
an
input
field
I
keep
into
which
you
can
provide
some
expression
or
some
value.
D
But
normally
with
the
with
the
properties,
also,
we
need
to
select
a
supported,
syntaxes
options
providers,
or
these
things
also.
We
need
to
also
map
it.
I
think.
A
Yeah
good
point:
I
haven't
thought
that
far
ahead
actually
to
allow
for
that,
but
it's
important
at
the
very
least,
to
be
able
to
specify
as
a
user
what
javascript
expression
to
use,
but
maybe
some
variables
you
shouldn't
be
able
to
use
javascript
expressions
or
net
or
liquid
or
maybe
it
needs
to
be
configurable.
Yeah.
D
A
In
that
case,
maybe
variables
isn't
the
best
way,
because
variables
should
just
be
a
name
and
a
value
and
that's
it.
So
maybe
we
need
a
separate
mechanism
to
allow
the
user
to
configure
this
input
and
output
property
so
that
you
can
also
include
that
metadata.
You
just
mentioned
yeah
good
point.
So
let
me
take
a
quick
note
about
that.
All.
B
A
A
I
guess
kind
of
depends
on
the
trench
in
provider,
but
let's
take
a
quick
look.
It's
it's
possible
that
it's
indeed
remains
as
long
as
the
workflow
definition
is
executing.
That's
that's
indeed
possible.
A
C
Not
using
the
designer
but
just
from
code,
so
I
I
usually
do
it
by
coding,
sometimes
I'm
quite
challenged
by
when
I
do
it
in
the
designer.
If
how
I
can
translate
it
back
to
code.
A
Yeah,
I've
heard
that
before
actually
just
checking
it
to
see
if
there's
already
an
example
we
can
start
from,
I
think
I'm
gonna
create
a
new
one
once
it's
loaded
all
right,
nope,
not
yet,
but
you
are
working
with
long-running
workflows,
although
maybe
it
doesn't
matter
if
we
can,
if
this
gets
stored
in
a
database
and
we
can
inspect
the
work,
for
instance,
let's
see,
maybe
we
can
make
this
one
work,
so
maybe
we
can
configure
this
to
use
sqlite
and
then
we
can
inspect
the
workflow
instance
and
make
sure
that
they
use
variables
and
the
input
and
output
isn't
stored.
A
C
A
Let's
see
if
this
one
works,
so
let's
do
an
inspection
on
the
workflow
definition
or
the
instance
and
see
what
actually
is
part
of
the
instance
and
see
if
we
can
change
it
so
that
it
doesn't
get
stored
as
part
of
the
workflow
instance.
Well,
it
doesn't
store
that
much
okay,
so
maybe
we'll
see
if
we
can
change
the
workflow
a
little
bit
to
try
and
simulate
with
what
is
happening
in
your
case,
because.
C
C
D
D
A
So
this
workflow
completes
from
start
to
finish,
even
though
it
does
I
read
line,
but
that
doesn't
cause
the
workflow
to
be
persistent.
That's
true.
I
didn't
finish
the
workflow
now
it's
finished,
so
this
is
the
output
of
activity2
and
the
variable
should
be
here.
So
it's
well
stored
then
file
all
right.
So
now
let's
say
we
don't
want
to
store
the
output
of
temp
file
because
stem
file
stored
its
output.
I
think.
C
B
Is
it
with
it's
something
like
wheat,
storage
or
something
like
that?
Yeah.
A
Something
like
that,
so
okay,
so
this
is
workflow
builder,
okay,
so
it's
an
extension
on
the
setup
activity
and
this
route
line
doesn't
expose
its
setup.
So
in
this
case
we
would
do
like
this
and
then
this
extension
method
lets
you
configure
what
property
you
want
to
store
transiently.
So
in
this
case
that
will
be
output.
Let's
give
this
a
try
by.
A
A
Yeah,
I
don't
think
that's
supposed
to
have
to
be
an
oversight.
I
don't
think
this
is
supposed
to
happen,
because
if
this
returns
a
a
file,
for
example,
you
don't
want
the
file
contents
to
be
stored.
Do.
A
C
A
That's
right:
maybe
we
can
try
that
in
the
see
if
it
behaves
differently,
if
we
put
it
here.
C
A
Yeah-
and
there
seems
seems
to
be
two
issues,
because
changing
the
attribute
to
using
a
the
transient,
workflow
storage
provided
by
default,
looks
like
that
will
actually
make
the
engine
use
it
this
provider,
but
then,
when
it's
used
it
errors
out
here.
So
that's
yeah
yeah.
So
it's
two
issues,
because
this
is
another
issue
that
this
does
not
seem
to
have
the
expected
effect,
because
if
this
were
taken
into
effect,
then
I
would
have
expected
the
same
issue
here.
Yeah.
A
A
C
That
works
for
me
and
now
we'll
prepare
it
a
bit
a
little
bit
better
and
we'll
go
through
the
examples
that
I
discovered
that
could
yield
some
problems
and
we
can
finalize
it
yeah.