Changes at once to all Business rules

Hi All,
I am having a requirement where I need to do some changes in all my Business Rules at one time which is related to the script content. How can I achieve this task?? From where and all I need to fetch for the scripts information. I would appreciate your suggestions. I using Planning 9.3.1, windows env.

Jockney also brings up a good point to use Macros where you have repetive code in your rules.
If you are looking to run some type of script on all the rules and you have a few the VB code below can be used to export these to a text represenation.
'Courtesy of John A. Booth
'Save as export_rules.vbs
'Replace SQLSERVERNAME AND AAS_CATALOG with their proper names for your environment
'Currently writen to work with MS SQL Server
'The id this executes as must have select access on the AAS_CATALOG
'Large rules (> 40KB) will take some time to export. Small rules export very quickly.
'CODE BEGINS
Dim numRules
Dim ID
Dim length
Dim index
Dim headerSize
Dim fileName
Dim rule
headerSize = 233
Set fs = CreateObject("Scripting.FileSystemObject")
Set rs = CreateObject("ADODB.Recordset")
Set cnSS = CreateObject("ADODB.Connection")
Set shellObj = CreateObject( "WScript.Shell" )
if (fs.FolderExists(shellObj.ExpandEnvironmentStrings("%USERPROFILE%") & "\Desktop\rules") = False) Then
fs.CreateFolder (shellObj.ExpandEnvironmentStrings("%USERPROFILE%") & "\Desktop\rules")
End If
cnSS.Open "Provider=sqloledb;" & "Data Source=SQLSERVERNAME;" & "Initial Catalog=AAS_CATALOG;" & "Integrated Security=SSPI"
strQuery = "Select max(id) from hbrrules"
rs.Open strQuery, cnSS
If (rs.EOF <> True) Then
numRules = rs.fields(0)
For ID = 1 To numRules
rule = ""
strQuery = "Select name from hbrrules where id=" & ID
rs.Close
rs.Open strQuery, cnSS
If (rs.EOF <> True) Then
fileName = rs.fields(0)
rs.Close
strQuery = "Select body from hbrrules where id=" & ID
Set rulefile = fs.CreateTextFile(shellObj.ExpandEnvironmentStrings("%USERPROFILE%") & "\Desktop\rules\" & fileName & ".txt", True, True)
rs.Open strQuery, cnSS
If (rs.EOF <> True) Then
length = rs.fields(0).ActualSize
For count = 1 To length - headerSize - 5
index = count + headerSize
If Chr(AscB(MidB(rs.fields(0).Value, index, 1))) <> Chr(10) Then
rule = rule & Chr(AscB(MidB(rs.fields(0).Value, index, 1)))
Else
rule = rule & VBNEWLINE
End If
Next
rulefile.WriteLine(rule)
rulefile.Close
End If
End If
Next
End If
rs.Close
'CODE ENDS

Similar Messages

  • Validate all business rule

    hi, is there a method to validate all business rules quickly in an application?

    I take it you are talking about EAS business rules, if so I am aware of being able to validate all the rules at once.
    The only way I could think of was to use the command line launcher to run through all the rules and use the -validate parameter.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Where can I view all Business rules that are currently running

    Hi,
    I was told that this is available in our Planning v11 but can't find it.
    where can I view all processes (such as Business rules) that users are currently running ?
    thanks.

    Hi,
    They are probably meaning the job console > Tools > Job console.
    More information > http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_user/job_stat.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Enable/select/change to Business rules from Calc Manager in App settings

    Hi all,
    Somehow we are Unable to Expand the Planning Node in Essbase Administration Services (EAS) Console When Creating Business Rules. I am not sure is it
    I am not sure, is it because of one of the application has calc settings as calc manager in under application settings in dev environment, but in other environment all applications set it as Business Rules.
    I was trying to change from Calc Manager to Business rules in App settings, but it is grayed out and not able to change to Business rule from calc manager.
    Please suggest me.
    Thanks,

    If it say been set incorrectly then you may need to update one of the relational tables for the application.
    Table - HSP_SYSTEMCFG
    Field - CALC_ENGINE_OPTIONS
    Values - 1=HBR, 2=CalcMgr
    Restart the planning application web app service after making changes.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to change the owner of business rules

    Hi,
    How to change the owner of the business rule's in hyperion 11.1.2.1.
    When i changed the owner name from planning to xxxxx i get "User not found reverting to nothing".
    Kindly help me with what id should i login to EAS (essbase administration services console) and the detailed process of changing the owner of business rule in properties tab.
    Cheers
    Praveen
    Edited by: Praveen on Nov 7, 2011 8:43 AM

    No....
    There is no 'ownership' of a tablespace. No such thing.
    UserA.tbl1 is owned by UserA, which is the same as saying it is in the schema UserA. It might be in tablespace USERS. If you want to change which tablespace it lives in, you can 'alter table' it to the new tablespace such as BIG_USERS. It would still be UserA.tbl1. I think you can move it online using Oracle's online reorg abilities.
    If you want the table to be owned by UserB, then you have to either export/import or CREATE TABLE AS SELECT it into UserB's schema. However doing so means that the table can no longer be referenced as UserA.tbl1. If you want that reference to work, you have to create a synonym in UserA's schema that points to UserB.tbl1. At no point does the ownership of the tablespace come in to question.
    I think you meant 'schema' instead of 'tablespace' in your original quesetion.

  • Business rule in MDS 2012 error: A database error has occurred. Contact your system administrator.

    I get the following information in my MDS log as well as the above error message when I execute a business rule that has a condition of AND and an Action of Attribute must be unique in combination with 2 other attributes. 
    I'm running SQL Server 2012 11.0.3000
    MDS database version 11.1.0.0
    Any ideas?
    MDS Error: 0 : SqlException message: A database error has occurred. Contact your system administrator.
       at Microsoft.MasterDataServices.Core.DataAccess.DbHelper.HandleExceptions(Exception ex)
       at Microsoft.MasterDataServices.Core.DataAccess.DbHelper.ExecuteDataSet(String spName, CloseConnectionBehavior closeBehavior, Object[] parameterValues)
       at Microsoft.MasterDataServices.Core.DataAccess.MasterDataAccess.<>c__DisplayClass5.<ValidateEntityMembers>b__4()
       at Microsoft.MasterDataServices.Core.DataAccess.DbHelper.ExecuteMethodWithDeadlockProtection(MethodDelegate method)
       at Microsoft.MasterDataServices.Core.BusinessLogic.Validations.ValidateMembers(Int32 versionId, Identifier entityIdentifier, IList`1 memberIds, RequestContext context, OperationResult results)
       at Microsoft.MasterDataServices.Core.BusinessLogic.Validations.Process(ValidationProcessCriteria criteria, Boolean commitVersion, Boolean validateEntityAsync, Boolean returnValidationResults, RequestContext context, OperationResult results)
    SQL Error Debug Info: Number: 208, Message: Invalid object name 'cteDuplicates0a070e37b106b9e3efe35a455076efa7'., Server: SQLRS-01, Proc: udp_SYSTEM_3_38_CHILDATTRIBUTES_ProcessRules, Line: 230
    SQL Error Debug Info: Number: 266, Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1., Server: SQLRS-01, Proc: udp_SYSTEM_3_38_CHILDATTRIBUTES_ProcessRules, Line: 230
    SQL Error Debug Info: Number: 266, Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1., Server: SQLRS-01, Proc: , Line: 0
    SQL Error Debug Info: Number: 266, Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1., Server: SQLRS-01, Proc: udpBusinessRule_AttributeMemberController, Line: 0
    SQL Error Debug Info: Number: 266, Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1., Server: SQLRS-01, Proc: udpValidateMembers, Line: 0
        DateTime=2013-08-15T13:25:15.6684023Z
    MDS Error: 0 : <ArrayOfError xmlns="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <Error>
        <Code>208</Code>
        <Context i:nil="true" />
        <Description>A database error has occurred. Contact your system administrator.</Description>
      </Error>
    </ArrayOfError>
        DateTime=2013-08-15T13:25:15.7152026Z

    OK I bit the bullet and contacted support on this one.
    There is a known issue with MDS 2012 and business rules with a combination of "must be unique" attributes. If you do not list the attributes in the same order that they were created you will get the generic error I cited. At first they told me it must be
    in the same order the attributes are in and that worked on one entity but not the other. The difference was that in the second entity I previously rearranged the attributes in question. Once I changed the order in the business rule to reflect the *original*
    order it worked like a champ.
    Hopefully this helps save someone some time and money.

  • Search for member name in WebForms and Business Rules - 11.1.2.1

    Hi,
    Client has a hierarchy with two parents (Owned and Managed) within a dimension. The 'Managed' parent is no longer valid. Thus they want to eliminate it and move it's children under the 'Owned' member. However there could be ramifications in Business Rules and/or WebForms. Is there a way to search all Business Rules and WebForms for 'Managed' to see which Business Rules and/or WebForms would be affected?
    Or is best way to extract all the WebForms and Business Rules to xml files via LCM and then write custom script to search the files? Not sure if this functionality is already there or not.
    They are on 11.1.2.1

    I don't think "Show Usage" picks up Business Rules that are in the Calculation Manger.
    Also check the Member Formulas - easiest to do in the EAS (view the Outline, and the member formulas are displayed. Otherwise, in Planning, you would need to go into each member individually, and that would take forever). And if you're using Partitions or MRAs, you should check them, too.
    I'm assuming you're doing all of this in a copy of the application, and not on a "live" app, right? So you can make the change and then validate the Business Rules and Outline, and the error messages will tell you where "Managed" was being used.
    -Matt Varner

  • Default Business Rules at AppSet level

    Hi Experts,
    Once you create a new AppSet by copying AppShell and add a "Consolidation" type application with all business rules, a default "Business Rules Library" is generated at AppSet level along with "Business Rule" within Application. The "Business Rules Library" at AppSet level includes "Consolidation Rules" and "Consolidation Methods". In my BPC 7.5 MS SP04 these default business rules table is empty, whereas it used to come with values pre-filled in it in earlier versions. I discussed this with one of the BPC NW consultant and he confirmed that for BPC 7.5 NW this issue was there that those values were there on backend but was not visible from the frontend Admin Console. After applying some patch in BPC 7.5 NW, it becomes visible in Admin Console Business Rules Library at AppSet level.
    Can anybody using BPC 7.5 MS version confirm whether they are getting these values by default or they are entering it manually.
    Edited by: Amitkumar Shyamanand on Jan 25, 2011 11:18 AM

    You may need to confirm with SAP Support, but I beleive that the latest versions of 7.5 on Microsoft has a very slimmed down version of AppShell, and that the business rules are not included in the process.  Best if you get an Appshell from version 7 and create you copy which will then have all the Appset Business RUles.
    Hope this helps.

  • MDS Business rule regular expression to validate code to be combination of two attributes

    Hi
    I need to have a business rule as below:
    entity1 have code, Attr1 and Attr2
    I have to ensure code is always combination of Attr1 and Attr2. If either of the Attr1 or Attr2 is blank, validation should fail.
    I tried below possibilities:
    1. Set Code to Auto generate
    2. Change tracking enabled for Attr1 and Attr2
    and below BRs:
    1. Attr1 has changed in group 1 AND (Attr2 has changed in group 1) then action:     Code equals a concatenated value Attr1 + Attr2
    2. Attr1 is equal to Blank OR Attr2 is equal to Blank then action:     Attr1 is required
        Attr2  is required
    3. Code must be unique Attr1 ,Attr2
    I see BRs 1 and 2 working. I have BR 3 to fail validation in case BR1 fails resulting code to remain auto generated value.
    but i dont see BR-3 working. At the end teh result is code with auto generated value validation is success.
    Is there a way i can overcome this issue?
    Any idea of referring attrbitues in Regular expression of this sort... to set Code equals to [Attr1] + [Attr2]?

    OK I bit the bullet and contacted support on this one.
    There is a known issue with MDS 2012 and business rules with a combination of "must be unique" attributes. If you do not list the attributes in the same order that they were created you will get the generic error I cited. At first they told me it must be
    in the same order the attributes are in and that worked on one entity but not the other. The difference was that in the second entity I previously rearranged the attributes in question. Once I changed the order in the business rule to reflect the *original*
    order it worked like a champ.
    Hopefully this helps save someone some time and money.

  • Run calc script via business rule

    Hello all,
    I have calc scripts and business rules in my hyperion essbase.
    one of the calc scripts e.g. aggregates some values.
    In the business rule i copied the code from the calc script and this business rule can be executed in the planning tool.
    Now, everytime when i change the code from the calc script, i have to change same things at the business rule.
    And now my question:
    Is it possible to start a calc script with the business rule?
    e.g. content of business rule: execute "calc_aggregate"
    Is there a command?
    Then it would save time and i only have to change the calc script and not both.
    Thanks for your efforts,
    Chris

    1) try to use essbase 9.3 with dataexport command in calc script (this version essbase is compatible with planning versions 9x and 4.1)
    2) you can write (or found in google) UDF function for run system command or (and) export data set
    3) you can run system command from Planning web and run CSC and RUL from essmsh
    ER

  • Can't see some Business Rules after running the Import via LCM

    I am trying to migrate our Business Rules down from Prod to Dev to get them back in sync. Here is the steps I have run:
    Export ALL Business Rules and Sequences from Prod via LCM
    I confirmed the export directory contains an .xml file for EACH Rule.
    copied the export directory down to Dev Shared Services server
    Turned on DEBUG for Shared Services
    Deleted ALL Business Rules and Sequences from Dev EAS BR repository
    I confirmed that ALL BUsiness Rules are listed and checked in LCM Import.
    run the Import from Dev Shared Services via LCM
    I get a Completed successfully message. No Errors.
    I Refresh Rules in Dev EAS and I only see 25% of the Business Rules listed.
    I have tried to Stop/Restart the EAS services and still nothing.
    I confirmed that the ID I am using to Export / Import has access on each Business Rule either directly or via a Group that has access.
    Any thoughts??
    Thanks in advance for any assistance on this!
    Robert

    Thanks John!
    I was really trying to get it done via LCM since I have all other migrations being done there. but I ended up taking your advice and doing it the old fashion way via EAS export.
    To answer your questions:
    We are on 11.1.1.3
    I did not see any problems in the Services logs for EAS. Nothing that stood out.
    We are migratiing 66 Rules and 15 Sequences.
    We are using Weblogic instead of Tomcat.
    Even though I have a workaround for the issue I am still interested in understanding why some of them did not import via LCM. You mentioned that you might consider adjusting some config settings. What settings would you recommend looking at?
    Thanks again John!
    Robert
    Edited by: user627522 on Nov 16, 2010 6:27 PM

  • How to Load Business Rule XML in 9.3.1

    Hello,
    I am using EAS 9.3.1. On the Business Rules component, I selected Export Business Rules, and it invited me to export all business rules, variables, macros, and projects into one xml file. Now I cannot figure out how to load that xml file. I am copying from a production environment to a development environment, because we moved the database of the development environment to another server. I have reconfigured the applications and databases. What do I have to do to load the xml file?
    Thank you,

    Thank you. I was getting the following error, and I thought it meant, I cannot expand the Business Rules icon because I did not have any business rules. If this something I configured incorrectly, or something the DBA missed?
    Error logging in to Business Rules. The repository has not been configured or you are not authorized to use Business Rules.
    Detail:Error creating DBConfig object. Please check if there are exceptions in the log file and if HBR is configured correctly.
    Detail:null

  • Business Rules are inconsistent in Planning

    Can someone confirm if ALL business rules have to be consistent in these both places:
    1. Navigate Icon -> Administer -> Calc Manager -> you drill down to Rules BR
    2. Tools -> Business Rules
    Why am I seeing differences between the two???

    If you have not deployed all the rules from calc manager then there will be a difference.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Hyperion Business Rules Restore

    Hi,
    I've Oracle EPM 11.1.2.1 installed on AIX 6.1 server. The Oracle EPM server crash. I've only a backup of Database schemas. Can I restore HBR? Only a database backup is enough to restore it? Into the EAS schema i can see the Business Rules descriptions. Where are store the scripts?
    Thanks in advance for your help.
    Regards,
    David.

    Yes, all Business Rules with scipts are store into the table HBRRULES from the EAS schema.

  • Error in Business Rules

    Hi Experts,
    I'm receiving an error each time I try to save or validate a business rule in the Admin Console. The error message is as follows:
    Cannot access a disposed object named "StatusDialog".
    Object name: "StatusDialog".
    This error occurs in all business rules and in all Appsets even in Appshell. We are running BPC NW 7.5 SP3. What can I do to solve the problem?
    Thanks in advance!
    Christian

    Hi Guys,
    I too get this "Error".
    Same Version and Service Pack 7.5 and SP03
    any resolutions?
    Brian

Maybe you are looking for