dolphin278 / fsm-http Goto Github PK
View Code? Open in Web Editor NEWFSM that uses remote HTTP calls to allow state transitions
FSM that uses remote HTTP calls to allow state transitions
Support passing request data when attempting to make a transition (see dolphin278/fsm#2 for more details).
When performing HTTP request for state transition, send fsm's data
field as request body (request json
or body
field).
If request
field of edge object also contains body
or json
fields, mix fsm's data
field with these values, giving priority to fsm data
members over edge object request
field members.
Tricky question is what should we do when HTTP endpoint returned HTTP status code 200, but there was an error on parsing endpoint response.
Using node-fsm
event state
, support same similar request
field on machine states to notify external systems as we do it for state transitions.
These notification does not affect machine state — so whether we received HTTP status code 200, or not, machine state will not change.
Our fsm stores arbitrary data using data
field. When we receive JSON response on state transition callback, update fsm's data
field with received data.
After #2 will be resolved, there is need to support limits on how much data could be transfered back and forth on state change requests — large request could stuck application and could be used to abuse server in non-controlled environments (when fsm are provided by third-party).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.