If I was starting and had the requirements you stated I would break the total processing into several scripted operations. This feature is in EI specifically to allow you to create “subroutines” which can be optionally used and reused within one or more components. Using integration components as subroutines is possible, as you are doing, but is not the intended path.
Given what you are doing I think the recommendation (made by another) for chaining publishandwait, as if you are doing subroutine calls, is appropriate. Component1 does publish and wait where: Component2 subscribes to the Component1’s published event, and delivers the event Component1 is waiting on as the reply. This makes Component1 synchronous with Component2. Do this again between Component2 and Component3.
To deliver an event use the Create Event step in EI to create the reply, and check off deliver instead of publish in properties. When the component is done that event will be delivered to whoever published the triggering event. Do this in Component2 and Component3. The event you used for Component3’s published completion should be used by Component2 for the deliver. Create another event for Component3 to deliver to Component2. (Probably the only new event you need).
If you are going to do a lot more of this I strongly suggest learning how to use scripted operations instead of integration components for modularizing your logic inside a single adapter. Breaking logic into integration components is intended for when you are going between multiple adapters and agents.
Regards,
Mark Thomsen
#Integration-Server-and-ESB#webMethods#webMethods-General