Application of Rulebases during Import

The rulebase used during import may not make assumptions about the relationships because the relationships are not established during this validation. If such validations are required, you need to implement them in a separate rulebase and configure an EvaluateRulebase activity. Rulebase can be applied on incoming data in various stages.

  • Prepare for import: During this stage, the rulebase can only update the product ID and Ext. Any other updates are ignored. The rulebase only has access to the data which is in the staging step, the record does not have an identity and relationships. The rulebase cannot compare the record with previous versions.
    • It is recommended that when this step completes, all records have been assigned an ID and Ext.
    • Use the AssignIdentity action to locate matching records using business keys and to modify the existing records.
    • This step allows rejection of records during this step. The data can be validated and erroneous records rejected. Validate the data in isolation (the validations which only work on incoming data) to reject the record.
  • Import: During this stage, the record has identity and can be validated and transformed. Using a rulebase to transform the data at this step instead of a separate step avoids creation on another version of the record. The rulebase can
    • Compare the record with previous version to implement tolerance limits on changes
    • Transformation of the attributes other than the ID or Ext and comparison with the previous version should be done in this step. Records can be rejected.
    • Transformation of the record ID or Ext is not recommended in this step.

      This step also validates the data types and sizes of each attribute and rejects records which do not pass the validation. Note that the record does not have relationships so rulebase should not attempt to validate the hierarchy.

  • Evaluate Rulebase: As most validations can be done in the import step, this step is necessary only if there are validations which require the full hierarchy (for example, sibling's validation, propagations).
    • The evaluate rulebase should be executed after the ExtractRelationship and ManageRecordCollection step.
    • Any hierarchy validations and propagation should be done in a separate EvaluteRulebase step after the relationships are established.