Skip to content

same functions inside several events should be executed once #141

@mcamp

Description

@mcamp

If we have this machine

(machine m
(state foo)
(state bar)
(state baz)
(on event1 foo -> bar)
(on event2 foo -> baz)
(event event1 [robot heavyFunction. "do something"])
(event event2 [robot heavyFunction. "do something else"])
)

In this case, the function robot>>heavyFunction would be nice to be executed only once.
We can do that by adding a new state after foo that computes the function on a running action.

Im putting this issue to remember us to think about this use case and see what it is the best solution

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions