Open alcarraz opened 4 years ago
I like the latter, but the former is so easy that perhaps it's the way to go.
Now the question, just re:
as a prefix or regexp:
?
Can we settle in regex:
after java.util.regex
package?
I'll take this issue if you agree.
Switch
participant is described in jPOS programmer's guide section 9.8.1.Motivation
Switch
participant is a highly performant groups selector, but it lacks the ability of handling multiple different but similar entries (e.g. with a common prefix) that should route to the same groups.I'm writing this issue to have feedback about the best way of implementing this.
I see two options at a first glance:
Switch
implementXMLConfigurable
and have something similar to what is done in SelectDestination but just for regexes. e.g.:In both cases direct properties would have precedence over regex ones, to maintain the efficiency of look up table, if the name is not present as property then we would look iterate over regex in order of definition.
So it behaves efficiently for common transactions but you have the option of leave open cases where there are too many (and infrequent) combinations to list them all one by one, in particular for combinations of function code x reason code.
I'm highly inclined to option 2 but would like better ideas for the syntax.