Working with RuleApplicationDef in the Catalog

  • Updated

Prerequisites: A valid RuleCatalogConnection and RuleApplicationDef object
Namespaces: InRule.Repository, InRule.Repository.Client, InRule.Repository.Service.Data
Classes: RuleCatalogConnection, RuleApplicationDef

The following examples demonstrate how to save, check-in and check-out rule applications and their granular elements from the Catalog service.

Create new rule application in the Catalog

// save a new rule application to the Catalog
connection.CreateRuleApplication(ruleAppDef, "New app description");

Save a rule application in the Catalog without checking in

// Save pending changes without checking them in
connection.Save(ruleAppDef);

Note: The rule application is stored in a user specific location and will allow saving even if validation errors exist.

Check out a rule application from the Catalog

// Check out the rule application
connection.CheckoutRuleApplication(ruleAppDef, false, "comments");

Check out a rule application from the Catalog along with the Schema

// Check out the rule application and the schema
connection.CheckoutRuleApplicationAndSchema(ruleAppDef, "comments");

Note: The rule application must be checked out in order to check out the schema.

Check in a rule application to the Catalog

// Check in pending changes
// This will check in all pending changes on the rule app
connection.Checkin(ruleAppDef, "comments");

Undoing a checkout for a rule application in the Catalog

// Undo the check out of the rule app
// This will undo all checked out elements of the rule application
connection.UndoRuleAppCheckout(ruleAppDef);

Determine if a rule application exists in the Catalog

// This will return a boolean stating whether or not the rule application exists in the Catalog by name
// Overloads exist for name, name and revision, name and label
connection.DoesRuleAppExist("MortgageCalculator");

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.