-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Label Question. How to you add fields to the state and side-effects #1
Comments
Thanks for the questions,
%X.Transition(machine, "close") # close??
%X.Transition(machine, "open") # open?? Events
Parameters:
pid : PID (process identifier)
event: The event that caused the transition
access_time: Access time
state: The resolved machine state, after transition
instance: Any external value you want to pass it, passed from: external
And true, it's async because:
|
Thanks for your response and for clarifying the RTC concept. For 1., I made a mistake indeed, sorry for that. it is of course as below. X.Transition(machine, ":lock")
%X.Transition(machine, "unlock") The transition job works perfectly. In fact, I wanted to be able to access this |
That's good point! I think for now I haven't developed further about |
You shed light on the RFC. Your approach ressembles to Amazon Step Functions. If you allow me to share some ideas...The data added to the machine state through they key |
Thanks for this module. I take a simple example. I want to add a counter in the state and run a side effect such as incrementing it at to specific transition in a synchronous manner.
I can add via
:external
my counter and see that the `context.instance" . I can indeed change the value with an "external" action, however, no action onto this can be made from within the %X.Machine{} struct, or I don't see how. I can only launch "external" functions. It seems you run these functions async. Some side-effects should be done concurrently but in my case of an internal state, it shouldn't I believe.The following does not work:
The text was updated successfully, but these errors were encountered: