T-SQL functions & business rules

Why can't I use T-SQL string functions in business rules?
For example, REPLACE(my_attribute, 'xyz', '_')
from Moscow with money

The business rules is running under the account which is configured in web.config, which is likely an admin of the database.
Expose T-SQL could cause of security issues.
We are considering to support some limited TSQL or maybe store procedure or function in next release.

Similar Messages

  • String CDF functions not working in business rules

    Working with EPM 11.1.2. I created a calc script on the planning cube and it works perfectly. I then put the same code in a business rule and it will not validate. Please see the code below.
    1) created udf folder in following directory
    essbase/Oracle/Middleware/EPMSystem11R1/products/Essbase/EssbaseServer/java
    2) modified udf policy to grant access to all
    3) saved CDF_String.jar file to new udf folder on server
    4) registered functions via maxl
    5) stop/start application
    6) stopped/started EAS services
    I get the following error in the message window (line 9 is the JGetStringFromDouble statement):
    "Encountered " "-> " "-> "" at line 9, column 35.
    Was expected one of:
    What do I need to do to get this code working as a business rule since I want to use RTPs in this routine?
    FIX("No_Profit_Center", FY07:&CapAppEndYr, "Working Plan", "Current", "Manual_Input", "LOC", @Relative("Period",0), @Relative("Project",0), @Relative("Entity",0))
    "AC_Unappr_Fcst_Depr"
      IF ( "AC_Unappr_Fcst_Depr"  == #Missing)
         IF ("FY07"->"No_Period"->"AC_Depr_CC" != #Missing)
              "AC_Unappr_Fcst_Depr"->(@MEMBER(@CONCATENATE("EN_",@JgetStringFromDouble("FY07"->"No_Period"->"AC_Depr_CC",@_False,@_False))))  = "AC_Unappr_Fcst_Depr_Temp";
        ELSE
              "AC_Unappr_Fcst_Depr" = "AC_Unappr_Fcst_Depr_Temp";
        ENDIF
      ENDIF
    ENDFIXEdited by: jjdubb on Jun 11, 2012 9:10 AM

    I've had this issue with a different string function. Business Rules does not like the boolean parameters (@_FALSE) used in these CDF's. I had a similar issue and had to rewrite my CDF without the parameters. You basically need to hardcode the "with quotes" and "with decimals" parameters in the java code.
    Hope this helps,
    - Jake

  • Business Rules Error when Decision Function surfaced as WebService in BPM

    To use a BusinessRule as from a Business Rules activity,it needs to be surfaced as a WebService.
    I've run into an issue where as soon as I check that box and save, the BusinessRule in question goes into a error mode when viewed from the BPM Project Manager (which is why this question is posted here).
    The scenario is this:
    My types are defiend in XSD. There is a SimpleType - FooStepTypeType - which is a retricted xs:string, the common way top create an enumeration. I import this as an XML fact, it creates a Enum bucketset, which is perfect. I create a decision function - DecisionFunction1 - which has an input parameter of this type and a boolean output. I set up a simple decision table to use the input and assert the output. The editor is happy.
    At this point, I can't use the DF in my process, as it's not exposed a service, and won't be selectable via the the Properties/Implementation of a Business Rules activity.
    A soon as I mark the DF as a WebService and save it, an the rule disappears from the Rules section of the Business Catalog and reappears at the root of the catalog in error. In some cases it can't be edited.
    Hovering over the error file produced this error message:
    The argument ‘step’ of decision function ‘DecisionFunction1’ could not build because of ‘BPM-71517: Unable to identify the parameter QName. Cause: ‘FooStepTypeType. Action: Make sure that the decision function parameter is of XML type and exactly one XML Schema Element exists that represents the parameter’.
    My XSD previously did not contain a freestanding element of this type, but had elements defined in another complex type of this type. Adding a freestanding element didn't change anything. In fact it seems that elements are not avaialble to be imported as XMLFacts, only types.
    At this point, if the Rules editor is still open, the DF can be "unserviced" and after saving may be recoverable with a JDev restart. If not, manually removing the DF from the .rules xml file can help recover the file so that it can be edited again.
    SO: THE QUESTIONS.
    Why can't I use a simpleType as an input parameter for a DF exposed as a WebService? What is BPM-71517 asking me to do exactly? I can't find any references to it via searching. Why does eveything seem fine until I expose it?
    Addendum - using JDev 11.1.1.4.0 with BPM tools 11.1.1.4.0.5682
    Addendum2 - upgraded to 11.1.1.5.0 and the problem is still there.....
    TIA,
    Bill
    Edited by: wylderbeast on May 20, 2011 9:38 AM
    Edited by: wylderbeast on May 20, 2011 10:09 AM
    Edited by: wylderbeast on May 31, 2011 3:22 PM

    Further invesitgation bears this problem out.
    Oracle support recommend wrapping the SimpleType in a ComplexType. This does work, but now I have an extra wrapper element to deal with. I either have to use the wrapped type in my other complex, composed Types and/or add an external wrapping element when trying to create Business Services in BPM to call the BusinessRules I've created.
    This is a bit messy.
    To be clear, this does not seem to be an issue with Business Rules; the BR editor and generation of Facts (including simple restricted types -> JAXB 2.0/Java Enumerations) seems to work correctly. There seems to be an issue exposing DFs as Services. The code which generated the WSDL and its supporting types seems to choke on restricted SimpleTypes.
    As a side note, it seems that HumanTasks have a similar limitation
    Edited by: wylderbeast on May 31, 2011 3:27 PM

  • How to include the COUNT Function in business rule

    Hi all,
         I am working in oracle data quality in ODI.
         This is regarding the business rule in Data quality.
         I need to count the number of records when my status_type="A".
         But when i include the COUNT function in business rule.
         I find the following error as "*Unspecified Count Function*".
         Waiting for ur valuable reply.
         Thanks in advance,
         JayaPradha P

    Hi,
    The following is the condition I have to be used
    For eg:*Count records in DIM_SERVICE_ORDER_CODE where service_type = ‘P’*
    But when i use COUNT function.
    Im getting the error as "Unrecognised function count"
    waiting for ur valuable reply
    Thanks in advance,
    JayaPradha p

  • How to add Exception handling in Oracle Business rules Function

    Hello,
    We use to have good number of business rules in our application. So we need to have some functions in BR Composite.
    Can some one let me know how to handle exception in Oracle business rules exception( Regular try catch will not compile)
    is there any way please let me know.
    Edited by: Network22 on Mar 25, 2013 10:21 AM

    Why aren't you using por_custom_pkg.custom_validate_req_line to add extra validations.
    Ensure that profile POR: Enable Requisition Line Customization is set to Yes if you were to use po_custom_pkg for Requisition line validations.
    OAF calls por_custom_pkg at various points depending upon the values in Profile Options:-
    POR: Enable Req Distribution Customization
    POR: Enable Req Header Customization
    POR: Enable Requisition Line Customization
    Thanks,
    Anil Passi

  • Oracle Business Rules Custom Functions

    Hi,
    I have an input fact with attributes A,B,C & D and an output fact with E, C & D. (C & D attributes are common in both facts)
    Whenever the rule matches, we are asserting new output fact by assigning a constant value to attribute 'E' and also the transactional values to C & D using input fact's C & D attributes.
    This way, we are making sure to return the response with matched transactional values.
    But we would like to do this by writing a custom function so that user need not assign this mapping manually whenever any new rule creates. User just assigns the constant value to attribute E but values to C & D attributes should be assigned automatically.
    Please let me know your suggestions on this.
    Regards,
    KK

    Hi Subha,
    Please find the answers inline :
    1. In Oracle Business Rules, can one rule invoke another rule?
    -- > Yes, once a rule gets executed, it might create more facts, that in turn fire another rule. It all runs around the inout/output facts.
    2. Can we make two rule sets dependent on each other?
    -- > Yes
    3. Can we return data of types String, Boolean, Integer, Double from a rule execution?
    -- > Yes, you can use java code with functions.
    4. Can we build complex logical AND, OR assertions in Oracle rules?
    -- > Java programming language is needed for this..
    5. Can we use custom business objects (not Java data types) within a rule?
    -- > Dont think so
    Regards
    Anirudh Pucha

  • Business Rule:Usage of @ISMBR with User Prompts/ Variables+Loop Function

    Hi,
    currently facing a business rule user prompt - if-selection issue - not sure, if it's simply a bug or other ways how to solve it:
    depending on runtimeprompt [RTP_VERSIONS], either the 1st or 2nd part of the rule should get executed using a loop command.
    The special thing is, that you can choose several versions simultaniously in runtimeprompt : as soon, as Data Input is part of the selection, the 1st part of the if-section should apply and the 2nd loop executed (and other way round)
    this works if I select 1 Member in the user prompt, but does not work, if I select several members.
    according to the manual, @ismbr function is "true", if already 1 member is matching !
    I experiemented in addition to @ismbr with @list and @range and also with additional == "Data Input"
    any idea, which other command should apply ? any experience, if using user-variables with several member selections in if-sections is a problem ?
    of course I could simply create separate businessrules or restrict runtimeprompt to 1 value/ version - but inconvenient.
    we are on system 9.3
    Businessrule:
    VAR breakvar1=1; /*Controls Deletion of Budgetdata on Version Data Input */
    VAR breakvar2=1; /*Controls Deletion of ALL Data on selected Versions */
    FIX( "BegBalance",
    [RTP_SCENARIO],
    *[RTP_VERSIONS]*,
    "Local",
    +..... other dimensions+ )
    "HSP_InputValue"
    IF( *@ISMBR("Data Input")* AND not @ISMBR(&Scenario_1_curr))
    breakvar1=1;
    breakvar2=0;
    ELSEIF( not @ISMBR(&Scenario_1_curr))
    breakvar1=0;
    breakvar2=1;
    ENDIF;
    ENDFIX;
    SET UPDATECALC OFF;
    SET MSG SUMMARY;
    Loop(1,breakvar1) /* delete all accounts = all data */
    FIX( [RTP_SCENARIO],
    [RTP_VERSIONS],
    @IDESCENDANTS([RTP_PROJECT])
    CLEARBLOCK ALL;
    ENDFIX;
    ENDLOOP
    Loop(1,breakvar2) /* delete only budget accounts, not setupdata */
    FIX( [RTP_SCENARIO],
    [RTP_VERSIONS],
    @IDESCENDANTS([RTP_PROJECT]),
    *@IDESCENDANTS("Costs")*
    CLEARBLOCK ALL;
    ENDFIX;
    ENDLOOP
    Edited by: Rodian Abel on May 4, 2010 10:38 PM
    Edited by: Rodian Abel on May 4, 2010 10:43 PM

    I think he is saying he does want to allow the user to select more than one member.
    You mention you are using @ismbr and @list. I would say that should be the one that would work.
    For example if you wanted Version1 and Version2 and you hardcoded it. It would look like this
    If (@ismbr(@list(Version1,Version2))
    So using your Variable I expect you wrote it like this
    if (@ismbr(@list(variable)) and that it didn't work.
    @range is useful as it is cross dimensional and that isn't the case here. So if @list doesn't work than this is a bug/problem for your specific situation and will have to approach it differently.

  • Business Rules functionality

    Does anybody know about plan to include Business Rules into SAP NetWeaver?
    I mean functionality like Oracle Business Rules 
    http://www.oracle.com/technology/products/ias/business_rules/pdf/businessPresentation.pdf

    Shame on me/SAP that we did not give you an answer earlier.
    Pls see the blogs of me and Rajagopalan Narayanan for details.

  • Solving "COMMIT business rules" on the database server

    Headstart Oracle Designer related white paper
    "CDM RuleFrame Overview: 6 Reasons to get Framed"
    (at //otn.oracle.com/products/headstart/content.html) says:
    "For a number of business rules it is not possible to implement these in the server
    using traditional check constraints and database triggers. Below you can find two examples:
    Example rule 1: An Order must have at least one Order Line ..."
    But, one method exists that allows solving "COMMIT rules" completely on the database level.
    That method consists of the possibility of delaying the checking of the declarative constraints (NOT NULL, Primary Key, Unique Key, Foreign Key, Check Constraints) until the commit
    (that method was introduced first in the version 8.0.).
    E.g. we add the field "num_emps" to the DEPT table, which always has the value of the number
    of the belonging EMP rows and add DEFERRED CK which uses the values from that field:
    ALTER TABLE dept ADD num_emps NUMBER DEFAULT 0 NOT NULL
    UPDATE dept
    SET num_emps = (SELECT COUNT (*) FROM emp WHERE emp.deptno = dept.deptno)
    DELETE dept WHERE num_emps = 0
    ALTER TABLE dept ADD CONSTRAINT dept_num_emps_ck CHECK (num_emps > 0) INITIALLY DEFERRED
    Triggers that insure the solving of the server side "COMMIT rules" are fairly simple.
    We need a packed variable that is set and reset in the EMP triggers and those value
    is read in the bur_dept trigger (of course, we could have place the variable in the package
    specification and change/read it directly, thus not needing the package body,
    but this is a "cleaner" way to do it):
    CREATE OR REPLACE PACKAGE pack IS
    PROCEDURE set_flag;
    PROCEDURE reset_flag;
    FUNCTION dml_from_emp RETURN BOOLEAN;
    END;
    CREATE OR REPLACE PACKAGE BODY pack IS
    m_dml_from_emp BOOLEAN := FALSE;
    PROCEDURE set_flag IS
    BEGIN
    m_dml_from_emp := TRUE;
    END;
    PROCEDURE reset_flag IS
    BEGIN
    m_dml_from_emp := FALSE;
    END;
    FUNCTION dml_from_emp RETURN BOOLEAN IS
    BEGIN
    RETURN m_dml_from_emp;
    END;
    END;
    CREATE OR REPLACE TRIGGER bir_dept
    BEFORE INSERT ON dept
    FOR EACH ROW
    BEGIN
    :NEW.num_emps := 0;
    END;
    CREATE OR REPLACE TRIGGER bur_dept
    BEFORE UPDATE ON dept
    FOR EACH ROW
    BEGIN
    IF :OLD.deptno <> :NEW.deptno THEN
    RAISE_APPLICATION_ERROR (-20001, 'Can''t change deptno in DEPT!');
    END IF;
    -- only EMP trigger can change "num_emps" column
    IF NOT pack.dml_from_emp THEN
    :NEW.num_emps := :OLD.num_emps;
    END IF;
    END;
    CREATE OR REPLACE TRIGGER air_emp
    AFTER INSERT ON emp
    FOR EACH ROW
    BEGIN
    pack.set_flag;
    UPDATE dept
    SET num_emps = num_emps + 1
    WHERE deptno = :NEW.deptno;
    pack.reset_flag;
    END;
    CREATE OR REPLACE TRIGGER aur_emp
    AFTER UPDATE ON emp
    FOR EACH ROW
    BEGIN
    IF NVL (:OLD.deptno, 0) <> NVL (:NEW.deptno, 0) THEN
    pack.set_flag;
    UPDATE dept
    SET num_emps = num_emps - 1
    WHERE deptno = :OLD.deptno;
    UPDATE dept
    SET num_emps = num_emps + 1
    WHERE deptno = :NEW.deptno;
    pack.reset_flag;
    END IF;
    END;
    CREATE OR REPLACE TRIGGER adr_emp
    AFTER DELETE ON emp
    FOR EACH ROW
    BEGIN
    pack.set_flag;
    UPDATE dept
    SET num_emps = num_emps - 1
    WHERE deptno = :OLD.deptno;
    pack.reset_flag;
    END;
    If we insert a new DEPT without the belonging EMP, or delete all EMPs belonging to a certain DEPT, or move all EMPs of a certain DEPT, when the COMMIT is issued we get the following error:
    ORA-02091: transaction rolled back
    ORA-02290: check constraint (SCOTT.DEPT_NUM_EMPS_CK) violated
    Disvantage is that one "auxiliary" column is (mostly) needed for each "COMMIT rule".
    If we'd like to add another "COMMIT rule" to the DEPT table, like:
    "SUM (sal) FROM emp WHERE deptno = p_deptno must be <= p_max_dept_sal"
    we would have to add another column, like "dept_sal".
    CDM RuleFrame advantage is that it does not force us to add "auxiliary" columns.
    We must emphasize that in real life we would not write PL/SQL code directly in the database triggers, but in packages, nor would we directly use RAISE_APPLICATION_ERROR.
    It is written this way in this sample only for the code clarity purpose.
    Regards
    Zlatko Sirotic

    Zlatko,
    You are right, your method is a way to implement "COMMIT rules" completely on the database level.
    As you said yourself, disadvantage is that you need an extra column for each such rule,
    while with CDM RuleFrame this is not necessary.
    A few remarks:
    - By adding an auxiliary column (like NUM_EMPS in the DEPT table) for each "COMMIT rule",
    you effectively change the type of the rule from Dynamic (depending on the type of operation)
    to a combination of Change Event (for updating NUM_EMPS) and Static (deferred check constraint on NUM_EMPS).
    - Deferred database constraints have the following disadvantages:
    When something goes wrong within the transaction, then the complete transaction is rolled back, not just the piece that went
    wrong. Therefore, it becomes more important to use appropriate commit units.
    There is no report of the exact row responsible for the violation nor are further violations either by other rows or of other
    constraints reported.
    If you use Oracle Forms as a front end application, the errors raised from deferred constraints are not handled very well.
    - CDM discourages the use of check constraints. One of the reasons is, that when all tuple rules are placed in the CAPI,
    any violations can be reported at the end of the transaction level together with all other rule violations.
    A violated check constraint would abort the transaction right away, without the possibility of reporting back other rule violations.
    So I think your tip is a good alternative if for some reason you cannot use CDM RuleFrame,
    but you'd miss out on all the other advantages of RuleFrame that are mentioned in the paper!
    kind regards, Sandra

  • How to return less than 4000 characters from pl/sql function in SQL call?

    Hello,
    Is there a way to limit length for varchar when calling pl/sql function from SQL? No matter how I write it it always returns 4000 bytes.
    If there is none, then does it make sense ever to specify lenght of the return variable?
    My goal is to encapsulate business rules within pl/sql functions. But if all varchar columns are returned as 4000 it is not feasible solution. Not only this is a performance issue in a data warehousing environment, bet when using those rules within SQL views user experiance would suffer as well. Are we left with the rule hardcoding solution? Also, I think that using SUBSTRING or TRUNC functions on top of business rules function defeats the purpose.
    Please see my attempt below. Your thoughts are appreciated.
    Thank you.
    /* Formatted on 06/11/2009 2:26:41 PM (QP5 v5.126.903.23003) */
    CREATE OR REPLACE FUNCTION mytest (myvar_in VARCHAR2)
    RETURN VARCHAR2
    AS
    l_return VARCHAR2 (15);
    BEGIN
    l_return := 'TEST_' || myvar_in;
    RETURN l_return;
    END mytest;
    CREATE TABLE TEST_ME
    AS
    SELECT mytest ('ME') AS VERYLONG FROM DUAL;
    describe TEST_ME;
    RUN ABOVE CODE:
    Function created.
    Table created.
    TABLE TEST_ME
    Name Null? Type
    VERYLONG VARCHAR2(4000)
    Edited by: Ilmars2 on Jun 11, 2009 2:46 PM

    Pointless,
    Thanks for jumping in on this and I am glad you asked :).
    I do not doubt that it is an architectural challenge. Otherwise it would have been done already! I am struggling with the fact that SQL knows what data type the function will return, but does not know the length of it, precision or scale. I will leave it at that.
    I will go with some high level requirements to allow for alternative thoughts:
    1)     Business defined rules. There are multiple types of business rules. Simple lookups, bucketing, complex calculations, data retrieved from other tables etc. We have about 500 different rules. Some of them are even overloaded – different inputs will produce the same output.
    Some simple examples are:
    Rule1 - Fruit
         when ‘A’ then ‘Apple’
         When ‘O’ then ‘Orange’
         Else ‘N/A’ end
    Rule2 – Bonus
         when STATUS =’Active’ and LEVEL=’CEO’ then bonus=salary*1.0
         when STATUS =’Active’ and LEVEL=’nobody’ then bonus=salary*0.01
         else bonus=0
    Rule 3 – Income Bracket
         When more than 0 and less or equal to 30000 then INC_B=’LOW’
         When more than 30000 and less of equal to 60000 then INC_B=’MIDDLE’
    Etc.
    2)     Challenge: All data users in an organization need to use the same rules (let’s assume data source is Oracle database). How to expose all the rules to different types of users in manageable way? Types of users – analysts, application/web developers, data warehouse teams etc.
    3)     Current system: Not only each user has coded their own rules (luckily based on the common specification), but hard-coding is taking place for each query within the confines of one project. The project I just looked at had about 12 modules with 30 hardcoded queries. Oops! Few rules just changed.
    My take: I was leaning toward encapsulating business logic within UDF’s. UDF’s provide all the flexibility we need + overloading. All the functions could be consumed by data warehouse team (building summary tables, cubes etc.) and application developers. For power users we could build views by applying the same functions on top of the source data. Thus avoid data duplication. It seemed win-win until this 4000 issue :).
    Your thoughts on alternative approaches are appreciated.
    Thank you.

  • Demonstrating PL/SQL Functions Using SQL Developer

    Good afternoon,
    I'm starting to write some PL/SQL functions to replace some of the SQL that I use most frequently.  A couple of very simple examples would be:
    create or replace function func_test (p_1 number) return number
    is
    x number;
    y number;
    begin
    x :=1;
    y :=2;
    return p_1 * x * y;
    end func_test;
    create or replace function func_test2 (p_1 varchar2) return varchar2
    is
    return_val varchar2(10);
    begin
    select p_1 into return_val from dual;
    return return_val;
    end func_test2;
    However, at my workplace I haven't been granted create function privileges yet until I can demonstrate some examples, which is understandable.
    For the time being, without these privileges, is there a way I can build/test functions in principle locally using SQL Developer without the need to write the functions to our database? I.e. can I demonstrate the above in SQL Developer, but without wrapping in create or replace syntax?
    I hope this isn't too vague.
    Using Oracle 11gR2 (not logged in to workplace database at the moment for specific version no.)
    SQL Developer 3.4
    Thanks,
    TP

    sb92075 02-Nov-2013 19:12 (in response to TinyPenguin)
    populating test DB with data is a solvable problem.
    You don't need client data to test code (functions).
    You only need sample test data; which generally is less than a few dozen records per table.
    Absolutely, of course. Our client database is pretty messy though, and includes data prior to the implementation of more recent business rules that I need to take account of. Useful perspective though, thanks.
    rp0428 02-Nov-2013 19:14 (in response to TinyPenguin)
    Sure, but then I wouldn't have access to all the data in our client database to test functions under various circumstances.
    Huh? Why not? It's your database so what keeps you from creating a database link to your client database where all the data is?
    Also, I suppose it's not good practice to constantly write/replace/drop functions to/from a database when developing them? Better to test the function in principle and then write to the database?
    Huh? Why not? What you think a dev database is for if not for development?
    Based on your two posts so far in this thread it's understandable why they don't want to give you privileges yet. Those sample 'functions' you posted are NOT a good use for functions.
    In sql developer you can just create and save the queries you use most often. There is no need to create functions for that.
    But if you do need an anonymous function now and then just create one using sql*plus syntax:
    Our IT department are pretty sensitive about how they allow access, even to the dev environment. As you've identified, I'm not naturally a programmer so the option to play around with the data to develop some representative examples about how we can simplify and devolve SQL reporting to more members of staff is useful to me. I just wrote those two function quickly for the purpose of posting some sample data, which I thought would be helpful. Thanks for illustrating how to return their output using an anonymous block.
    FrankKulash 02-Nov-2013 19:13 (in response to TinyPenguin)
    Hi,
    The obvious solution is to get the privileges.  If your employer really wants you to do something, they need to give you the necessary privileges to do it.  It's silly for them to tell you to do something, but refuse to let you do it.
    Failing that, you can install Oracle on your own machine, as suggested above.  It's free and legitimate if you're only using it for learning and developing.  Oracle Express Edition is very easy to install.
    As a last resort, you can write functions and procedures that are local to an anonymous block, like this:
    Thanks Frank. Yeah I'm going to speak with our DBA next week about privileges. I've got XE/SQL Developer installed on my own computer - I wrote those sample functions using them - I just wasn't sure how to call/return anonymous blocks as both you and rp identified to develop at work as an interim solution.
    Thanks a lot All,
    TP.

  • Why not allow Business Rule Design Transformer to overwrite existing BRDDs

    Hi,
    It can be quite annoying during development to continually having to remove the BRDD Trigger and PL/SQL Definition when running the BR Design Transformer reveals missing information in the BR Analysis definition. It seems that it would be practical to have at least the option to have the Business Rule Design Transformer overwrite an existing Business Rule Design Definition.
    You could think of an additional parameter in this utilily labeled "Overwrite existing BRDD?" with allowable values Y(es) and N(o) with No as default (so that the default functionality is the same as before).
    Below you find the code that can be added to the HSU_BRTR package to realize such a functional improvement. Maybe you can consider it for a next release...?!
    best regards,
    Lucas Jellema
    AMIS Services BV
    code to add to HSU_BRTR to provide a parameter that allows the user to specify whether or not the HSU_BRTR is allowed to overwrite an existing BRDD:
    in the revision history:
    09-jan-2003 Lucas Jellema
    6.5.2.3AMIS1.1 Added new parameter and supporting code that allows user to indicate
    whether existing Business Rule Design Definitions may be/should be overwritten
    at the end of procedure install
    hsu_install.add_parameter
    ( PACKAGE_NAME -- package name
    , 40 -- sequence
    , 'Overwrite existing BRDDs?' -- prompt
    , 'N' -- default value actual
    , 'No' -- default value displayed
    , 'Y' -- mandatory
    , 'N' -- allow multi-select
    , 'N' -- include shared elements
    , '' -- element type short name
    , '' -- sql expression actual
    , '' -- sql expression displayed
    , null -- where clause
    , null -- synchronize with
    , null -- foreign key column
    , -- help text
    'Choose whether you want this utility to overwrite existing Business Rule Design Definitions.'
    hsu_install.add_allowable_value
    ( PACKAGE_NAME -- package name
    , 40 -- parameter
    , 1 -- sequence
    , 'Y' -- actual value
    , 'Yes' -- displayed value
    hsu_install.add_allowable_value
    ( PACKAGE_NAME -- package name
    , 40 -- parameter
    , 2 -- sequence
    , 'N' -- actual value
    , 'No' -- displayed value
    --------6.5.2.3AMIS1.1
    Just before procedure transform_stage2
    procedure delete_brdds
    ( p_tbl_id in ci_table_definitions.id%type
    , p_br_name in varchar2
    -- Purpose Delete existing Business Rule Design Definition
    -- Usage from run procedure
    -- Remarks Find PL/SQl Module Definition based on Business Rule Label
    is
    cursor c_brdd
    ( b_tbl_id in ci_table_definitions.id%type
    , b_br_name in varchar2
    is
    select trg.id trg_id
    , trg.name name
    , plm.id plm_id
    from ci_database_triggers trg
    , ci_plsql_modules plm
    where trg.table_definition_reference = b_tbl_id
    and trg.plsql_module_reference = plm.id
    and plm.name = b_br_name
    begin
    -- loop over journalling busrules of this application
    <<brdd>>
    for r_brdd in c_brdd(p_tbl_id, p_br_name) loop
    -- delete busrule (delete of trigger is since 6i not enough anymore, so
    -- explicitly delete PL/SQL module also)
    bllog.write
    ( 'Deleting trigger '||r_brdd.name||' and PL/SQL module '
    ||hsu_name.get_name_and_path(r_brdd.plm_id)
    ||', a new business rule design definition overwrites this old one.'
    , bllog.information
    bltrg.del(r_brdd.trg_id);
    blplm.del(r_brdd.plm_id);
    end loop brdd;
    end delete_brdds;
    inside procedure transform_stage2
    (just before the comment: -- check if BRDD with this plm_name already exists)
    if p_overwrite_br = 'Y'
         then
    delete_brdds
    ( p_tbl_id => g_trg_tbl(i).tbl_id
    , p_br_name => l_plm_name
         end if; -- find_trg and overwrite =Y
    A new parameter in procedure transform_br_fun
    procedure transform_br_fun
    , p_overwrite_br in varchar2 default 'N' -- 6.5.2.3AMIS1.1
    use the parameter p_overwrite_br in the call to transform_stage2
    transform_stage2
    ( p_fun_id => p_fun_id
    , p_fun_label => r_fun.fun_function_label
    , p_fun_short_definition => r_fun.fun_short_definition
    , p_msg_prefix => p_msg_prefix
    , p_msg_language => p_msg_language
    , p_rule_type => l_rule_type
                   , p_overwrite_br => p_overwrite_br -- 6.5.2.3AMIS1.1
    new parameter p_overwrite_br in the procedure run
    NOTE: in both PACKAGE SPECIFICATION and BODY
    , p_overwrite_br in varchar2 default'N' -- 6.5.2.3AMIS1.1
    use the parameter p_overwrite_br in all calls to transform_br_fun inside procedure run
    transform_br_fun
    ( p_fun_id => r_fun_tree.id
    , p_msg_prefix => p_msg_prefix
    , p_msg_language => p_msg_language
    , p_create_att_usages => p_create_att_usages
    , p_overwrite_br => p_overwrite_br -- 6.5.2.3AMIS1.1

    Among the alternatives not mentioned... Using a TiVo DVR, rather than the X1; a Roamio Plus or Pro would solve both the concern over the quality of the DVR, as well as providing the MoCA bridge capability the poster so desperately wanted the X1 DVR to provide. (Although the TiVo's support only MoCA 1.1.) Just get a third-party MoCA adapter for the distant location. Why the hang-up on having a device provided by Comcast? This seems especially ironic given the opinions expressed regarding payments over time to Comcast. If a MoCA 2.0 bridge was the requirement, they don't exist outside providers. So couldn't the poster have simply requested a replacement XB3 from the local office and configured it down to only providing MoCA bridging -- and perhaps as a wireless access point? Comcast would bill him the monthly rate for the extra device, but such is the state of MoCA 2.0. Much of the OP sounds like frustration over devices providing capabilities the poster *thinks* they should have.

  • Business Rule in BPC 5.1

    Dear all,
    I got 2 questions regarding business rule:
    1. There are 2 types of business rule.
    Script-based = You write your own script ( MdX or SQL logic)?
    Table-based = The table is more like a parameter table. You configure the parameters in the business rule tables and use corresponding store procedure in some logic file to trigger the function.
    ex:
    You must setup the currency translation rule table and call SPRUNCONVERSION to execute currency translation function.
    Is this correct?
    2. According to the SAP BPC admin guide, the rule files will be converted to LGL file, is this still the same in BPC 5.1? I can't find any related LGL in the system.
    Best Regards,
    Jeff

    You're mixing termology and functionality.
    Business rules are configured under the application/business rule tab in administration.  They are SQL stored procecures that cannot be modified and are seutp using the business rules tables.  The values in the table are passed into the SP's as parameters.  SPRunConversion is an example of a business rules stored procedure.
    Separately, there is script based logic.  This is setup under the Applicaton/Script Logic tab in administration.  These are calculations that are written by the application administrator (a number of examples are provided) to peform calculations.  There is a script logic example (FXTrans) which perfroms the same process as SPRunConversion.  They are text based files which get "compiled" into executed code.  The file you write to is the LGF file.  This contains the source code along with comments and spacing for readability.  The compiled file has an LGX extension and is a text file which has extra spacing and comments removed and any *INCLUDE statements replaced with the underlying coce.

  • Business rules for check current date and session user

    MDS 2012
    Hi All! How to make validation business rules:
    1.  date < GETDATE()
    2.  current session user is UserName(), where UserName() - system function like in MS Analysis Services
    from Moscow with Love

    There is no way to create this with a Business Rule, you have to write a custom workflow or SQL nightly job or something to update your fields.
    Ok people start screaming.
    "solution" if you want to call it that. USE AT YOUR OWN RISK, try in dev first :)
    1. Create an Attribute / Column in your Entity and call it Today or something.
    2. Go to Business Rules and create a dummy rule where you are setting this attribute (unconditionally with no Condition)
         Today equals 1/1/2000 or something.
    3. Go to tblBRItem find this BR and etin ItemSQL  from N'1/1/2000' to GETDATE()
    now you have Todays Date field...
    OK NEVER MIND, I've tried it and it works, the problem is that tblBRItems gets updated via a stored proc and will overwrite your entry.
    One can modify the code there as well but I don't have time to play with it unfortunately, as at that time you have to pass some token in to identify some values as your own special commands ... Either way this becomes messy and not a way to go.

  • Designer TAPIs, business rules, and journalling

    Is it possible to create table APIs, as with Designer, when using either SQL Developer or the Data Modeler?
    If not, is the practice of encapsulating tables considered redundant and do you have any suggestions as to where business rules should be placed (assuming we're not placing them all in an ADF middle tier)?
    I also noticed a previous post stating that the creation of journal tables, again as in Designer, was not possible with SQL Developer / Data Modeler. Are there any plans to add this very useful functionality?
    Thanks,
    David

    Maybe this project will be helpful.
    http://code.google.com/p/tapig/
    Table API Extension for Oracle SQL Developer
    Regards

Maybe you are looking for

  • MAC osx SUPPORT for 6500 classic

    i am a new owner for the 6500 classic and wondered why nokia dont list this phone under the mac support? does any one have any recommendations of software/plugins i can download for mac tiger 10.4 that will sync with ical etc etc but that will work w

  • How settlement amt is calcuated in CO88 for process order in 2 currencies

    Hi,        How the settlement amount is calcuated in CO88 settlement accounting document in local currecny and group currency. When  we are converting local currecny amount with exchange rate which has picked in BKPF Table from local to Group it is n

  • Goods Receipt workflow

    Dear All, What are the steps to create the workflow for Goods Receipt notification without approval. How we can assign the standard  WS10400010 -- Goods Receipt Workflow Without Approval. Regards, Rahul Singh

  • Load Transactional Data Current Year: 0PM_OM_OPA_1" doesn't delete previous

    Hi Experts, We are doing load monitoring on dailiy basis, As we are doing some testing in the BW Development system, we are loading data into the cube 0PM_C01. we want to load the current year data (2007-2008). but whenever we are trying to load thro

  • Logging in to creative crowd problems

    when i log in i get told instantly you have been logged out so i cant install software that i need to do work i tried unistalling and reinstalling creative cloud but this made no difference and i dont know what to do