Working with Rule Elements in the Catalog

  • Updated

Prerequisites: A valid RuleCatalogConnection and RuleApplicationDef object
Namespaces: InRule.Repository, InRule.Repository.Client, InRule.Repository.Service.Data
Classes: RuleCatalogConnection, RuleApplicationDef, EntityDef, RuleRepositoryDefBase
See Also: Working with RuleApplicationDef in the Catalog

The following examples demonstrate how to check-out rule application elements from the Catalog.

Note: When checking in or saving an element, the entire RuleApplicationDef is checked in or saved, not just the element that you are working with.  See Working with RuleApplicationDef in the Catalog to see how to perform these actions.

Check out a RuleSet from the Catalog

// Get EntityDef
EntityDef entityDef = ruleAppDef.Entities["Invoice"];

// Get the RuleSet off of the EntityDef
RuleRepositoryDefBase ruleSetDef = entityDef.GetRuleSet("DiscountRules");

// Check out the RuleSet
connection.CheckoutDef(ruleAppDef, ruleSetDef, "comments");

Check out a DataElement from the Catalog

// Get the DataElement (a table in this case)
RuleRepositoryDefBase table = ruleAppDef.DataElements["Customer"];

// Check out the DataElement
connection.CheckoutDef(ruleAppDef, table, "comments");

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.