Mar 8, 2016

AME Rule migration from one instance to another

There are many articles that explains how to migrate AME rule from one instance to another using FNDLOAD. But very few emphasize on the correct order of migration of it's sub components.

To start with, there is no single seeded LCT file, that completely migrates AME rule. It's a mess if the correct order is not followed while migration.

This screenshot explains the order of AME rule sub components and corresponding LCT files for a simple AME rule migration. If you have new action types, approval groups etc, then find out correct LCT from the available list at 
$AME_TOP/patch/115/import
By default, AME rule becomes seeded on the target instance after migration. It's because, the owner name while exporting from source instance is set to seeded user 'Oracle 12.1.3'. If you don't want it as seeded rule, make sure you replace the owner name in all ldt files before running FNDLOAD UPLOAD commands.




Here are the sample FNDLOAD commands of each step.

Download from Source Instance
FNDLOAD apps/`pwd` 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesmatt.lct ame_attribute1.ldt AME_ATTRIBUTES ATTRIBUTE_NAME="IREC_APPL_NEW_STATUS" TRANSACTION_TYPE_ID="IRCNTFAPPROVALS" APPLICATION_SHORT_NAME="PER"
 FNDLOAD apps/`pwd` 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesmatr.lct ame_attribute_usages1.ldt AME_ATTRIBUTE_USAGES ATTRIBUTE_NAME="IREC_APPL_NEW_STATUS" TRANSACTION_TYPE_ID="IRCNTFAPPROVALS" APPLICATION_SHORT_NAME="PER"
FNDLOAD apps/`pwd` 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesconk.lct ame_condition1.ldt AME_CONDITIONS APPLICATION_SHORT_NAME="PER" TRANSACTION_TYPE_ID="IRCNTFAPPROVALS" CONDITION_KEY="703735219:10280"
 FNDLOAD apps/`pwd` 0 Y DOWNLOAD $AME_TOP/patch/115/import/amespdan.lct ame_action1.ldt AME_ACTIONS APPLICATION_SHORT_NAME="PER" TRANSACTION_TYPE_ID="IRCNTFAPPROVALS" ACTION_TYPE_NAME="production rule" VARIABLE_NAME="IRECRUITMENT NOTIFICATION MSG SUBJECT" VARIABLE_VALUE="IRC_APPL_SUBMITTED_SUB"
FNDLOAD apps/`pwd` 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesrulk.lct ame_rule1.ldt AME_RULES APPLICATION_SHORT_NAME="PER" TRANSACTION_TYPE_ID="IRCNTFAPPROVALS" RULE_KEY="703735219:10240"
 FNDLOAD apps/`pwd` 0 Y DOWNLOAD $AME_TOP/patch/115/import/amesacus.lct ame_action_usages1.ldt AME_ACTION_USAGES APPLICATION_SHORT_NAME="PER" TRANSACTION_TYPE_ID="IRCNTFAPPROVALS" RULE_KEY="703735219:10240"
Condition_key and Rule_key can be found from AME_CONDITIONS and AME_RULES tables. They help avoid hard coding ID values. If there already exists condition or rule with the key, FNDLOAD end dates existing and creates new date tracked entry.

Upload to Target Instance
Upload commands are pretty straight forward. Just need to use the right LCT file.

 FNDLOAD apps/`pwd` 0 Y UPLOAD $AME_TOP/patch/115/import/amesmatt.lct ./ame_attribute1.ldt
FNDLOAD apps/`pwd` 0 Y UPLOAD $AME_TOP/patch/115/import/amesconk.lct ./ame_condition1.ldt
FNDLOAD apps/`pwd` 0 Y UPLOAD $AME_TOP/patch/115/import/amesconk.lct ./ame_condition1.ldt
FNDLOAD apps/`pwd` 0 Y UPLOAD $AME_TOP/patch/115/import/amespdan.lct ./ame_action1.ldt
FNDLOAD apps/`pwd` 0 Y UPLOAD $AME_TOP/patch/115/import/amesrulk.lct ./ame_rule1.ldt
FNDLOAD apps/`pwd` 0 Y UPLOAD $AME_TOP/patch/115/import/amesacus.lct ./ame_action_usages1.ldt


Leave a comment below, if you find it useful.

Thanks


No comments:

Post a Comment