rules
                                
                                 rules copied to clipboard
                                
                                    rules copied to clipboard
                            
                            
                            
                        Load rules from external file in Ruby
Hi,
Is there any way to define the rules in an external file and load them in the engine? I don't see any example of dynamic loading in ruby.
Thanks.
Hi, thanks for posting the question. The ruby library has the same hooks as python and node.js. Let me put together the dynamic loading sample within the next couple of days.
Hi, I have added the testdynamic example for Ruby. These are the files for the example:
https://github.com/jruizgit/rules/tree/master/testrb/admin.html
https://github.com/jruizgit/rules/tree/master/testrb/testdynamic.html
https://github.com/jruizgit/rules/tree/master/testrb/testdynamic.rb
https://github.com/jruizgit/rules/tree/master/testrb/durableVisual.js
You can try it by:
- Run ruby testrb/testdynamic.rb
- From your browser, navigate to http://localhost:4567/testdynamic.html
- Click save
- Click post
You should see a statechart on the right hand side. After clicking post, the state will change.
@jruizgit I'm not able to get the example above to run, It cannot find the Application::Interface which is maybe an old way of using sinatra?