We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I wanted to understand if any existing feature is present or planned for something like below?
var fsm = new StateMachine({ init: 'solid', transitions: [ { name: 'melt', from: 'solid', to: 'liquid' }, { name: 'freeze', from: 'liquid', to: 'solid' }, { name: 'vaporize', from: 'liquid', to: 'gas' }, { name: 'condense', from: 'gas', to: 'liquid' } ], methods: { canMelt: function() { return this.inputTemperature > this.data.meltingPoint; }, canFreeze: function() { return this.inputTemperature <= this.data.meltingPoint; }, canVaporize: function() { return this.inputTemperature >= this.data.boilingPoint; }, canCondense: function() { return this.inputTemperature < this.data.boilingPoint;} }, data: { name: 'water', boilingPoint : 100, meltingPoint: 0 }, inputTemperature: 135 });
After this, lets say a new method "pushWorkflow" on the StateMachine
fsm.pushWorkflow(); console.log(fsm.state);
Should display : gas
Kindly let me know if it is not there and will you be happy to accept a pull request in similar lines?
Please suggest some changes if you feel something is not right.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I wanted to understand if any existing feature is present or planned for something like below?
After this, lets say a new method "pushWorkflow" on the StateMachine
Should display : gas
Kindly let me know if it is not there and will you be happy to accept a pull request in similar lines?
Please suggest some changes if you feel something is not right.
The text was updated successfully, but these errors were encountered: