Business Rules

<< Click to Display Table of Contents >>

Navigation:  General Functions > Import / Export > Import >

Business Rules

Any .CSV field to be imported into the MIE can have a business rule defined.  Business rules allow the value in the field to be tested against a set of constraints.  For example, you might use business rules to do one of the following:

Ensure that all asset numbers are the proper length and adhere to rules such as MOD137;

Ensure that mandatory fields, such as Manufacturer, are not blank; or

Ensure that status values match one of the official values designated for that field.

Business rules are very powerful for maintaining data integrity and should be applied wherever possible.  Business rules are also used by the interactive screens of the MIE to enforce a degree of data integrity.

If, during import, a data value violates one or more of the constraints imposed by the assigned business rule, the entire .CSV record will be ignored, and an error message will be logged to the job log.  The .CSV file must be corrected and re-submitted (or the individual offending records extracted, corrected, and then re-submitted as a new .CSV file) in order to successfully import any records that were ignored.

The only business rule constraint that is not imposed (actually it is, however it will seldom be violated due to how import handles incoming data) is the maximum length constraint.  Import automatically truncates any data that is longer than the defined target field, so that when that data gets presented for business rule testing, it's length is guaranteed not to exceed the maximum set length of the field.  Therefore, it will pass the business rule's maximum length test (unless the assigned business rule imposes a shorter maximum length than the field can hold).  Truncation is generally preferable to ignoring (and therefore not importing) the entire record, therefore truncation is given priority over maximum length enforcement.

If a data drop-down is specified as a business rule, then the incoming value will be checked to make sure it is contained in the list of drop-down values.  A drop-down business rule defines lists of choices that generally display for edit on various MIE screens.  When used as a business rule for import, the list is used to make sure the value is contained within.