Enter useRulesDC in the Project Name field and ensure that ADF Faces is

25-10 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 25–18 Creating a Java Class 5. In SomeBean.java, provide a method that returns the RuleSetModel object. You must specify the location of the rules file here. The following is a sample of the SomeBean.java file: package userulesdc; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.util.ArrayList; import java.util.List; import oracle.bpel.rulesdc.model.impl.RuleSetModel; import oracle.rules.sdk2.dictionary.RuleDictionary; import oracle.rules.sdk2.exception.SDKException; import oracle.rules.sdk2.exception.SDKWarning; import oracle.rules.sdk2.ruleset.RuleSet; import oracle.rules.sdk2.ruleset.RuleSetTable; public class SomeBean { private static final String RULES_FILE = your rules file here; private RuleSetModel ruleSetModel = null; public RuleSetModel getRuleSetModel { if ruleSetModel = null return ruleSetModel; cache ruleSetModel instead of re-creating it each time Reader reader = null; try { reader = new FileReadernew FileRULES_FILE; } catch FileNotFoundException e { Using Declarative Components and Task Flows 25-11 LOG.severee; System.err.printlne; } RuleDictionary dict = null; try { dict = RuleDictionary.readDictionaryreader, null; } catch SDKException e { System.err.printlne; } catch FileNotFoundException e { System.err.printlne; } catch IOException e { System.err.printlne; } if reader = null { try { reader.close; } catch IOException ioe { } } get the ruleSetTable from the RuleDictionary object RuleSetTable ruleSetTable = dict.getRuleSetTable; get the first ruleSet from the ruleSetTable RuleSet ruleSet = ruleSetTable.get0; create a RuleSetModel object and pass this to the rulesDC ruleSetModel = new RuleSetModelruleSet ; return ruleSetModel; } refer to Rules SDK documentation for saving a dictionary also because this code does not take care of saving linked dictionaries public static boolean saveDictionaryRuleDictionary dict, String ruleFileName { Writer writer = null; try { writer = new FileWriternew FileruleFileName; dict.writeDictionarywriter; } catch SDKException e { System.err.printlne; return false; } catch FileNotFoundException e { System.err.printlne; return false; } catch IOException e { System.err.printlne; return false; } finally { if writer = null { try { writer.close; } catch IOException ioe { return false; } } }