Business Rules SDK

Hi,
I am trying to use the Business Rules SDK to update the variables which I have stored in my Business Rules. The dictionary was created using the RulesAuthor, but I'd like to use the SDK to update the variables.
Example 6-6 in the Business Rules User guide shows how to do this (http://download.oracle.com/docs/cd/B25221_01/web.1013/b15986/sdk.htm), but this value only seems to exist on the application side.
I've tried saving these updated values back to the repository using RuleRepository .save(), but it doesnt seem to work and no exception is thrown.
I've included my very basic code below. The repository is accessed via webdav.
Has anyone been able to successfully do this? Any help is much appreciated.
Thanks a lot,
Niall.
RepositoryType rt = RepositoryManager.getRegisteredRepositoryType("oracle.rules.sdk.store.webdav");
RuleRepository repos =
RepositoryManager.createRuleRepositoryInstance(rt);
RepositoryContext rc = new RepositoryContext();
// rc.setLocale(locale);
rc.setProperty("oracle.rules.sdk.store.webdav.url", url);
repos.init(rc);
RuleDictionary m_dict =
repos.loadDictionary("myDictionary", "v1.1");
try {
DataModel eDM =
new oracle.rules.sdk.editor.datamodel.DataModel(m_dict);
Variable vars[] = eDM.getVariables();
if (vars.length > 0) {
for (int i = 0; i < vars.length; i++) {
System.out.println("Variable is " + vars[i].getName());
InitValue iv = vars[i].getValue();
AdvancedExpression adv = iv.getAdvancedExpression();
System.out.println("its value is " + adv.getValue());
adv.insert(0, "1001");
System.out.println("its value is " + adv.getValue());
repos.save(m_dict);
} catch (Exception ex) {
System.out.println(ex.getMessage());
} catch (RepositoryException e) {
System.out.println(e.getMessage());
}

I think it's because you haven't called "update" on the datamodel before saving. Here's code I have:
RuleRepository webdavInstance = ...
RuleDictionary dict = new RuleDictionary( "dict1" );
dict.setDictionaryDescription("Dictionary One");
RuleSet rs = new RuleSet( dict ); //an empty ruleset
rs.setName( "rs1" );
// make changes
rs.update(); // update it in the dictionary
DataModel dm = new oracle.rules.sdk.editor.datamodel.DataModel(m_dict);
// make changes
dm.update(); // update it in the dictionary
webdavInstance.save( dict );
//--or--
//webdavInstance.saveAs( dict, "dict1a", "marker1");

Similar Messages

  • Oracle Business Rules SDK and Jdeveloper Plugin

    1. I am trying to locate Oracle Business Rules SDK for download to evaluate the package for a non-SOA, java EE application.
    2. I am also trying to locate a plugin for JDeveloper to create OBR rules.
    Any help would be appreciated.
    Thanks.

    No, not in 10.1.3 and not in the first planned 11 release. It is on the list of candidate features for future releases.

  • Business Rules with BPEL or ADF

    Hi,
    My requirement is :
    We have to migrate records from one DB table to another DB table.
    And we have to apply Business Rules on those records while they are on there journy from source DB to target DB.
    We have two choices to achieve this:-
    1) Use BPEL process and Tranform Record from Source to Destination by applying Business Rules
    Or
    2) Develop ADF application and use business rules SDK to fetch the Rules and apply them to Tranfer Data from Source DB to Traget DB.
    Can anybody suggest the better approach on this.
    Thanks & Regards,
    anvv sharma

    You may want to provide more information on your use case. The way I read this is that neither product would suite your use case. This looks more like an ETL solution, therefore ODI may be a better play.
    Is this a one off exercise?
    How big is the payload?
    what are the examples of the business rules?
    Are the business rules dynamic?
    cheers
    James

  • How to update the bucketset of business rules in MDS through Rules SDK

    How to update the bucketset of business rules in MDS through Rules SDK.
    Any sample code which will help me........ :)
    Is it possible to expose a Business Rule as webservice which was created with the help of Java fact?
    Edited by: 984804 on Jan 29, 2013 6:12 PM

    FYI, the output of this call returns something like:
    <?xml version="1.0" encoding="UTF-8"?> 
    <queryplan>
        <union>
            <fullOuterJoin>
                <statement index="1">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
                <statement index="2">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.nb_guests) FROM SALES, INVOICE_LINE, SERVICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) AND ( SERVICE.SL_ID=SERVICE_LINE.SL_ID ) AND ( SERVICE_LINE.service_line = 'Accommodation' ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
            </fullOuterJoin>
            <fullOuterJoin>
                <statement index="3">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
                <statement index="4">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.days * INVOICE_LINE.nb_guests * SERVICE.price) FROM SALES, INVOICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
            </fullOuterJoin>
        </union>
    </queryplan>

  • How to create business rules from Jdeveloper 10.1.3.1.0

    Dear Experts
    Can I able to create Oracle Business rules from My JDeveloper 10.1.3.1.0. Using this link They are creating repositories, rule sets for their BPEL process, But in my version I cant found <BPEL components> under component palette. Why these features are missing, to get those additional features what I have to do.. ? Please suggest your best for me.
    Also Is it possible to build business rules from java sdk & from rule author..? If so means what is the difference, which one is having advantage.
    Thanks,
    Rajesh

    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/decision.htm

  • Oracle Business Rules with Fusion Release 4

    Hi
    I am wondering if we can use the Oracle Business Rules product with the Oracle Fusion Compensation APplication Release 4.
    Thanks
    Srinivasa Sunchu

    Srinivasa,
    There are relevant chapters in the Oracle Fusion Middleware User's Guide for Oracle Business Rules. There is sample code interspersed in the chapters.
    7 Working with Rules SDK Decision Point API
    http://fmwdocs.us.oracle.com/vol/doclibs/fusionapps/review/E36909_01/user.1111/e10228/decision_point.htm#ASRUG455
    10 Working with Oracle Business Rules and ADF Business Components
    http://fmwdocs.us.oracle.com/vol/doclibs/fusionapps/review/E36909_01/user.1111/e10228/adfbc.htm#ASRUG378
    I looked through the source code of one of our products that uses the Rules SDK to see if there is an easy-to-extract example, but it's far beyond the scope of a forum post. We'll probably create one or more blog posts that dive deeper into this topic, but I cannot promise a date for that. Keep an eye on http://blogs.oracle.com/fadevrel please.

  • Business Rules for Business Users

    Folks,
    There is a requirement from my clients to use Business rules by Business users, apparently it is difficult to give them jdeveloper and ask to devlop, have you come across such situation? if so what is the best way to handle such scenarios.
    FYI: we're implementing 11g BRE
    TIA
    Srini

    The only way is to use Rules SDK. We had a similar requirement and had to develop a custom GUI with all CRUD operations using Rules SDK.
    The starting points are:
    http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10663/toc.htm
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10227/toc.htm (especially RuleSession)
    or simply starting from the master index (search for Business rules)
    http://download.oracle.com/docs/cd/E12839_01/nav/portal_booklist.htm
    rgds

  • Call ODI interface from Business Rule

    Hi All,
    Is there any way to call ODI interface from business rule?
    I search the forum and found there is a way to call java code from business rule by CDF.
    ODI provide a dos batch file to invoke the ODI interface. But, how can I call batch file from business rule.
    I am using planning version 11.1.1

    Thanks.
    I can call the JAVA from business rule after assign the security in udf.policy.
    And, I am working on calling ODI scenario. However, I found connection refuse as follows.
    ava.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:520)
         at java.net.Socket.connect(Socket.java:470)
         at java.net.Socket.<init>(Socket.java:367)
         at java.net.Socket.<init>(Socket.java:180)
         at oracle.odi.sdk.invocation.internal.AgentNetworkCmd.<init>(AgentNetworkCmd.java:38)
         at oracle.odi.sdk.invocation.OdiInvocation.<init>(OdiInvocation.java:107)
         at com.gammonconstruction.odi.ODICaller.main(ODICaller.java:
    do I need to add scheduler agent for java request ?
    and, how to add the agent if need?

  • Future of Oracle Business Rules

    Hi. We are in a middle of a significant Oracle Rules project on 10.1.3 and have noticed that the Rules component of 11g (preview) seems to either be a) absent or b) subsumed into BPEL.
    Can anyone give me a steer as to the roadmap for the Rules Engine - if it is "dead" then we may have time to switch to another platform to provide a rules engine.
    Thanks a million in advance

    Hi Phil,
    Could you list the steps on how to successfully connect, read/write to a WebDav folder as a Business Rule Repository? I want to compare what you have done and what I have done and check if I missed something.
    I have 2 installations on a single physical server: (1) Oracle AS Forms and Reports, it has an Apache Server and Webdav (2) Oracle SOA Suite, No Apache Server, this is where ruleAuthor is installed.
    is it required to that I access WebDav folder using HTTPS?
    When I access the webdav url using a browser, I get a 403 Forbidden error page;
    When I type in the webdav url in ruleAuthor I successfully connect but when I create a dictionary I get the following message:
    'RUL-01216: Error saving dictionary myDictionary. Please refer to the base exception. Root Cause: WebDAV error.
    oracle.webdav.impl.DAVContextImpl.lookup(DAVContextImpl.java:1366) at oracle.rules.sdk.store.webdav.WebDAVStore.getCollection(WebDAVStore.java:1156) at oracle.rules.sdk.store.webdav.WebDAVStore.traverseMarker(WebDAVStore.java:885) at oracle.rules.sdk.store.webdav.WebDAVStore.traverseDictionary(WebDAVStore.java:848) at oracle.rules.sdk.store.webdav.WebDAVStore.listDocuments(WebDAVStore.java:808) ... 31 more any ideas?

  • Where can I find the complete Oracle Business Rules Java API Reference ?

    Does anybody know where to get the complete Oracle Business Rules Java API Reference ?
    The version on http://download-east.oracle.com/docs/cd/B31017_01/web.1013/b28966/toc.htm is incomplete. It is missing the entire "oracle.rules.sdk.ruleset" package.
    Ki

    Kim,
    The oracle.rules.sdk.ruleset package is only for internal operation. The public interface to creating rules is oracle.rules.sdk.editor.ruleset , and this is included in the javadoc.

  • Invoking business rules 11g from Java application

    We have SOASuite 11g running on weblogic and have read through documentation/played with Oracle business rules
    We want to utilize business rules engine within our Java web applications deployed to glassfish server (Non SOA application). Is this even possible and does anyone use it in this way? Any pointer is much appreciated.
    What are the libraries like Oracle rules SDK that I need to include in the classpath of Java web app?
    This link assumes that web app is co-located in the same weblogic instance running SOASuite and doesn't help my case.
    http://docs.oracle.com/cd/E23943_01/user.1111/e10228/non_soa.htm#BGBBCICB
    By using it within Java application, we want to able to make local calls as opposed to calling a decision function as web service. Volume of actual rules and their usage is so high within our Java app. Also we want to take advantage of java beans defined in our business layer by using Java facts and without having to define XSD for XML facts.

    I had seen the blog, It explains how to test business rules by loading the dictionary from static rules file.
    my requirement is to invoke the business rule engine running on the SOA server, from the application module. can you please help me in this.
    Thanks inadvance.
    -Murali

  • Guideline for making java application to be used in oracle business rules

    hi'
    I am using Oracle Business Rules and trying to use one of my simple java program and trying to use it in rule author, however its showing "0 classes or packages have been imported.", please Tell me what guidelines to follow to program in Java so that we can use those Java classes in Rule Author.*
    I am using Oracle Rule author and in definition's Tab when I try to Import the classes then nothing is importing {color}"0 classes or packages have been imported."
    My Java class is
    package getDiscount;
    public class Test123 {
    private int i;
    public void setDiscount(int i) {
    this.i = i;
    public int getDiscount() {
    return i;
    public static void main(String args[]) {
    Test123 d = new Test123();
    d.getDiscount(100);
    void getDiscount(int quantity) {
    if (quantity &gt; 500) {
    setDiscount(10);
    System.out.println("Discount on this Quantity is--&gt;"+getDiscount());
    } else if (quantity &gt; 250 && quantity &lt; 499) {
    setDiscount(5);
    System.out.println("Discount on this Quantity is--&gt;"+getDiscount());
    } else {
    setDiscount(0);
    System.out.println("Discount on this Quantity is--&gt;"+getDiscount());
    Test class:
    package getDiscount;
    public class Test123 {
    private int i;
    public void setDiscount(int i) {
    this.i = i;
    public int getDiscount() {
    return i;
    public static void main(String args[]) {
    Test123 d = new Test123();
    d.getDiscount(100);
    void getDiscount(int quantity) {
    if (quantity &gt; 500) {
    setDiscount(10);
    System.out.println("Discount on this Quantity is--&gt;"+getDiscount());
    } else if (quantity &gt; 250 && quantity &lt; 499) {
    setDiscount(5);
    System.out.println("Discount on this Quantity is--&gt;"+getDiscount());
    } else {
    setDiscount(0);
    System.out.println("Discount on this Quantity is--&gt;"+getDiscount());
    Edited by: Yatanveer Singh on Dec 24, 2008 12:19 AM

    Error
    Cannot perform operation. 'RUL-01527: Received exception for loadClass. RUL-01016: Cannot load Java class lib.Demo. Please make sure the class and all its dependent classes are either in the class path, or user specified path. Root Cause: lib/Demo (wrong name: Demo) '
    Hide
    oracle.rules.sdk.exception.RulesSDKException: RUL-01527: Received exception for loadClass. RUL-01016: Cannot load Java class lib.Demo. Please make sure the class and all its dependent classes are either in the class path, or user specified path. Root Cause: lib/Demo (wrong name: Demo) at oracle.rules.sdk.mapper.RuleObjectHelper.loadClassOrPackage(RuleObjectHelper.java:2154) at oracle.rules.ra.uix.mvc.ClassSelectorEH.importClassesOrPackages(ClassSelectorEH.java:184) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at oracle.rules.ra.uix.mvc.BeanEH.genericHandleEvent(BeanEH.java:869) at oracle.rules.ra.uix.mvc.BeanEH.handleEvent(BeanEH.java:838) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.BasePageFlowEngine.handleRequest(Unknown Source) at oracle.cabo.servlet.AbstractPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.ui.BaseUIPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source) at oracle.cabo.servlet.UIXServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)

  • Error while creating a Business rule dictionary in Jdevloper 11g

    Hi,
    I am getting the following error when i define the Inputs and outputs during creating on a new business rule dictionary.
    Some XML schemas are not in the "xsd" directory! gardes.xsd
    Please manually move or copy the Schemas
    I am following the "Creating a Rule-enabled Non-SOA Java EE Application" guide in Oracle® Fusion Middleware User's Guide for Oracle Business Rules, 11g Release 1 (11.1.1)
    The two schema files generated were having different content after creation of XML schema file so I copied the file to make them same. Its still giving me the same error.
    Please Help.
    Thanks,
    Mac

    Please post business rules questions on the SOA Suite forum:
    SOA Suite

  • Error while selecting planning app in Business Rules

    Hi ,
    I am not being able to select the planning outline while developing business rules (but I can select the Essbase Outline). Whenever I expand the Planning node, an error pops up the details of which says "Error connecting to Essbase server machinename/testapp." There is a details button which says: "Could not log into Planning "Detail:Could not log in to Planning Server".
    Can anyone help me out. I am not being able to view the rules in the planning UI .
    I have tried for recycle the EAS even though i am getting same error.
    could you please let me know the solution for this
    Thanks
    mahesh

    Hi,
    Always follow this process, stop the planning service and eas service.
    Start RMI service
    Start EAS
    Start Planning
    Log into the web planning application
    Then go into EAS and create a new rule, select an outline to the application you have just logged into via web.
    Also if you are using the default admin user to log into EAS try another user that has been provisioned with business rules roles
    If you still have problems then go to My Oracle Support (formely metalink3) then have a look at doc id - 763345.1
    Ok?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Help needed in using oracle rules SDK

    Hi,
    For testing my rulesets using oracle rules SDK I doing the following:
    1. Creation of dictionary, ruleSet.
    2. Declared two kinds of globalVariable variables in my datamodel :
    Final and non-Final.(Type of these varaibles are String and Double only)
    3. Final globalVaraibles are used in creating rule's patterns.
    4. Non-Final globalVariables are used in creating rule's action.
    5. Functions are created for asserting globalVariables values and
    returning non-final varaibles, since those are required as action
    results.
    6. In java code I am testing my ruleset (dict.testRuleSet()). Before
    testing i am populating my final global variables (since these are used
    in rule's patterns),
    and updating datamodel.
    The above procedure is working fine and I rules are successfully working.
    Now, first of all i want to know if the above mentioned approach is correct or it needs to be reframed??
    secondly, when i update datamodel with values (in java code itself) it
    takes 4-5 seconds in updating it. This is the main issue that why it is
    taking this much time??
    any comment would be of great help.
    Thanks in advance.

    I will send up an alert for you, Colin. Even though I use iTunes for Mac, troubleshooting it isn't my forté.

Maybe you are looking for

  • Error message when opening Photoshop...

    I keep getting the same error message when I go to open up Photoshop and Illustrator CS4  (don't remember the exact words) but to this effect:  the original application has moved and needs repair..... click to repair....?  Anybody got any ideas on th

  • Travel Privilege Infotype (0017)

    Dear All, On trying to create Travel Privilege Infotype (0017)  I am getting the following error: Table V_T702N_A, argument 40 is not fully maintained When I checked the table for variant 40, Industry field is blank (there is no value for this). How

  • Express to PC question

    I have a PC downstairs which has no wireless card and is too far away from my Time Capsule for me to run a ethernet cable as it would look a complete mess (So the wife tells me). Currently I use a powerline connection to get internet access on the PC

  • Error code question

    I have a g4 which has stopped running and I need a little help. On start up it stops at the grey apple screen and doesn't boot up. I can boot up in target mode and are able to see the drive just fine. I ran an apple Hardware test and got a error code

  • Cache Notification

    Hi In my ID "cache Notification" cache Instance : Integration Server has cache updated status red square cache Instance : af.sxi.cache has cache updated status red square and                  Perform Notification status has Red square (Notification