I have some external data to be populated before my External data provider is executed. Let say I have 2 functions call external data:
- GetItem(string itemId)
Those functions will populate items to Dictionary XML then eventually will assign to each item's XML.
So I'd placed GetItem in External Data Provider GetItemDefinition(ID itemID, CallContext context). Also, there's a condition if the current ID is already in Dictionary, then don't call GetItem but assign Dictionary XML to the respective item instead. Thus I need a custom pipeline that will be called RIGHT before GetItemDefinition is called. So my Dict is already full with the item and don't have to Call GetItem for each item.
I've also tried to put condition: if the dictionary is empty, then GetAllItems(). But that would cause some dictionary values is null since Data Provider is asynchronous.
Back to the question, Where I can put my custom pipeline to be executed right before Data Provider? or maybe there's another workaround?