I am taking the advice to do modulization in Scripted Operations. Anybody got some simple code samples on how to do that? I am really pressed in time and your help is highly appreciated.
If you were in LA I could come over and show you how to do this in 15m. Let me try this in text …
In EI you will create scripted operations point-and-click. No sample code. If you have created integration components that are close to what you want then here is all you do.
Identify the scripted operations. Let’s assume Component1 stays an Integration Component and Component2 and Component3 each become a scripted operation. Sounded like Component2 did not use a configured operation (the single yellow gear icon), but Component 3 did. So Component2 will become a Common Operation (see under Adapters the little page-and-wrench icon) and Component3 will become an adapter scripted operation (see under Adapters, under the JDBC adapter you are working with).
Pause. I used the term common operation, scripted operation, and configured operation. Let me make sure these terms are clear and distinct. Common operation is a folder under Adapters where those scripted operations that are independent of adapters are placed - or should be placed. Independent of adapters? The adapter functions are accessed as configured operations - each function is an operation, and setting up the details (input and output values, options) is configuring the operation. If you have a script that does not use a configured operation then that script is independent of any adapter, and in theory can be run anywhere. The IE wants you to place these in Common Operations folder.
The Scripted Operation is basically a subroutine. Same logic as you use when creating components. But instead of being triggered by an app notification or an event, it is called from another operation or component.
I hope these three terms are clear. Onward.
For each new scripted operation, create the SO in the correct folder per above - one under the Common Operations folder (under Adapters folder) and another one under your JDBC adapter folder (under Adapters folder).
For each scripted operation you should replicate the script you created for the corresponding integration component. Same steps, branches, and accessing the same configured operations. The differences:
The IC handled input and output as accessing fields in events. Here you will create a list variables for input and output, the lists being the same as you had for mapping to event fields. Create these early so you can map them into and out of the steps you create in the SO.
No events. Where you were publishandwaiting, replace with a call to the SO. Component1 no longer publishandwaits. It calls the SO that replaces Component2. And that SO no longer publishandwaits. It calls the SO that replaces Component3.
From this it is probably apparent that you shoud transfer Component3 to an SO first, then Component2 to an SO, and then Component1 to calling the SO. In that order. Create the thing to call before calling it. This just makes things a little clearer and linear.
I hope this is sufficient. If not, we should arrange a phone call.