Upgrade Tasks Associated with All Java Applications

Considerations When Upgrading All Oracle SOA Applications 9-5 In Oracle Business Rules 11g, WebDAV is no longer supported and Metadata Services MDS is the recommended repository. Also, the dictionary name and version have been replaced with a package and name similarly to the Java class naming scheme. In Oracle Business Rules 10g, the version did not provide true versioning. In Oracle Business Rules 11g, the equivalent to specifying a version is to simply change the name. For example, a 10g dictionary with the name foo.bar.MyDict and version 2 would in 11g be packaged as foo.bar and name MyDict2. In the following examples, compare the code required to access a dictionary in production mode in 10g Example 9–3 with the code required in 11g Example 9–4 . Example 9–3 Accessing a Dictionary with Oracle Business Rules 10g in a Production Environment String url; the URL for the WebDAV repository Locale locale; the desired Locale The following code assumes that the url and locale have been set appropriately RepositoryType rt = RepositoryManager.getRegisteredRepositoryTypeoracle.rules.sdk.store.webdav; RuleRepository repos = RepositoryManager.createRuleRepositoryInstancert; RepositoryContext rc = new RepositoryContext; rc.setLocalelocale; rc.setPropertyoracle.rules.sdk.store.webdav.url, url; repos.initrc; RuleDictionary dictionaryWithInitialVersion = repos.loadDictionarydictionaryName; RuleDictionary dictionarySpecificVersion = repos.loadDictionarydictionaryName, dictionaryVersion; Example 9–4 Accessing a Dictionary with Oracle Business Rules 11g in a Production Environment import static oracle.rules.sdk2.repository.RepositoryManager.createRuleRepositoryInstance; import static oracle.rules.sdk2.repository.RepositoryManager.getRegisteredRepositoryType; import static oracle.rules.sdk2.store.mds.Keys.CONNECTION; ... private static final String DICT_PKG = oracle.middleware.rules.demo; private static final String DICT_NAME = CarRental; private static final DictionaryFQN DICT_FQN = new DictionaryFQNDICT_PKG, DICT_NAME; ... RuleRepository repo = createRuleRepositoryInstancegetRegisteredRepositoryTypeCONNECTION; repo.initnew RepositoryContext {{ setDictionaryFindernew DecisionPointDictionaryFindernull; }}; RuleDictionary dict = repo.loadDICT_FQN;

9.3.1.1.4 Generating RL Code The following example shows the code required generate

RL code in Oracle Business Rules 10g. In 11g, this code remains the same. init a rule session String rsname = vehicleRent; String dmrl = dict.dataModelRL; String rsrl = dict.ruleSetRL rsname ;