Skip to content
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

Statically assess data integrity. #1

Open
totherik opened this issue Mar 15, 2017 · 1 comment
Open

Statically assess data integrity. #1

totherik opened this issue Mar 15, 2017 · 1 comment

Comments

@totherik
Copy link
Owner

Currently the state language definition is validated for structure using JSONSchema, but no validation of data integrity is done, e.g. StartState and subsequent Next states are not validated prior to running the state machine, etc.

This would be useful to ensure a machine can be run to completion prior to invoking it.

@totherik
Copy link
Owner Author

step/src/states/index.js

Lines 26 to 35 in 381065d

if (!task) {
/**
* TODO: https://github.com/totherik/step/issues/1
* This should not be done at runtime.
* Also, don't abandon the existing promise chain, so
* procced, break the while, and return.
*/
const error = new Error(`State "${name}" not defined.`);
promise = promise.then(() => Promise.reject(error));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant