Oracle Commerce - Create custom Derivation method


ATG Repositories have a feature called Derivations, that allow you to derive the value of a property based on other values.

This si a great way to help you design your repository definition and avoid duplicate data.

Here is an example of what you can do with an OOTB derivation:

Now, you can create your own Derivation method to do what you want.

Just do the following:
Create a Class that extends DerivationMethodImpl.

Override derivePropertyValue method

And in order to user it:
Now you can reuse this derivation to get the first element of a collection by just configuring the collection in the expression

There are several derivations already, just make sure that the one you want to implement is not already created OOTB https://docs.oracle.com/cd/E41069_01/Platform.11-0/ATGRepositoryGuide/html/s0612derivationmethods01.html

Comments