%BRM_IMPORT_RULE_FLOW

Imports rule flows from the specified CSV file into the rules database.

Restrictions: This macro must be run on the server tier.
The same user can run any of import macros at the same time. However, multiple users cannot run the same import macro simultaneously.

Syntax

%BRM_IMPORT_RULE_FLOW(CSV=input_filename.CSV,
REJECT=reject_filename.CSV<, options>);

Required Arguments

CSV=input_filename

specifies the full pathname to the CSV file where you want to import the data from. For more information, see Format of the Rule Flow CSV Input File.

REJECT=reject_filename

specifies the full pathname to the CSV file where you want the macro to write any records that were not imported to the rules database. See Using the %BRM_IMPORT_RULE_FLOW Macro for more information.

Optional Arguments

BRM_USER=user_ID

specifies the user ID that you want to be associated with the data that is imported. This user ID is associated with the imported objects in the rules database and is displayed in the SAS Business Rules Manager interface.

Default User ID of the user that is running the macro

BYPASSLOCK=Y|N

enables you to override the lock that another user has on the importing process. See Using the %BRM_IMPORT_RULE_FLOW Macro for more information.

Default N

Details

Using the %BRM_IMPORT_RULE_FLOW Macro

The %BRM_IMPORT_RULE_FLOW macro enables you to add new rule flows and to update existing rule flows. The macro uses the rule flow name and rule flow path to determine whether a rule flow already exists. If the rule flow path and name already exist, then the rule flow is updated. If the rule flow path exists but the rule flow name does not exist, the rule flow is created. If the rule flow path does not exist, then the rule flow is rejected.
The %BRM_IMPORT_RULE_FLOW macro runs several validation checks as it imports the rule flows. For example, it checks whether a rule set is referenced in a given rule flow more than once and whether section codes are correct. If the macro finds a validation error in a rule flow, it writes a message to the SAS log, and the rule flow is rejected. The macro writes the input records for the rejected rule flow to the CSV file that was specified in the REJECT= option.
When you run the %BRM_IMPORT_RULE_FLOW macro, it creates a lock table in the rules database named lock_import_rule_flow. The SAS log states which user holds the lock and the time at which the lock started. This lock might remain in place after the macro has finished. If this happens, you can override the lock by specifying the BYPASSLOCK=Y option when you run the macro.

Format of the Rule Flow CSV Input File

Each row of the CSV input file identifies a rule set and a rule flow, and each row provides the information about how that rule set fits into the rule flow. The CSV file must contain all of the columns that are listed in the following table, in the order listed. You must specify values for all columns, except as noted in the table. To create a blank column in the CSV file, specify two comma separators without any content between them. For example, to add a rule set to the main section of the rule flow named assignRisk and to specify a blank column for the rule flow description, specify the following in the CSV file:
assignRisk,,main
Format of the Rule Flow CSV Input File
Column
Description
Can Column Be Blank
RULE_FLOW_SK
The identification number of the rule flow.
Yes
RULE_FLOW_NM
The name of the rule flow where you want to add the rule set that is specified in RULE_SET_NM.
No
RULE_FLOW_SHORT_DESC
The description of the rule flow.
Yes
RULE_FIRED_OUTPUT_FLG
Specifies whether to create output only for records that fire rules. Specify Y or N. For some types of applications, only the output records for which at least one rule has fired are of interest. Limiting output is useful for applications that detect outliers, such as applications that detect fraud.
No
RULE_SET_SECTION_CODE
The section of the rule flow to which the rule set that is specified in RULE_SET_NM belongs. Specify init, groupstart, main, groupend, or final.
The codes groupstart and groupend are valid only if you also specify at least one term for BY_TERM.See Simple Rule Flows, Complex Rule Flows, and BY Groups in SAS Business Rules Manager: User's Guide for more information.
No
INCLUDE_NODE_OBJECT_FLG
Specifies whether the rule set specified in the RULE_SET_NM field is run when the rule flow executes. Specify Y or N. Selectively running certain rule sets is useful during rule flow development and testing.
No
RULE_FLOW_PATH
The pathname to the business rules folder for the rule flow. This path must exist. Separate folder names with forward slashes.
No
RULE_SET_NM
The name of the rule set to be added to the rule flow. A rule set can be added to the same rule flow only once.
No
RULE_SET_PATH
The pathname to the business rules folder to the rule set that is specified by RULE_SET_NM. The rule set must exist at the specified location. Separate folder names with forward slashes.
No
VOCAB_NM
The name of the vocabulary that the rule set uses. All rule sets in the same rule flow must use the same vocabulary.
No
BY_TERM
The list of BY-group terms that the rule set uses. Separate multiple BY-group terms with commas.
The BY-group terms must be the same for all rule sets that are in the same rule flow. All of the BY-group terms must belong to the same vocabulary.
See Simple Rule Flows, Complex Rule Flows, and BY Groups in SAS Business Rules Manager: User's Guide for more information.
Yes
ORDER
The order number for the rule set that is in the rule flow. Order numbers must start with 1 and be continuous through the entire rule flow. Do not restart order numbers at section boundaries.
No