Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I have been working in this change for some time in order to be able to read and write workflow configuration from externalized json files.
This is something I find quite valuable for a personal project I am working on. This functionality I am sending will leverage (not in this PR yet) to update and maintain the workflow design using a UI (e.g a browser HTML5 canvas component that could generate json format that will ultimately update the workflow definition)
This PR reads json workflow configuration from files but future PRs could keep external models in NOSQL databases (e.g MongoDB)
I hope you like this PR and you accept to merge it in the main branch. I have created specific tests for this functionality available under tests/json_load_test.rb
Usage from test/json_load_test.rb
Order.workflow_spec.from_json_file!('workflows/order.wf')
Order.reassign_workflow!