Skip to main content

Cloud

Orchestration with Oracle Integration Service Cloud

In a previous blog, I wrote briefly about some of the advantages of an Orchestration flow. In this article, I’m going to dig a little deeper into Orchestration flows and how to get the best use out of them.

First, I’m going to show a sample Orchestration flow. This flow triggers from Account Updates from Oracle Sales Cloud and populates an on premises SQL Server 2012 database.

ics-orchestration_flow

I know it’s difficult to see much detail, but I’ll zoom in on specific pieces.

ics_trigger

  1. Every integration flow begins with a trigger. The trigger in this case is an Account Update message that is handled using the Oracle Sales Cloud adapter. The Oracle Sales Cloud adapter can trigger off Account/Contact Create/Update calls.
  2. The first action in the orchestration is a Switch action. Switch actions allow you to check for a condition and if true, execute a set of additional activities. When the condition isn’t met, the “Otherwise” path is followed.
  3. The test condition is looking for a string length > 0 for the OwnerName, an element in the Account Update payload that is passed in. For purposes of this orchestration, we make sure there is an OwnerName to work with.
  4. In this step, the Switch action ends the integration if the “Otherwise” condition is met. That is, we don’t have an OwnerName so there’s no work to be done.
  5. This bullet indicates the end of the Switch action. This is important because results from an invoke or variable assignment that occur within the Switch action are limited in scope to that Switch action.

The next actions in the orchestration include the following:

  • Map
  • Invoke
  • Invoke
  • Assign

ics-invoke-assign

  1. The Map action simply maps the OwnerName to a Sales Agent binding variable that is used to perform SQL database lookup.
    1. ics_agentid_map
    2. The #SalesAgentName is the binding variable that you create with the SQL Query that follows. Behind the scenes, ICS creates an XSD that contains the binding variable as an element you will  drag/drop for your mapping. The canvas designer shows the sequence as Map/Invoke, but when you do the design, you will first create the Invoke and then the Map action will be automatically created so you can populate it.
  2. The first Invoke action contains the actual SQL select statement that retrieves sales agent information based on the OwnerName.
    1. ics-sql-query
    2. When using an adapter Invoke action, any changes made to the SQL Query will cause the Map action preceding it to be deleted. If your Map contains a fair number of entries, this can be time-consuming to replace. Better to avoid hard-coding values in the SQL Query.
  3. The GetTimeFromServer invoke is a basic SQL call that retrieves the system time from the server where the database is hosted. The ICS server uses UTC so rather than calculate the timezone offset, we just get the time from the source.
  4. The last action discussed in this section is the Assign action. This is a fairly new feature and one that is very welcome. Assign activities allow you to create global variables for later re-use.
    1. ics-assign

In the example above, I’ve created 4 different variables with a single Assign action. Most of these are used to provide default values to columns needed for creating/updating records, that is, the name of the user that touched or created the record, along with a current time and date. Since an orchestration may touch several records during the flow, it makes sense to separate the variables into an Assign action so you’re not re-entering the same mapping conventions each and every time.

In the “Value” column you’ll see the mapping and any XPath functions that may have been used for transformation.

In a Map action, here’s how those variables are used:

ics-assign-mapping

With any transformations already taken care of, it’s a simply matter of dragging and dropping the variable  from the Source to the Target pane.

The remainder of the orchestration flow is simply more of the same. Assign, Map and Invoke activities combined with Switch activities to handle dynamic conditions.

I hope this blog has helped explain the value of orchestrations and given you some ideas of how to implement an orchestration flow successfully. Later posts will cover some best practices I’ve developed along with some other tips and tricks.

Lastly, I want to thank CPI Card Group for permission to use their instance for these screen shots.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Chris DeBracy

More from this Author

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram