AnsweredAssumed Answered

CRT Alternative (Preference Based)

Question asked by skamrani459678 on Sep 11, 2018
Latest reply on Sep 12, 2018 by skamrani459678

This is just a rough draft/algorithm, it is not in production, looking for best ways to achieve outcome.

 

I have an integration scenario where I am looking for preference based cross reference lookup.

Scenario involves 2 Input Values (Decision points) - both of them could be either exact match or wildcard.

3rd decision point is preference or rank. Here is how it looks like:

 

 

 

Scripting function is a simple if else loop/switch case:

if (Result1) {
FinalResult=Result1;
}

else if (Result2) {
FinalResult=Result2;
}

else if (Result3) {
FinalResult=Result3;
}

else if (Result4) {
FinalResult=Result4;
}

else {
FinalResult=Result5;
}

 

Here is how lookup sequence looks like:

Input Value 1

Input Value 2

Output Value(s)


First Preference: Input Value 1 (Exact Match) + Input Value 2 (Exact Match) => Return values

Second Preference: Input Value 1 (WildCard Match) [*x*] + Input Value 2 (Exact Match) => Return values

Third Preference:  Input Value 1 (Exact Match) + Input Value 2 ["Default"] => Return Values
Fourth Preference: Input Value 1 (WildCard Match/.*) + Input Value 2 (Exact Match) => Return Values
Fifth Preference: Input Value 1 (Wildcard/.*) + Input Value 2 (Wildcard/.*) => Return Values

 

What transformation am I looking for?

1) Move away from CRT tables as this data dictionary may expand significantly over time (Perhaps database lookup, without having to query rules for each record)

 

2) Secondly create an abstract function/scripting component which can source preference/configuration from database and can be reused for similar mapping scenarios.

 

3) Or any efficient way to achieve same outcome :-) 

 

Thanks!

Outcomes