Rule loop debugging

What is the best approach to resolve rule loops in a higly complex rule loops.
I understand what is rule loop but want to know to understand approaches.
Thanks

Using the debugger, you should make sure you follow your well-grounded data chain back through the relationships the rule loop relies upon, all the way to a point that does not have any further dependencies. You'll probably also want to make sure all the relationships participating in the loop are marked as complete.
If your rule loop is not terminating, then that suggests your data relationships are not well grounded. You will need to remove from the session data as many specific entries from the relationships as you need to until you can get the rule loop to terminate. That will give you a starting point to understand why there is a data loop that is preventing the rule loop from stabilising.
Hope that helps.
Davin.

Similar Messages

  • Rule loop and RaiseEvent

    Hi All,
    How to use rule loop to raise custom events? how raise custom events works? there is not much given in the OPM help on this.
    thanks,
    Edited by: OPAUser on Jan 17, 2013 2:48 AM

    THE OPM User's Guide has some information; search on the word "event" or "rule loop".
    There is a section in the user guide called "Use rules to trigger external software applications" that mentions custom event rule and raiseevent.
    There is another section called 'Model Loops in Rule Logic".
    Edited by: 941611 on Jan 17, 2013 7:25 AM

  • Rule loop has not stabilised

    Hi,
    Often I get this error while running rulebase ..
    Rule loop has not stabilised after 2000 iterations.
    at com.oracle.determinations.engine.local.LocalSession.thinkStep(LocalSession.java:739)
    at com.oracle.determinations.engine.local.LocalSession.think(LocalSession.java:784)
    Can anyone know why this error comes?
    Thanks,
    Rajan

    This means you've created a rule loop, but haven't made sure that the chain always has a defined start.
    Make sure that in every case the logic has a shortcut that prevents it looping endlessly.
    Go to the OPM help, and search for "rule loop": http://docs.oracle.com/html/E38269_01/toc.htm
    You will find this topic is the top hit: http://docs.oracle.com/html/E38269_01/Content/Writing%20rules/Model_loops_in_rule_logic.htm
    Davin.
    Edited by: Davin Fifield on 13-Feb-2013 15:29

  • Debugging: start routine in transfer rules

    Hi !
    can you please tell me how to debug start routines  and field routines in transfer rules?
    If possible please tell me too debugging of update rules.

    Hi Rajib,
    Go to the monitor -> Details tab -> Processing -> Choose the datapackage you want to debug -> Right click -> Simulate update -> Choose eather activate debugging in transfer rules (to debug in transfer rules) or debugging in update rules(for start routine and update rules).
    You can mention the number records you want to debug also, if you have an idea of which records you want to debug you can give the number of that record.
    Once the debug screen comes up, press F8...the control stops at first break point...from there you can do a step by step debugging (F5).
    Hope this helps...
    Regards,
    Kalyan

  • Debug the transfer Rule

    Hi,
    Please let me know how to but the break point in the Transfer Rule to debug it
    Regards,
    Mayank

    Hi Mayank,
    You can simulate debugging in transfer rules or update rules if you have used a PSA.
    To simulate debuggin with selective records, load your data target via PSA.
    Load the info package till PSA.
    In the Details tab, in the monitor of your infopackage/scheduler---> in the details tab-->drill down the messages until you start seeing data package.
    When you right click on the message Proceesing of Data package1/2/...n,  you will find an option to simulate debug.If you select this option it opens a new window where you could mentione---> activate the debugger in the transfer rule or activate the debugger in the update rule...
    Please refer to the SAP help link below for further details or clarification.
    [ Debugging transfer rules|http://help.sap.com/saphelp_nw04/helpdata/en/5c/37e03ba722cb5ae10000000a114084/frameset.htm]
    In DTP, there is one specific processing mode for debugging and you could switch the debugger at particular break points by checking the relevant checkbox.
    Hope this helps,
    Best regards,
    Sunmit.

  • JLabel in Rules class won't display

    import java.awt.Dimension;
    import java.awt.Toolkit;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.SwingConstants;
    import Graphics.DrawFrame;
    public class Caller { //driver class
         public static void main(String[] args) { //main method
              int width = 350; //sets width to 350 pixels
              int height = 150; //sets height to 150 pixels
              Toolkit toolkit = Toolkit.getDefaultToolkit(); //creates a Toolkit object
              Dimension dim = toolkit.getScreenSize(); //creates a Dimension object and stores the screen size
              do {
                   //DrawFrame.setDefaultLookAndFeelDecorated(true); //decorates the look and feel
                   DrawFrame frame = new DrawFrame((dim.width-width)/2, (dim.height-height)/2, width, height, "How to Play"); //creates an instance of DrawFrame and sets it in the center of the screen with a height of 300 and a width of 300
                   JButton rules = new JButton("Play"); //creates a newJButton with the text "play"
                   JLabel label = new JLabel("<html>Press ENTER to call a new number.<br>Press R to reset game.<br> The game resets if all 75 numbers have been called.<br> Press H to see this screen again.<br> Click the button or press ENTER to start.", SwingConstants.CENTER); //creates a JLabel that explains the game and centers it in the frame
                   frame.panel.add(label); //adds the label to the frame
                   label.setOpaque(true); //sets the label as opaque
                   label.setVisible(true); //makes the label visible
                   frame.panel.add(rules); //adds the button to the frame
                   rules.setOpaque(true); //sets the button to opaque
                   rules.setVisible(true); //makes the button visible
                   ButtonListener button = new ButtonListener(); //creates instance of ButtonListener class
                   rules.addActionListener(button); //adds an Action Listener to the button
                   frame.getRootPane().setDefaultButton(rules); //sets button as default button (clicks button when user hits ENTER
                   frame.setVisible(true);
                   while (button.source != rules) {//loops if the source of the ActionEvent wasn't the button
                        label.repaint(); //repaints the label
                        rules.repaint(); //repaints the button
                   frame.dispose(); //deletes the frame when the button is clicked
                   Bingo.bingoCaller(); //calls the method in the bingo class
              } while(true); //loops indefinitely
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class ButtonListener implements ActionListener { //class implements ActionListener interface
              public Object source; //creates an object of type Object
              public void actionPerformed(ActionEvent e) { //actionPerformed method that has an ActionEvent ofject as an argument
                   source = e.getSource(); //sets the source of the ActionEvent to source
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.awt.Toolkit;
    import java.awt.event.KeyEvent;
    import Graphics.*;
    public class Bingo {
         static Ball balls[][] = new Ball[5][15]; //creates a 2D 5 by 15 array
         public static void bingoCaller() {
              //DrawFrame.setDefaultLookAndFeelDecorated(true); //decorates the look and feel
              int width = 1250; //sets width to 1250 pixels
              int height = 500; //sets height to 500 pixels
              Toolkit toolkit = Toolkit.getDefaultToolkit(); //creates a Toolkit object
              Dimension dim = toolkit.getScreenSize(); //creates a Dimension object and sets the it as the screen size
              DrawFrame frame = new DrawFrame((dim.width-width)/2, (dim.height-height)/2, width, height, "Automated BINGO Caller"); //creates instance of DrawFrame that is 1250 pixel wide and 500 pixels high at the center of the screen
              Graphics g = frame.getGraphicsEnvironment(); //calls the getGraphicsEnvironment method in the DrawFrame class
              Keys key = new Keys(); //creates instance of the Keys class
              frame.addKeyListener(key); //adds a KeyListener called Key
              for (int x = 0; x < 5; x++) { //fills rows
                   for (int y = 0; y < 15; y++) { //fills columns
                        balls[x][y] = new Ball(x, y+1); //fills array
              frame.pack(); //adjusts the size of the frame so everything fits
              g.setColor(Color.black); //sets the font color of the letters to black
              g.setFont(new Font("MonoSpace", Font.BOLD, 50)); //creates new font
              for(int y=0;y<balls.length;y++){ //draws all possible balls
                   g.drawString(balls[y][0].s, 0, y*100+50); //draws numbers
                   for(int x=0;x<balls[y].length;x++){ //draws all possible balls
                        g.drawString(Integer.toString(balls[y][x].i), (x+1)*75, y*100+50); //draws letters
              frame.repaint(); //repaints numbers
              do {
                   int x, y; //sets variables x and y as integers
                   int count = 0; //sets a count for the number of balls called
                   boolean exit; //sets a boolean to the exit variable
                   do {
                        exit = false; //exit is set to false
                        x = (int)(Math.random() * 5); //picks a random number between 0 and 4 and stores it as x
                        y = (int)(Math.random() * 15); //picks a random number between 0 and 14 stores it as y
                        if (!balls[x][y].called) { //checks to see if a value is called
                             exit = true; //changes exit to true if it wasn't called
                             balls[x][y].called = true; //sets called in the Ball class to true if it wasn't called
                   } while (!exit&&count<5*15); //if exit is false, and count is less than 75returns to top of loop
                   for(int z=0;z<balls.length;z++){ //looks at balls
                        g.setColor(Color.black); //displays in black
                        g.drawString(balls[z][0].s, 0, z*100+50); //draws balls as a string
                        for(int a=0;a<balls[z].length;a++){ //looks at all balls
                             if (balls[z][a].called){ //if a ball is called
                                  g.setColor(Color.red); //change color to red
                                  count++; //increments count
                             } else {
                                  g.setColor(Color.white); //if it isn't called stay white
                             g.drawString(Integer.toString(balls[z][a].i), (a+1)*75, z*100+50); //draws balls as string
                   boolean next=false; //initiates boolean value next and sets it to false
                   frame.repaint(); //repaints the balls when one is called
                   while(!next) {
                        try {
                             Thread.sleep(100); //pauses the thread for 0.1 seconds so it can register the key pressed
                        } catch (InterruptedException e) {
                             e.printStackTrace(); //if it is interrupted it throws an exception and it is caught and the stack trace is printed
                        if(key.keyPressed==KeyEvent.VK_ENTER){ //if Enter is pressed
                             next=true; //next is set to true
                             key.keyPressed=0; //keypressed value is reset to 0
                        }else if (key.keyPressed == KeyEvent.VK_H) {
                             new Rules();
                             key.keyPressed = 0;
                        } else if (key.keyPressed == KeyEvent.VK_R) { //if R is pressed
                             key.keyPressed=0; //keypressed is reset to 0
                             next=true; //next is set to true
                             count=5*15; //changes count to 5*15
                             for(int z=0;z<balls.length;z++){ //recreates rows
                                  g.setColor(Color.white); //sets color to white
                                  g.drawString(balls[z][0].s, 0, z*100+50); //redraws rows
                                  for(int a=0;a<balls[z].length;a++){ //recreates columns
                                       balls[z][a] = new Ball(z, a+1); //fills array
                                       g.drawString(Integer.toString(balls[z][a].i), (a+1)*75, z*100+50); //redraws columns
                   if (count==5*15) { //if count = 5*15
                        for(int z=0;z<balls.length;z++){ //recreates rows
                             g.setColor(Color.white); //sets color to white
                             g.drawString(balls[z][0].s, 0, z*100+50); //redraws rows
                             for(int a=0;a<balls[z].length;a++){ //recreates columns
                                  balls[z][a] = new Ball(z, a+1); //fills array
                                  g.drawString(Integer.toString(balls[z][a].i), (a+1)*75, z*100+50); //redraws columns
              } while (true); //infinite loop only terminates program when the close button is clicked
    package Graphics;
    import java.awt.Graphics;
    import javax.swing.JFrame;
    public class DrawFrame extends JFrame{
         public Panel panel; //creates a variable called panel of type Panel
         public DrawFrame(int width, int height, String s) { //constructor for size and title
              super(s); //gets s from class that calls it
              this.setBounds(0, 0, width, height); //sets size of component
              initial(); //calls method initial
         public DrawFrame(int x, int y, int width, int height, String s) { //second constructor for size, title, and where on the screen it appears
              super(s); //gets title from the class that calls it
              this.setBounds(x, y, width, height);     //sets size of component     
              initial(); //calls method initial
         void initial() {
              this.setResizable(false); //disables resizing of window
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //terminates program if close button is pressed
              this.setPreferredSize(getSize()); //gets the size and set the preferred size
              panel = this.getPanel(); //gets the an instance of the Panel class and store the reference in panel
              this.getContentPane().add(panel); //adds panel to the frame
              this.setVisible(true); //makes the frame visible
              panel.init(); //calls the init method form the Panel class
         public Graphics getGraphicsEnvironment(){ //return type of Panel for method getGraphicsEnvironment
              return panel.getGraphicsEnvironment(); //returns the GraphicsEnvironment from class Panel
         Panel getPanel(){ //method getPanel with return type of Panel
              return new Panel(); //returns a new instance of the Panel class
    package Graphics;
    import java.awt.Graphics;
    import javax.swing.JFrame;
    public class DrawFrame2 extends JFrame{
         public Panel panel; //creates a variable called panel of type Panel
         public DrawFrame2(int width, int height, String s) { //constructor for size and title
              super(s); //gets s from class that calls it
              this.setBounds(0, 0, width, height); //sets size of component
              initial(); //calls method initial
         public DrawFrame2(int x, int y, int width, int height, String s) { //second constructor for size, title, and where on the screen it appears
              super(s); //gets title from the class that calls it
              this.setBounds(x, y, width, height);     //sets size of component     
              initial(); //calls method initial
         void initial() {
              this.setResizable(false); //disables resizing of window
              this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); //terminates program if close button is pressed
              this.setPreferredSize(getSize()); //gets the size and set the preferred size
              panel = this.getPanel(); //gets the an instance of the Panel class and store the reference in panel
              this.getContentPane().add(panel); //adds panel to the frame
              this.setVisible(true); //makes the frame visible
              panel.init(); //calls the init method form the Panel class
         public Graphics getGraphicsEnvironment(){ //return type of Panel for method getGraphicsEnvironment
              return panel.getGraphicsEnvironment(); //returns the GraphicsEnvironment from class Panel
         Panel getPanel(){ //method getPanel with return type of Panel
              return new Panel(); //returns a new instance of the Panel class
    package Graphics;
    import javax.swing.JPanel;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Image;
    public class Panel extends JPanel{
         Graphics g; //initiates variable g as type Graphics
         Image image; //initiates variable image as type Image
         public void init() {
              image = this.createImage(this.getWidth(), this.getHeight()); //creates the image with the specified height and stores it as image
              g = image.getGraphics(); //uses the getGraphics method from the Image class and stores it as g
              g.setColor(Color.white); //sets the color of g to white
              g.fillRect(0, 0, this.getWidth(), this.getHeight()); //fills the rectangle
         Graphics getGraphicsEnvironment() { //method getGraphicsEnvironment with return type Graphics
              return g; //returns g
         public void paint(Graphics graph) { //overrides the paint method and passes the argument graph of type Graphics
              if (graph == null) //if there is nothing in graph
                   return; //return
              if (image == null) { //if there is nothing in image
                   return; //return
              graph.drawImage(image, 0, 0, this); //draws the image
    package Graphics;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    public class Keys extends KeyAdapter{
    public int keyPressed; //creates a variable keyPressed that stores an integer
    public void keyPressed(KeyEvent e) { //creates a KeyEvent from a KeyListner
              keyPressed = e.getKeyCode(); //gets the key from the keyboard
    public class Ball {
         String s; //initiates s that can store data type String
         int i; //initiates i that can store data as type integer
         boolean called = false; //initiates called as a boolean value and sets it to false
         public Ball(int x, int y) {
              i = (x * 15) + y; //stores number as i to be passed to be printed
              switch (x) { //based on x value chooses letter
              case 0: //if x is 0
                   s = "B"; //sets s to B
                   break; //breaks out of switch case
              case 1: //if x is 1
                   s = "I"; //sets s to I
                   break; //breaks out of switch case
              case 2: //if x is 2
                   s = "N"; //sets s to N
                   break; //breaks out of switch case
              case 3: //if x is 3
                   s = "G"; //sets s to G
                   break; //breaks out of switch case
              case 4: //if x is 4
                   s = "O"; //sets s to O
         public String toString() { //overrides toString method, converts answer to String
              return s + " " + i; //returns to class bingo s and i
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import javax.swing.JLabel;
    import javax.swing.SwingConstants;
    import Graphics.DrawFrame2;
    public class Rules {
         public Rules() {
         int width = 350;
         int height = 150;
         Toolkit toolkit = Toolkit.getDefaultToolkit();
         Dimension dim = toolkit.getScreenSize();
         DrawFrame2 frame = new DrawFrame2((dim.width-width)/2, (dim.height-height)/2, width, height, "How to Play");
         JLabel label = new JLabel("<html>Press ENTER to call a new number.<br> Press R to reset game.<br> The game resets if all 75 numbers have been called.<br> Press H to see this scrern again.", SwingConstants.CENTER);
         frame.panel.add(label);
         label.setOpaque(true);
         label.setVisible(true);
         frame.setVisible(true);
    I created this program to call bingo numbers. When you start the program a small frame appears that tells you how to use the program. When you click the button that frame is disposed and a new one appears that call the numbers. Both of these frames have code in them that will find the dimensions of your screen and put the frames in the center. When you press enter a new number is called by changing the number from white (same color as background) to red. Once all 75 numbers have been called it resets the game. If you press R at anytime during the game the game resets. I had wanted to create a new frame that would display how to play in the middle of the game. It had to be different than the one at the beginning where it doesn't have the button and it isn't in the driver class (class Caller). If you press H at anytime after it starts calling numbers the new frame will be displayed. I have a class (DrawFrame) that extends JFrame but that had the default close operation set to EXIT_ON_CLOSE and I didn't want the program to terminate when the user clicked the x in the how to play frame. I created DrawFrame2 to solve this problem where the only line of code that is different is that the default close operation is DISPOSE_ON_CLOSE. The name of the class I used for the new how to play frame is Rules. The code in this class should work but for some reason the JLabel isn't displaying. Can someone please help me out?

    I just copied the code from class Caller into Rules and reworked it a bit and it worked.

  • ABAP "WRITE" Statements for Debugging

    Just curious to know if one can use ABAP write statements in Update Rules for debugging and auditing, and where the results are actually written to, and if they're accessible via the AWB.
    Thank you.

    Jerry you can write to the monitor from within the update rules.
    The debug message you were going to write out instead go ahead and append your message to the monitor structure.
    FORM compute_data_field
    TABLES   <b>MONITOR</b> STRUCTURE RSMONITOR  
    USING    COMM_STRUCTURE LIKE /BIC/CS8ZTESTODS
             RECORD_NO LIKE SY-TABIX
             RECORD_ALL LIKE SY-TABIX
             SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
    CHANGING RESULT LIKE /BIC/VZTESTCUBT-INVCD_QTY
             RETURNCODE LIKE SY-SUBRC
             ABORT LIKE SY-SUBRC.
    You will then be able to view any messages you have added to the monitor in the monitor.
    Hope this helps.
    Cheers

  • Dynamic Rule based implementation in PL/SQL

    Hi,
    We are trying to implement a dynamic rule based application in Oracle 9i. Its simple logic where we store expressions as case statments and actions seperated by commas as follows.
    Rule: 'Age > 18 and Age <65'
    True Action: 'Status = ''Valid'' , description = ''age in range'''
    False Action: 'Status =''Invalid'', Description=''Age not in range'''
    Where Age,Status, description are all part of one table.
    One way of implementing this is fire rule for each record in the table and then based on true or false call action as update.
    i.e
    select (case when 'Age > 18 and Age <65' then 1 else 0 end) age_rule from tableX
    (above query will in in a cursor xcur)
    Then we search for
    if age_rule = 1 then
    update tablex set Status = ''Valid'' , description = ''age in range'' where id=xcur.id;
    else
    update tablex set Status =''Invalid'', Description=''Age not in range'' where id=xcur.id;
    end if;
    This method will result in very slow performance due to high i/o. We want to implement this in collection based method.
    Any ideas on how to dynamically check rules and apply actions to collection without impact on performance. (we have nearly 3million rows and 80 rules to be applied)
    Thanks in advance

    Returning to your original question, first of all, there is a small flaw in the requirements, because if you apply all the rules to the same table/cols, than the table will have results of only last rule that was processed.
    Suppose rule#1:
    Rule: 'Age > 18 and Age <65'
    True Action: 'Status = ''Valid'' , description = ''age in range'''
    False Action: 'Status =''Invalid'', Description=''Age not in range'''
    and Rule#2:
    Rule: 'Name like ''A%'''
    True Action: 'Status = 'Invalid'' , description = ''name begins with A'''
    False Action: 'Status =''Invalid'', Description=''name not begins with A'''
    Then after applying of rule#1 and rule#2, results of the rule#1 will be lost, because second rule will modify the results of the first rule.
    Regarding to using collections instead of row by row processing, I think that a better approach would be to move that evaluating cursor inside an update statement, in my tests this considerably reduced processed block count and response time.
    Regarding to the expression filter, even so, that you are not going to move to 10g, you still can test this feature and see how it is implemented, to get some ideas of how to better implement your solution. There is a nice paper http://www-db.cs.wisc.edu/cidr2003/program/p27.pdf that describes expression filter implementation.
    Here is my example of two different methods for expression evaluation that I've benchmarked, first is similar to your original example and second is with expression evaluation moved inside an update clause.
    -- fist create two tables rules and data.
    drop table rules;
    drop table data;
    create table rules( id number not null primary key, rule varchar(255), true_action varchar(255), false_action varchar(255) );
    create table data( id integer not null primary key, name varchar(255), age number, status varchar(255), description varchar(255) );
    -- populate this tables with information.
    insert into rules
    select rownum id
    , 'Age > '||least(a,b)||' and Age < '||greatest(a,b) rule
    , 'Status = ''Valid'', description = ''Age in Range''' true_action
    , 'Status = ''Invalid'', description = ''Age not in Range''' false_action
    from (
    select mod(abs(dbms_random.random),60)+10 a, mod(abs(dbms_random.random),60)+10 b
    from all_objects
    where rownum <= 2
    insert into data
    select rownum, object_name, mod(abs(dbms_random.random),60)+10 age, null, null
    from all_objects
    commit;
    -- this is method #1, evaluate rule against every record in the data and do the action
    declare
    eval number;
    id number;
    data_cursor sys_refcursor;
    begin
    execute immediate 'alter session set cursor_sharing=force';
    for rules in ( select * from rules ) loop
    open data_cursor for 'select case when '||rules.rule||' then 1 else 0 end eval, id from data';
    loop
    fetch data_cursor into eval, id;
    exit when data_cursor%notfound;
    if eval = 1 then
    execute immediate 'update data set '||rules.true_action|| ' where id = :id' using id;
    else
    execute immediate 'update data set '||rules.false_action|| ' where id = :id' using id;
    end if;
    end loop;
    end loop;
    end;
    -- this is method #2, evaluate rule against every record in the data and do the action in update, not in select
    begin
    execute immediate 'alter session set cursor_sharing=force';
    for rules in ( select * from rules ) loop
    execute immediate 'update data set '||rules.true_action|| ' where id in (
    select id
    from (
    select case when '||rules.rule||' then 1 else 0 end eval, id
    from data
    where eval = 1 )';
    execute immediate 'update data set '||rules.false_action|| ' where id in (
    select id
    from (
    select case when '||rules.rule||' then 1 else 0 end eval, id
    from data
    where eval = 0 )';
    end loop;
    end;
    Here are SQL_TRACE results for method#1:
    call count cpu elapsed disk query current rows
    Parse 37 0.01 0.04 0 0 0 0
    Execute 78862 16.60 17.50 0 187512 230896 78810
    Fetch 78884 3.84 3.94 2 82887 1 78913
    total 157783 20.46 21.49 2 270399 230897 157723
    and this is results for method#2:
    call count cpu elapsed disk query current rows
    Parse 6 0.00 0.00 0 0 0 0
    Execute 6 1.93 12.77 0 3488 170204 78806
    Fetch 1 0.00 0.00 0 7 0 2
    total 13 1.93 12.77 0 3495 170204 78808
    You can compare this two methods using SQL_TRACE.

  • Find break-points source code (update rules, transfer rules)

    Hi all,
    Is there any effective and efficient way to find (active) break-points in source code, more specfic update rules, transfer rules or other objects where custom code is implemented? Or in other words look for strings in source code or programs.
    I looked and searched everywhere but could not find any answer.
    RSRSCAN1 (does not work)
    RPR_ABAP_SOURCE_SCAN (does not exist)
    We are on SAP BW 3.5 with SAP Basis 640.
    Thanks all.

    Hi,
    Try this
    1)  if you're checking any program from SE38 ..goto Utilities -> find in the source code-> give breakpoint and search.
    2) else. load data , Goto details tab in the monitor and right click on any of the data packages.
    Simulate update -> choose transfer rules or update rules for debuging.-> It will take you debuging screen. -> Create a watch point with key word "break-point" and execute (F8).
    It will go and stop where there is  "break-point"

  • Logical Loop Lunacy

    I'm having trouble with something that will inevitably raise the question 'why the heck would you want to do that anyway?', but here goes...
    Entity 'A' has a one-to-many relationship with entity 'B'.
    There are multiple instances of entity 'B', but one is 'special' in that it's always there, let's call it instance '99'. There is always at least one other instance of entity 'B' with a sequence number 1, 2, 3, 4... for as many instances as exist (up to 98 of them, but more usually 5-10).
    I want to assign a value to an attribute of instance 99 based on a rule that looks at the value of the same attribute across all other instances of the entity.
    The rule is easy, but I keep getting a logical loop as I'm using the attribute stated in the conclusion in the condition. However, in the condition I'm actually only using the attribute stated within the scope of the instances of the entity that are specifically not the instance implied in the conclusion (although I know of no way to specify which instance I want in the conclusion, hence the logical loop).
    I think I need some sort of 'conditional scope' function...
    Any ideas? I'd rather not (as I have had to currently) define a new attribute within entity 'B' specifically to be the equivalent attribute to the one I'm trying to derive as the 'IT' side of OPA is outsourced and I'd rather not have the issue of testing they've mapped the 'equivalent' attributes (this is an example of something I need to do for a number of attributes) to the correct fields in the database - those being the same as those fields for the 'non-equivalent' attirbutes!
    My head hurts - apologies if your's does now as well...
    Thanks,
    Alex

    Alex,
    If you are using 10.2, you can just mark the involved rules as being part of a rule loop - it sounds perfectly fine in your example as it is just a rule loop rather than being a data loop.
    Otherwise I would just do it with two attributes - the existing attribute that you collect, with the second one being:
    * the value of the existing attribute if it isn't instance '99'
    * the computed value if it is instance '99'
    That way you at least get a final attribute that splices together the base and computed values.
    Regards
    Andrew

  • Create a rule using a flow

    Can anybody help me to create a rule in OPA for the flow mentioned below. How can I make use of rule loop for the flow?
    Step #     Activity (with Description) Goto
    1     Update beneficiary info (if applicable) in the Elevation
    spreadsheet for beneficiary account elevation for DB & HW benefits and send for processing. Step 2
    2     Did batch produce rejects? (Yes/No) If Yes then step3 and If No then step5
    3     Research reason for elevation reject ? Step 4
    4     Resolve issue and update Elevation Spreadsheet ? Step 1
    5     Create Life Event in HW Survivors Account to assign coverage to Survivor. Goto death initiation flow(//death initiation is some other flow//)
    Please tell how can I create a rule for this flow?
    Edited by: 902867 on Dec 16, 2011 8:25 AM
    Edited by: 902867 on Dec 16, 2011 8:27 AM

    Generally speaking rules should be declarative, not "flows" or "loops" (which would be procedural rather than declarative). Declarative (natural language) rules are generally specified in the following format: Do/Decide something if ...
    This format enables rule authors to specify complete truths/policies without having to consider how the other hows, whats, whens that are required when specifying flows or procedures (which often assume something else happened first or will happen later and therefore require the author to check / ensure that those assumptions still hold whenever a policy requires a change).
    Getting back closer to your question, I would suggest the following:
    Assume the "Send for processing" bit is the external application deciding to consult OPA to make a determination. The external app sends in the relevant data. The rulebase might contain rules similar to the following:
    rejects were produced if ...
    <something> is rejected (what is the thing being rejected and should the rules specify the conditions under which the something is rejected)
    the <something> should be investigated due to a rejection if
    the something is rejected (you might care about which reasons in your rules?)
    the survivor is assigned the coverage if
    rejects were not produced and (what other conditions specify when to assign a specific coverage to a specific survivor?)
    the death initiation flow should be initiated if
    the survivor is assigned the coverage
    One thing to keep in mind with declarative specification of rules / policies is that the order of the rules in the rule documents does not matter (i.e. the author need not be concerned with the order of specified rules nor order in which the rules will be evaluated). All decisions which can be made based on available data will be made and only those rules that can reach a definitive conclusion based on the data will "execute" and reach the conclusion specified in the rule.
    Hope this helps ...
    BTW - The OPM help and available training on the products provide a significant amount of content on how to approach writing rules (vs. traditional procedural / flow based coding). A few quick examples from the Oracle Policy Modeling Help: "What is a rule?" and it's related links, the topic "Rule principles for Oracle Policy Modeling", etc.

  • Debug diag 2.x questions

    We have a command line app that is automatically / periodically launched throughout the day via bat file (app runs does it processing then terminates).   Occasionally, this executable will crash. Hoping to get a crash dump from Debug Diag for further
    debugging.  Note, there is no active target when configuring Debug Diag as the exe has not run yet.  
    Can Debug Diag be set up to monitor an EXE that is not currently running but will be intermittently launched throughout the day?
    Also, not entirely sure what the application error is.  Just know that it is fatal to the app.  Do I have to configure a custom crash rule?  Can Debug Diag be triggered to dump from a blanket all fatal exceptions rule?
    Debug Diag 2.0.0.179
    Windows Server 2008 R2 X64

    Hi,
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thanks for your understanding and support.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Simple IOS questions: Debug, Release, Distribution

    IOS question:
    Can someone explain what the different build settigs are, and also what certificates/code-signing is needed for each, and whether I can set the signing rules for Debug, Release and Distribution, and be able to build whatever I need without having to change them.
    #1
    I get debug, and distribution.  So what is release?
    #2
    What is the proper setting for the code-signing for each of Debug, Release, Distribution?
    (What I have done in the past is just set them all to the Team provisioning when building for local users, and the Distribution provisioning when I need to do a distribution.  It seems to me that I ought to be able to set the proper provisioning certificates for all 3 settings and never have to change them because it should use the correct one for each type of build, Right?)  So, how to anser #2?
    Thanks!

    Thanks KT, as usualy you're full of good links to information.
    Still reading through things, skimming the parts I know and reading about features I've never used.
    It's a Duh moment for Release vs. Debug.... just stripping symbols, oh yeah.
    However, still no clear answer about #2.... should I be able to set the provisioning certs once, and never have to touch them again?  Especially now, with the Archive pane in the Organizer window, and using the Archive pane to submit for distribution, it asks about code signing again.  It's not clear to me why I'm selecting these things in 3 separate places.  So, I'd like to know if setting it once, such as below, works well or do I need to change them for each build?
    Or can I just use the Share (for local builds) and Submit (for Distribution) once this is all set Once and for all?

  • Validate message multiple records in Business Rule

    I have Order message as below:
    <Orders>
    <Order>
    <Header>
    <BillToID>001</BillToID>
    <ShipToID>002</ShipToID>
    <Id>Order001</Id>
    </Header>
    <OrderLine>
    <Id>Line001</Id>
    <Date>2015-01-01T00:00:00</Date>
    <Qty>10</Qty>
    <Status></Status>
    </OrderLine>
    <OrderLine>
    <Id>Line002</Id>
    <Date>2015-01-01T00:00:00</Date>
    <Qty>15</Qty>
    <Status></Status>
    </OrderLine>
    </Order>
    <Order>
    <Header>
    <BillToID>002</BillToID>
    <ShipToID>003</ShipToID>
    <Id>Order002</Id>
    </Header>
    <OrderLine>
    <Id>Line003</Id>
    <Date>2015-01-01T00:00:00</Date>
    <Qty>5</Qty>
    <Status></Status>
    </OrderLine>
    <OrderLine>
    <Id>Line004</Id>
    <Date>2015-01-01T00:00:00</Date>
    <Qty>65</Qty>
    <Status></Status>
    </OrderLine>
    </Order
    </Orders>
    I want to use Business rule to check Quantity value and update status for the order line, that if quantity < 10 set the status to Approved, if quantity between 10 to 50 then set status to Pending, if quantity > 50 need to set the status to Reject.
    The business is simple, if the Order message just have one record, but when the Order message that contain multiple record the business rule just get the first quantity and set the status value. 
    Anyone have any idea to implement with that requirement?
    Thanks in advance!

    Have a look into the below articles and let us know if you face any further issue.
    They are addressing a similar issue
    http://www.neudesic.com/blog/apply-bre-rules-looping-data-dynamic-policy-execution/
    How to construct BRE "Condition" on multiple repeating record
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • Simulation - What does it do

    Hi BW experts,
    when loads are going on and in the monitor tab under details section - under processing - why we go for simulation.
    Can anybody tell me what is this simulation and when we should use this.
    Your valuable suggestions is very helpful.
    Thanks & Regards
    Sagar...

    Hi Sagar,
    If you suspect that there is a problem in update rules or transfer rules (example: Expected transformations are not taken place). In which case go to the data load monitor in BIW and select the data package you like to debug as shown below. Right click and select “Simulate update” .
    Choose update rules/transfer rules for debugging. You can also choose the specific records you like to debug.
    Once you are ready, select “Perform Simulation” and enjoy the debugging of the transfer/update rules.
    Debugging “Start routine”
    Above process cannot be used to debug start routines, which get executed before the update rules are called for each data packet. And this start routine is called in the background process. Even statements like “BREAK-POINT” are ineffective in breaking the execution process.
    You can use the following trick in this case:
    Have an infinite loop in the start routine:
    for debugging purpose
    WHILE sy-subrc EQ 0.
    ENDWHILE.
    Trigger the data load process and the process will go into inifinite loop. You can see the process in transaction SM50 (process overview). Select the process and debug. Once you reach the while statement, change the sy-subrc to 1 and proceed with the debugging of start routine.
    CAUTION: Don’t forget to delete the infinite loop once you are done with the debugging.
    Give points if it is help full
    Regards,
    Lakshman.G

Maybe you are looking for

  • How do I move Adobe Acrobat X to a new workstation.

    I need to move Adobe Acrobat X to a new workstation. How do i reinstall Adobe Acrobat X to this new station since Adobe Acrobat XI is now out? I have the serial number for Acrobat X. Do I install Acrobat XI and use Acrobat X license?

  • CLONE DATABASE

    Hi Guys... I am using Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production on Solaris. I am trying to clone one of the production database using backups on tape. I am using Veritas Netbackup for backups. When I include the following: allo

  • Using Excel as  Datasource in Crystal Reports 8.5

    I have never used Excel as a source for Crystal data and I am having a bit of an issue I believe. I have an Excel file on my desktop that I am using as the datasource. Eventually it will be out on a network drive. I set up all my reports as blank rep

  • Problems with importing in FCPX

    I am having problems with importing my recent holiday video intoFCPX  I have copied all the files from my Panasonic camera into my separate hard drive and they all appear there correctly. When I connect the camera to the computer it automatically ope

  • Error while executing the call list maintenance from the UI ???

    Hello All I am using CRM 6.0 I am want to open the call list maintenance  from the IC manager screen the system sues transaction launcher to open it, the URL link defined in the back end is : sap/bc/gui/sap/its/webgui/!?~transaction=CRMD_TM_CLDIST bu