Haha, that’s exactly the design I implemented for Epicor to web app integration. Event listeners are collecting specific events across the system and writing them to a UD table, then invoking a function (passing in the UD table sysrowID of the event).
The function consumes the sysrowID to look up the event and deserializes the contents
and calls the web app web service as designed. Web app does its thing to update the record on the portal and responds back. Epicor listens for response and records it in table.
This actually saved my butt yesterday because we ran into a snag with migrating legacy data over to the new portal. Meanwhile, all of yesterday we ran business in Epicor, so we had potential for de-syncing events on legacy orders.
Today, got the legacy data imported and I built a user process scheduler BPM to re-play yesterdays events against the function to call the web service. Worked like a charm and everything is now in sync.
+1 for that architecture vs. real time HTTP calls for syncing two systems.