Click JSP Tag Libraries from the left panel. Click Add and select ADF Faces Components from the Extension list in the

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; } } } 25-12 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite return true; } public static void updateDictionaryRuleDictionary dict { if dict == null return; ListSDKWarning warnings = new ArrayListSDKWarning; try { dict.updatewarnings; if warnings.isEmpty { for int i = 0; i warnings.size; i++ System.out.printlnwarnings: + warnings.geti.getLocalizedMessage; } } catch SDKException sdkEx { sdkEx.printStackTrace; } } You can call this method from your Save button public void saveDictionary { RuleDictionary dict = this.getRuleSetModel.getRuleSet.getDictionary; if dict = null { update the dictionary before saving it updateDictionarydict; saveDictionarydict, RULES_FILE; } } call the validation method on the ruleSetModel to update the Validation Panel public void validate { if this.ruleSetModel == null return; this.ruleSetModel.validate; 6. Open the faces-config.xml file in Overview mode and click the + button under Managed Beans to display the Create Managed Bean dialog box. Point to SomeBean.java by providing the Bean Name as someBean and the Scope as session as shown in Figure 25–19 . Figure 25–19 Specifying the Bean Name and Scope The ADFJSF framework makes multiple calls to SomeBean.java to render the user interface. For example, someBean.ruleSetModel is called multiple times.