Understanding Queues and Context is tricky. If you stick to some rules, mappings can be simplified to great extent. Below video has mapping logic for a common scenario.
Rules:- - Put filter logic on Node elements. - Map Leaf elements one - to - one.
Avoid:- - Avoid removeContexts, collapseContexts, mapWithDefault on Node elements. - Avoid context change of Leaf elements.
Do's:- - Control the occurrence of Node elements by controlling the context of input element. - Use mapWithDefault for Leaf elements, if required.