At a recent client, I had a "citizen integrator" ask me to show them some of the orchestrations that I've created in ICS, and how I went about creating them. I began showing off some of the integrations, and some of the POCs that I created. I didn't get very far until he stopped me and asked, how I was able to invoke the integrations to test them. This is when I realized he had previously attempted to create some integrations, but didn't understand what he created, or how to trigger them and see them in action.
How do I test my integration on Oracle Integration Cloud Service (ICS)?
So, let's take a common scenario, where you are asked to verify that an integration works from ICS or as a developer you want to explore a new integration you are going to interact with. We are going to look at the most common type of integrations, 'Orchestration'. Oracle has this all documented here, so feel free to jump there for more thorough documentation!
On creating a new Orchestration integration, the first decision is 'What triggers this integration?'. There are two options, 'Schedule' and 'Application event or business object'... So what are these, and what should I choose.
Trigger 1: Schedule
Let's start with Scheduled, as this is the quickest option to 'try out' an integration or mapping.
Creating a 'Scheduled' orchestration is meant for exactly as it sounds, a schedule. You can define it to run every minute, every hour, every Monday, whatever the requirement is... The bonus feature about this option is the 'Submit Now' selection. This makes it very easy to test!
Now, let's create a new Orchestration, and select 'Scheduled' (make sure you follow best practices and add it to a package!)
The integration comes up, and is empty except for a Schedule start and Stop elements. Expand out Invokes, and drop in your connection. Add in your mapping of values (hardcoded), or use the provided functions as necessary.
Now, test it!
Make sure you're integration has been activated (don't forget to Enable tracing and Include Payload!). You should just 'Activate', and not 'Activate and Schedule', we don't need this to be reoccurring.
From the integration drop down, select 'Submit Now'.
This will create an instance immediately!
You will see a link appear at the top with a request id, you can click that to view details, or navigate to 'Monitoring → Tracking' and check investigate the instance.
Although this is really great for creating a quick hard-coded integration, lets now discuss how to enhance this, by allowing for input variables!
Trigger 2: Application event or business object
This choice allows you to expose a web service that can be used by other orchestrations, or invoked by other systems. This is a more common scenario for creating a service orchestration between systems. Some other common trigger scenarios include File Adapter and Database Adapter to poll for new files or records.
This setup is a little different than the 'schedule' scenario above, in that, you will need to have a WSDL schema previously defined with your input and output elements. Use JDeveloper, or your favorite IDE, to help you with designing a WSDL, but keep in mind that you cannot include separate xsd files, the schema needs to be self-contained in a single file.
Tip: Design the WSDL as abstract, but before actually invoking the orchestration you'll need to make sure it has a concrete binding URL (see below).
Create your connection with this WSDL, using a Trigger and Invoke (See documentation to limit the use), but this allows you to trigger or start an orchestration and allows you to invoke that orchestration from another orchestration.
Create a new integration as above, but select the 'Application event or business object' option.
The Orchestration should now be blank with an empty trigger to start. Expand out Triggers, and add in your previously defined connection. You can now continue development (I won't go into that here), but adding in your business scenarios with other invokes and routing.
I'm not going to go into developing this integration, there's plenty of other documentation about how to do that, but let's discuss how to test our new ICS integration! Enter SOAP-UI.
The difference between the 'Schedule' service and this one, is there is no way to manually invoke this from the ICS Console (Enterprise Manager used to allow a testing feature, but that is not included as of now).
First, we'll go find the exposed WSDL address, and mention how to add credentials to be able to invoke your new service!
The exposed WSDL, can be found on your Integrations page, click the 'i' for info. You will see it under 'Endpoint URL'.
This is also the URL that will need to be added to your WSDL binding.
<wsdl:service name="AgileIcsEbsPortType_TriggerEbsIntegration_REQUEST"> <wsdl:port name="AgileIcsEbsPortType_TriggerEbsIntegration_REQUEST_pt" binding="tns:AgileIcsEbsPortType_TriggerEbsIntegration_REQUEST_binding"> <soap:address location="https://icspodname-domain-id.integration.us2.oraclecloud.com:443/integration/flowsvc/soap/APLM_EBS_HNS/v01/"/> </wsdl:port> </wsdl:service>
Add this WSDL URL to a SOAP-UI project, and let it download the definition and exposed service operations.
Create a new request, as you would with any new service, and populate your appropriate data elements. If you try and execute this, you will get an error stating 'The request requires user authentication...'
So, lets add the authentication. In the bottom left of that request, click 'Auth' to expand the authorization window.
In the drop-down, select 'Add new authorization', select 'Basic', and add your username and password that you use to log into ICS.
Right-click in the request window, and select 'Add WSS Username Token'. This will add a security header block to your request with your username and password.
Attempting to run the service now, still results in an error. The key here is the text: "WSM-00122: Valid timestamp is not present in the message."
Right click on the request window again, and select 'Add WS-Timestamp', and give it an interval (in seconds). You should now see a timestamp with 'Created' and 'Expires' attributes.
Keep in mind, that timestamp expires. Just delete the 'Timestamp' elements, and recreate as above to generate a new timestamp.
Now, jump back into ICS, (Monitoring → tracking) and look through the instance you just created!
I hope this helps some people get started and playing around in ICS!
Join the Conversation