I don't know dataweave or mule, but in general: Often, there is a third choice: Use a dictionary/associative container that maps the inputs to outputs. That is a specific case of a general choice between modeling relations in code vs. modeling them in data structures. (Admittedly, an associative container is a little less elegant if not every input can be mapped to an output, as in your case, so that there is a default.)
↧
Comment by Peter - Reinstate Monica on Should I go with if-else or match-case in the below scenario?
↧