Often when creating an integration we have a number of constant values used in maps, expression editors and conditional expressions. Although they may be constants, sometimes they need to changed. For example we may have an email list that is passed in to a notification activity. As we promote the code between environments we may need to change this "constant" email address.
OIC has a new feature in the August 2020 release called Integration Properties. It allows a developer to define a property that is scoped at the integration level and can be updated without having to edit the integration itself. Read more in the Oracle Integration blog entry Integration Properties.
Integration Properties make it very easy to customize a single integration but sometimes we need to use the same property in multiple integrations. If we use Integration Properties for this we need to edit the property in each integration when it changes. An alternative approach when we have a property that is used in multiple integrations is to store the values in a lookup table.
We store the properties in a lookup with two domains as shown in the picture.
One domain is used to hold the property names and the other domain is to hold the associated value. Within an integration we could use the lookup function to retrieve property values, but that requires going through the lookup wizard each time we want to use the property.
To simplify accessing the properties we can create an integration that returns a json document that includes all the properties from the lookup table. A sample json is shown below:
"ErrorEmailList" : "email@example.com",
"BaseFileDirectory" : "/some/directory"
In the integration we create a map to set the json values using the lookup function. This way we implement a single lookup function for each property, making this the same amount of work whether we use the property once in a single integration or 10 times in a 100 different integrations.
The map which uses the lookupValue function is shown below:
In integrations that need to use the global properties, the first activity in the integration should be a local invoke to call the property retriever integration. The properties will then be available in all maps as shown in the picture below:
So when should Integration Properties be used and when should lookups be used?
Integration Properties should be used when the properties are only needed in a single integration. If the same properties are required in multiple integrations then lookups should be used.
Integration Properties provide an excellent way to customize a single integration while lookups can be used in conjunction with a wrapper integration to provide a mechanism for properties to be shared across multiple integrations.
Here is a sample property retriever integration.