Related Topics
Rule Class
This object represents a Business Rule.
Properties
PROPERTY NAME |
DATA TYPE |
DESCRIPTION |
---|---|---|
Group |
String |
The string Group name of the Business Rule. |
In addition to Properties, Business Rules use the SystemVariableContext object to specify the various context properties for the Business Rule. Please see the SystemVariableContext topic for more information.
Methods


This API will call the evaluation of the Business Rule, returning the appropriate data for that rule. This is an overloaded method with the following possible declarations:
public string Evaluate()
public string Evaluate(IEnumerable<NameValue> Variables)
public string Evaluate(SysVarClass.IContextReadonly Context)
public string Evaluate(SystemVariableContextReadonly Context)
public string Evaluate(SystemVariableContextReadonly Context,
IEnumerable<NameValue> Variables)
Parameters
Variables: An IEnumerable object containing the variables to pass to the Business Rule.
Context: A SystemVariableContext object containing the context settings for the Business Rule.
Returns
String: The result of the Business Rule's evaluation.
Example
var oRule = Rule.GetRuleByID(bp, "RULEID");
string result = oRule.Evaluate();


This API will get a Business Rule object from the specified ID.
Parameters
BP: The bp environment.
RuleID: The string ID of the partition to retrieve.
Returns
Rule Object: Will return null if the Business Rule isn't found.
Example
// Normally not used directly
var oRule = Rule.GetRuleByID(bp, "RULEID");


This API will return a Business Rule object from the specified Rule Name. This is an overloaded method with the following possible declarations:
public static Rule GetRuleByName(bp BP, string PID, string RuleName)
public static Rule GetRuleByName(bp BP, string PID, string RuleName, string Group)
Parameters
BP: The bp environment.
PID: The ID of the partition on which the Business Rule is located.
RuleName: The string name of the Business Rule.
Group: The string Group name of the Business Rule.
Returns
Rule: Will return null if partition isn't found.
Example
var oRule = Rule.GetRuleByName(bp, "PartitionID", "RuleName");
Documentation Feedback and Questions
If you notice some way that this document can be improved, we're happy to hear your suggestions. Similarly, if you can't find an answer you're looking for, ask it via feedback. Simply click on the button below to provide us with your feedback or ask a question. Please remember, though, that not every issue can be addressed through documentation. So, if you have a specific technical issue with Process Director, please open a support ticket.