How to Add the Outside Manager Finder Class

10-22 Oracle Fusion Middleware Users Guide for Oracle Business Rules

10.3.8.5 How to Add the Outside Manager Finder Class

Add the outside manager finder class. This uses the Decision Point to execute a decision function. To add the Outside Manager Finder Class: 1. Select the Chapter10 project. 2. Right-click and select New.... 3. In the New Gallery, in the Categories area select General. 4. In the New Gallery, in the Items area select Java Class. 5. Click OK. 6. In the Name field, enter OutsideManagerFinder. 7. Click OK. 8. Replace the contents of this class with the code shown in Example 10–5 . Example 10–5 Outside Manager Finder Java Class with Decision Point package com.example; import java.util.ArrayList; import oracle.jbo.ApplicationModule; import oracle.jbo.ViewObject; import oracle.jbo.client.Configuration; import oracle.rules.rl.exceptions.RLException; import oracle.rules.sdk2.decisionpoint.DecisionPoint; import oracle.rules.sdk2.decisionpoint.DecisionPointBuilder; import oracle.rules.sdk2.decisionpoint.DecisionPointInstance; import oracle.rules.sdk2.exception.SDKException; import oracle.rules.sdk2.repository.DictionaryFQN; public class OutsideManagerFinder { private static final String AM_DEF = com.example.AppModule; private static final String CONFIG = AppModuleLocal; private static final String VO_NAME = EmployeesView1; private static final DictionaryFQN DICT_FQN = new DictionaryFQNcom.example, Chapter10Rules; private static final String DF_NAME = FindOutsideManagers; private DecisionPoint dp = null; public OutsideManagerFinder { try { dp = new DecisionPointBuilder .withDICT_FQN .withDF_NAME .build; } catch SDKException e { System.err.printlne; } } public void run { Working with Oracle Business Rules and ADF Business Components 10-23 final ApplicationModule am = Configuration.createRootApplicationModuleAM_DEF, CONFIG; final ViewObject vo = am.findViewObjectVO_NAME; final DecisionPointInstance point = dp.getInstance; point.setInputsnew ArrayListObject{{ addvo; }}; try { point.invoke; } catch RLException e { System.err.printlne; } catch SDKException e { System.err.printlne; } } public static void mainString[] args { OutsideManagerFinder omf = new OutsideManagerFinder; omf.run; } }

10.3.8.6 How to Update ADF META INF for Local Dictionary Access