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

How to use it to match some patterns and accordingly return a variable #65

Open
sachinstar2010 opened this issue Sep 27, 2017 · 1 comment

Comments

@sachinstar2010
Copy link

My use case is, let us say, that if a given hash has a particular value for a key, I have to return some other key from the hash. Basically, if I want to use this in an already existing repo deployed on VMs, how would I integrate that?

ds = Network.new

    ds << ruleset {

      rule "type" do
        forall {
          has :A, :type, "Goods"
        }
       make {
           action do
                return true
          end
      end
    }


  return_value =  ds << WME.new( "Sample Product", :type, "Goods" )

How would I achieve this?

@sachinstar2010
Copy link
Author

@ulfurinn Can you Please look into this and help here. My use case is more like How to return a value from the rule engine. I want to model my rule engine as a function and every time I call it, I have to get the result back.

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