Problem in Loop

Hi All,
I am using the step type LOOP UNTIL in my workflow..
I am using 2 container elements to check and will send a reminder to the
possible agent when the condition is true..
i will explain my problem using a scenario..
i have a container lt_end = sy-datum + 20...so it has a value 20.03.2007
and another container td_date = sy-datum...
so using these 2 variables i loop using condition
loop until lt_end = td_date..
and when this condition is true i should send a mail..
but it is goin in an infinite loop..and creating 1000's of reminder workitems...
So i wanted to know how to compare <b>Dates in the loop</b>
Thanks,
Ravikiran

Hi Ravikiran,
I faced the same problem in one of my project. i explain what is my scenario and how i solved it.
Scenario:
A complaint is created in the crm and that is assigned to a 'assigned to' person, at this point i have to send a mail to this 'assigned to' person saying workitem is bending.
If the person is not acting on that workitem for first four hours i have send a mail to his manager, and i have to send a notification to the manager for every 24 hrs if the person is not acting on that workitem.
Solution:
Remember this, in this kind of scenario you have to use 'REQUESTED START' the workitem will be place in the inbox when the deadline is reached.
So i did like this, in the date field i gave sy-datum and in the time i gave sy-uzeit
and i added 4 hours so when ever the workflow comes to this step if waits for 4 hours and then it sends the mail. I followed the same for 24 hours.
I think the answer will be useful. give me your email id so that i can send you the screen shot.
Give me points if this answer solves your problem.
Regards
Balaji E.

Similar Messages

  • Perl API: growing memory problem in loops over large sets of data

    Hi,
    When going through all XmlResults like this:
    while ($results->next($val)) {
    print $val->asString, "\n";
    The process size keeps growing. It does not when I comment $val->asString method out, but then I have no way of getting the results.
    This becomes a significant problem when the number of results is huge. I am doing this on a database of over a million short XML documents (400-800 bytes each).
    The more complete code is here:
    eval {
    $env = new DbEnv();
    $env->open($dbDir, Db::DB_JOINENV | Db::DB_INIT_LOCK
    | Db::DB_INIT_MPOOL | Db::DB_CREATE, 0);
    my $mgr = new XmlManager($env, DbXml::DBXML_ADOPT_DBENV);
    my $db = $mgr->openContainer(undef, $dbName, Db::DB_RDONLY);
    my $context = $mgr->createQueryContext(XmlQueryContext::LiveValues,
    XmlQueryContext::Lazy);
    my $lookup = $mgr->createIndexLookup($db, "", $nodeName,
    "node-$nodeType-equality-$syntax",
    new XmlValue($types{$nodeType}, $value), XmlIndexLookup::GTE);
    my $results = $lookup->execute(undef, $context);
    my $val = new XmlValue();
    while ($results->next($val)) {
    print $val->asString, "\n";
    if (my $e = catch std::exception) {
    die $e->what() . "\n";
    The process size just grows until the system limit is reached, then the process quits saying 'Out of memory'.
    I suspect the problem is with the std::string result returned by C++ XmlValue::asString() const.
    The (left-hand-side) result string is likely allocated by new std::string and receives the value by calling the string copy operator. Then the Perl scalar result is prepared, but when it gets returned to my code, the C++ string is not deleted.
    Moving the Sleepycat::XmlValue Perl object inside the loop does not help either:
    while ($results->hasNext()) {
    my $val = new XmlValue();
    $results->next($val);
    print $val->asString, "\n";
    In fact, the process seems to grow faster, possibly because the old $val instances do not get destroyed by Perl at the end of the loop. Where is Perl's garbage collection?
    I am using DB XML version: 2.2.13; BDB version: 4.4.20.2; OS: FreeBSD 6-STABLE. However the problem seems to be common for any OS or BDB XML version as it involves Perl-to-C++ interface.
    Has anyone experienced similar problems?
    Thanks,
    Konstantin.
    Konstantin @ Chuguev.com

    Good catch - you found a memory leak. Luckily the fix is very straightforward. Edit the file
    dbxml/src/perl/common.h
    and find this line
    #define newSVfromString(str) newSVpvn(str.c_str(), str.length())
    Change it to this
    #define newSVfromString(str) sv_2mortal(newSVpvn(str.c_str(), str.length()))
    and recompile the module.
    Paul

  • Problem with looping logic

    Hello all,
    Ok reposted using code tags, sorry about that.
    I'm trying to write some code to take in a 2D int array, loop through the array to identify where certain blocks of numbers begin and record that location so that I an jump straight to it at a later time. The number blocks go up iteratively from a point from 0 to 9 and are surrounded by nodata values(-9999).
    The problem is that when I print out the numbers they are only being recognised up to 6 (7th number) and when I check the locations against the original text file they dont match. I think it's just a problem with my logic but I'm not sure why.
    The text file is converted to ints and placed in an array from a buffered file reader in a seperate class. I can put this up if needed.
    Any help would be much appreciated.
    Thanks.
    Duncan
    *  Class imports text file which contains a collection of values, either nodata(-9999) or a location
    *  represented by numbers moving away from a point; 0 closest then 1, then 2 etc.
    *  records the first location of each number to avoid having to loop through the whole file each time.
    *  i.e. can later jump straight to the first recorded location of each number.
    *  In current text file there are 10 numbers(0 - 9) but for some reason it stops finding them after
    *  6(seventh no.) and having checked the location values against the original text file these are wrong
    *  by a fair way as well.
    import java.io.*;
    //import java.awt.*;
    //import java.awt.event.*;
    public class Hydrograph {
         int width = 0;
         int height = 0;
         int dZeroC, dZeroD = 0;
         int dOneC, dOneD = 0;
         int dTwoC, dTwoD = 0;
         int dThreeC, dThreeD = 0;
         int dFourC, dFourD = 0;
         int dFiveC, dFiveD = 0;
         int dSixC, dSixD = 0;
         int dSevenC, dSevenD = 0;
         int dEightC, dEightD = 0;
         int dNineC, dNineD = 0;
         public Hydrograph() {
              /* Ignore this bit it's being used for something else
              //File file = new File("c:/Users/Duncan/Documents/MODULES/MSc Dissertation/Code/A1.txt");
              //File file = new File("M:/java/code/A1.txt");
              ArrayRead ar = null;
              ar = new ArrayRead(file);
              int rows = ar.getRows();
              int columns = ar.getColumns();
              int steps = ar.getSteps();
              int[][][] threeDIntArray = ar.getThreeDIntArray();
              // Creates a new instance of delay class which takes in a text file and converts
              // it to int form, placing it into a 2D int array.
              Delay dLay = null;
              dLay = new Delay();
              width = dLay.getWidth();
              height = dLay.getHeight();
              int[][] twoDDelayFile = dLay.getTwoDintArray();
              int delayCount = 0;
              // Loops through 2D int array to identify when number first equals 0, then passes
              // the height and width values to storeDelayPos method below. Then finds for 1, 2
              // 3, 4,...etc by adding 1 to delayCount.
              System.out.println(" ");
              for (int a=0; a<width; a++) {
                   for (int b=0; b<height; b++) {
                        if (twoDDelayFile[a] == delayCount) {
                             int c, d = 0;
                             c = a;
                             d = b;
                             storeDelayPos(c, d, delayCount);
                             System.out.println(delayCount);
                             delayCount++;
                             break;
                   //System.out.println(" ");
              System.out.println(" ");
              System.out.print(dZeroC + " " + dZeroD);
              System.out.println(" ");
              System.out.print(dOneC + " " + dOneD);
              System.out.println(" ");
              System.out.print(dTwoC + " " + dTwoD);
              System.out.println(" ");
              System.out.print(dThreeC + " " + dThreeD);
              System.out.println(" ");
              System.out.print(dFourC + " " + dFourD);
              System.out.println(" ");
              System.out.print(dFiveC + " " + dFiveD);
              System.out.println(" ");
              System.out.print(dSixC + " " + dSixD);
              System.out.println(" ");
              System.out.print(dSevenC + " " + dSevenD);
         // Takes in width, height and delayCount value and sets variables according to
         // the value of delayCount.
         void storeDelayPos (int setC, int setD, int setDCount) {
              int dCount = 0;
              dCount = setDCount;
              switch(dCount) {
                   case 0:
                        dZeroC = setC;
                        dZeroD = setD;
                        break;
                   case 1:
                        dOneC = setC;
                        dOneD = setD;
                        break;
                   case 2:
                        dTwoC = setC;
                        dTwoD = setD;
                        break;
                   case 3:
                        dThreeC = setC;
                        dThreeD = setD;
                        break;
                   case 4:
                        dFourC = setC;
                        dFourD = setD;
                        break;
                   case 5:
                        dFiveC = setC;
                        dFiveD = setD;
                        break;
                   case 6:
                        dSixC = setC;
                        dSixD = setD;
                        break;
                   case 7:
                        dSevenC = setC;
                        dSevenD = setD;
                        break;
                   case 8:
                        dEightC = setC;
                        dEightD = setD;
                        break;
                   case 9:
                        dNineC = setC;
                        dNineD = setD;
                        break;
                   default:
                        System.out.println("OUT OF BOUNDS");
                        break;
         public static void main (String args[]) {
         new Hydrograph();

    Hi,
    I am working on a hydrograph program in java as well... I am trying to represent rainfall data. Do you think that you could share some of the code that you came up with, so that I don't have to go through the whole process.
    thank you so much,
    Kevin

  • Master/Detail problem: Infinite loop with display items

    Hi,
    I have a strange problem in Oracle Forms 6.0.5.35.3. I create a master block and a detail block with correct relationship between them.
    -> When the detail block contains at least one 'Text Item' everything works well.
    -> When the detail block only contains 'Display Items', the form is looping
    indefinitely calling ON-POPULATE_DETAILS and QUERY-MASTER-DETAILS...
    Is it a known bug ?
    Do you know a trick to avoid this behaviour ?
    Is it corrected with latest versions of forms, I mean 6i ?
    Thanks for answer
    Laurent Ricci

    I think a block should have at least one navigable item. Just disable the insert/update property, but enable the navigable property for an item in the detail block.
    Hope that help

  • MVC problem - infinite loop?

    I'm going to use a horribly oversimplified example to make my point here, because if I were to describe the actual code I'm looking at, it would take the better part of the afternoon and I'd probably bore you all to tears in the process. So, for the sake of argument, let's assume the following model object:
    public class MyModelObject
      private int a;
      private int b;
      private int c;
      public void setA(int newA)
        a = newA;
        b = newA + SOME_CONSTANT;
        c = newA + SOME_OTHER_CONSTANT;
      public void setB(int newB)
        this.setA(SOME_CONSTANT-newB);
      public void setC(int newC)
        this.setA(SOME_OTHER_CONSTANT-newC);
      public int getA()
        return a;
      public int getB()
        return b;
      public int getC()
        return c;
    }So what we see from this is that the setter for one class property actually changes the value of all three class properties (whether this is good design or not is questionable, but keep in mind this is a horribly simplified example for discussion purposes). The point is that the rules regarding the internal state of MyModelObject are governed entirely within that class - the controller and view don't know about these rules (again, questionable design, but bear with me here).
    Now let's imagine we have a view class that displays a MyModelObject instance and allows the user to change the value of a, b, or c. We also have a controller class that observes the view and responds to changes. When the user modifies the value of, let's say b, the controller will respond to that change by calling the setB() method in MyModelObject. Problem is, now the model and the view are out of synch... someone has to tell the view that the other two class properties have also been modified as a result of calling setB() - whose responsibility is this? Should the model inform the view that something has changed so that the view can redisplay it, or should the view observe the model and automatically redisplay whenever the model is modified?
    More importantly - let's say the controller is observing the view for changes, and the view is observing the model for changes... how do you avoid an infinite loop? For example, the user changes the value of b in the view, which causes the internal state of MyModelObject to be modified, which causes a change in the view, which causes a change in the model, and so on and so forth.
    A twist on the above problem is that it is illegal in some Swing components (JTextPane, for instance) to modify the view while a change notification is in progress... so something like this would throw an IllegalStateException:
    //somewhere in the controller
    public void insertUpdate(DocumentEvent docEvent)
      //update the model
      myModelObject.handleChange(docEvent);
      //now redisplay since the model has changed:
      myTextPane.display(myModelObject);
      // IllegalStateException is raised - Attempt to mutate in notification
    }This fails because you can't change the state of the view component in the event handler for a view change event. How do you get around this using proper MVC architecture? Or am I completely out to lunch here?

    The view shouldn't send events to the controller unless they make sense... For example, it shouldn't fire a change event when the user types in a new value. But only if the user presses enter, or the view loses focus (if this gesture is taken as equivalent).
    So when the change of the view comes from the side-effects of a setter of some property, it should fire no event (so that it will not loop). So it sounds no big problem (if such a distinction of events is easy - it should).

  • Exception handeling problem, keeps looping?

    Hi I have a gui screen that asks the user to enter a membership no. I have a try catch clause but it does an infinate loop could anyone help me. What I need is the dialog box to appear and when it is closed my gui screen should appear from the start again thanks
    private void personalDetailsButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                     
         Inductee.setTrainingGoal((String) trainingGoalComboBox.getSelectedItem());
         Inductee.setName(nameText.getText());
         String age=((String) ageComboBox.getSelectedItem());
         boolean stop=false;
         do{
         try{
         Inductee.setMembershipNo(membershipNo=Integer.parseInt(membershipNoText.getText()));
         catch (NumberFormatException e) {
               JOptionPane.showMessageDialog(null, "You must enter a number format for Membershp Number");
               this.dispose();
               new PersonalDetailsScreen().setVisible(true);
         while(stop==false);
         Inductee.setTrainerProfile((String) trainerProfileComboBox.getSelectedItem());
         int ages=Integer.parseInt(age);
         Inductee.setAge(ages);
         this.dispose();
         new MedicalScreen().setVisible(true);
        }                                                 

    I think that you must set the boolean stop to true at the end of your catch.
    That would fit the immediate error, but as i do have have the whole source i cannot say.
    From what i see this will not solve the problem, should the user cause the error again.
    By the way, is this the same problem as the other post with the broken if statement?
    Your new catch statement will look like this
    catch (NumberFormatException e)
               JOptionPane.showMessageDialog(null, "You must enter a number format for Membershp Number");
               this.dispose();
               new PersonalDetailsScreen().setVisible(true);
               stop = true;
    }

  • Problems with looping mp3s without gaps

    I am building an 8 track Flash audio mixer where the sounds for each track are selected by the user from a list component and then loaded into a Sound variable at runtime.  This can be done while the mixer is playing or stopped, and of course, it adds a lot of flexibility for making music.  All actionscript is in external .as files and sounds are looped using the SOUND_COMPLETE event.
    So far, all loading/playing functions work perfect, but I`m having problems with gaps at the beginning/end of my mp3 files.  I was told this was an inherent problem with mp3 files, so I tried using MPTrim to clean the silence up.  I also tried starting the loop a bit late - sound.play(80, 1) - but the results are usually inaccurate and unpredictable.
    When I import a wav file into the library and then export it as an mp3 file embedded in the .swf file, it sitll has a short gap.  When I built a previous mixer in Flash MX (actionscript 1) there was no gap and all sounds looped perfectly!  Of course, in this later case, all sounds were embedded inside movie clips on the stage and scripting was done on the timeline, so maybe that made a difference.
    What is going on with AS3?  I have spent long nights trying to find a solution to this, but to no avail!
    I read a blog where the writer went through all the steps I have and just gave up, but I know there is a solution.  I have seen this sort of thing done on Flash mixer sites before (even sites with full-on audio sequencers) so I know it can be done!
    Is there anything I can do to get around this problem?
    Thanks in advance,
    Matt

    mp3 files can have header info at the start, in addition to dead space at the start and end.  if you're certain you've removed all dead space then you should be able to compensate (reliably) for header info by using the offset parameter in the play() method (after you sound's onLoad() method executes.  but you wouldn't use 80:  that first parameter is in seconds, not milliseconds.

  • Problems with loop on progressive loaded Movie

    Hey I got help for a a week ago to do a loop on progressive loaded movies, but nov I got a problem it only loops on keyframe one and not on keyframe 2. Do anyone know how I can sort that out..?
    I have the following on keyframe 1, where everything is perfect:
    var timedelay:Number = 3; 
    var video;
    var nc:NetConnection;
    var ns:NetStream;
    nc = new NetConnection();
    nc.connect(null);
    ns = new NetStream(nc);
    ns.client = this;
    ns.addEventListener(NetStatusEvent.NET_STATUS,netStatusf);
    function netStatusf(e:NetStatusEvent) {
        if (e.info.code == "NetStream.Play.Stop" && Math.abs(durationNum-ns.time)<.1) {
    setTimeout(replayF,timedelay*1000);
    function replayF(){
    ns.play("film/film1.f4v");
    var durationNum:Number;
    function onMetaData(iObj:Object):void {
        durationNum = iObj.duration;
    video = new Video(287,263);
    video.x = 204.1;
    video.y = 140.5;
    addChild(video);
    video.attachNetStream(ns);
    ns.play("film/film1.f4v");
    and on keyframe 2 I got this, here it chooses a randome movie from the Array, when it'a chosen it dosen't loop:
    var moviesA2:Array =["film/film1.f4v", "film/film2.f4v", "film/film2.f4v", "film/film2.f4v", "film/film2.f4v"];
    var movie2:String = moviesA2[Math.floor(Math.random()*moviesA2.length)];
    var timedelay2:Number = 6; 
    var video2;
    var nc2:NetConnection;
    var ns2:NetStream;
    nc2 = new NetConnection();
    nc2.connect(null);
    ns2 = new NetStream(nc2);
    ns2.client = this;
    ns2.addEventListener(NetStatusEvent.NET_STATUS,netStatusf2);
    function netStatusf2(e:NetStatusEvent) {
        if (e.info.code == "NetStream.Play.Stop" && Math.abs(durationNum-ns.time)<.1) {
    setTimeout(replayF2,timedelay*1000);
    function replayF2(){
    ns2.play(movie2);
    video2 = new Video(287,263);
    video2.x = 204.1;
    video2.y = 140.5;
    addChild(video2);
    video2.attachNetStream(ns2);
    ns2.play(movie2);

    i assume you've applied ns.close() when going to frame 2 so that stream stops looping.  then use:
    function netStatusf2(e:NetStatusEvent) {
        if (e.info.code == "NetStream.Play.Stop" && Math.abs(durationNum-ns2.time)<.1) {
    setTimeout(replayF2,timedelay*1000);

  • Problem previewing loops in the loop browser in Logic 8

    Loops are only audible when the sequencer is not playing.
    When the sequencer is playing, the selected loop shows it's playing in the loop browser window, but I cannot hear it.
    ANY ANSWERS?
    NOTE:
    All my outputs in logic (including the loop browse strip) are routed to SPDIF OUT as I have a DynAudio digital speaker system.
    Thanks in advance,
    Hennie

    I have found if you wait long enough, you will hear the file begin to play. Sometimes the delay can several seconds. Not acceptable IMO.

  • I'm having a problem with loops and indexes. (indices? ha)

    I'm building a Frequency Histogram table. I have a Histogram method below me, but it's showing up errors for the lines I put in bold. The error is "cannot find "i" variable". What should I do? Thanks in advance for the help.
    public void histogram(int numClasses){
    int frequency[];
    int k = 0;
    double midpoint = 0;
    frequency = new int[numClasses];
    int classWidth = 0;
    classWidth = (((int)this.max() - (int)this.min()) + 1) / numClasses;
    for (int i = 0; i < data.size(); i++){
    if ((0 <= i) && (i < numClasses)){
    if ((((this.min() - 0.5) + (data.get(i)*classWidth)) <= data.get(i)) && ( data.get(i) < ((this.min() - 0.5) + ((data.get(i)+1)*classWidth))))
    k = (int)((data.get(i) - (this.min() - 0.5) / classWidth));
    frequency[k]++;}}
    for (i = 0; i < numClasses; i++){
    midpoint = (int)this.min() - 0.5 + (k + 0.5) * classWidth;
    System.out.println(""+midpoint+" |");
    for (int j = 1; j < frequency; j++){
    System.out.println("*");
    System.out.println();

    for (int i = 0; i < data.size(); i++) {
       <snip>
        for (i = 0; i < numClasses; i++){
    }It looks like you are reusing the variable i in the same scope, but it's hard to tell with the lack of [cod[b]e] tags and no formatting.
    Try using a different variable for the second loop there, like n or sokething.

  • Problem with loop previews...

    When I click on a loop in the browser, usually nothing happens. Sometimes I get to pre-listen, but 9 times out of 10, zilch. And unless it is one of that minority of loops I can pre-listen to, GB won't let me drag it to empty space in the timeline: if it's an audio loop I can drag it to an audio track, but if it's a MIDI loop I can't do anything with it.
    My loops are all perfectly ok in Logic. I just fired up GB for the first time in about a year, remembering how I liked the creative workflow using it as a sketchpad, and this has happened. I should point out that it's the first time I've launched GB since I installed 10.5.
    Has anyone encountered anything similar?

    Oliver,
    Have you tried opening a different song, & then checking to see if the loop browser is active? Or if that doesn't help, trying a different user account?
    KableTree

  • Problem Adding Loops to GB 5.1

    I'm adding .aiff loops to GB 5.1.  I see the scroll and message, indicating they are being added, but when I search for them, most are missing.  What am I doing wrong?  Running Snow Leopard.  Thanks...

    ISBEGINNING is a required property into SAP BPC 7.0 it is used to do the calculation of measures.
    If you are doing a migration from 5.1 to 7.0 you just have to do maintain dimension properties for Time dimension - click Modify dimension properties without doing any change.
    This will create automatically ISBEGINNING property for Time dimension.
    You have to open your time dimension and to add a new column ISBEGINNING.
    You have to add 1 for any Month and Quarter for your fiscal year.
    Like Year.Jan or Year.Q1.
    After that processing your cube will be fine if the other dimensions are correct.
    Regards
    Sorin Radulescu

  • Non functional shortcut in keynote 3  -  problem to loop with QT slides

    Hello there,
    I'm using the shortcuts of Keynote a lot, and I'm embarrassed by the following strange behaviours :
    1) in a slide that contains built-ins effects, none of the forseen shortcuts (P, Delete, Page Up, Left Arrow, Up Arrow, or Shift-Up Arrow) does really go back
    to previous slide, all those shortcuts go back through each of the builds before to go back to previous slide. It is quite embarassing, when you want to go straight to the point. is there another shortcut to reall go back to previous slide, without stop ? thanks.
    2) when I put a quicktime movie in the last slide of a slideshow that I force to loop, it takes ages for the slide show to go from last page to first page (I.e., to loop) : the quickitime movie seems frozen for 10-20 seconds, then the slideshow restarts, and every goes well... until the last slide, that freezes, and so on...
    Thank you for any remark on this.

    If you have Qt Pro, you can open the file and turn on a controller, then resave the file.

  • Problem with loop condition

    Hi :
       i am selecting the records based on s_date, but i want to display records for each week for which i am using R_DATE.If i enter 1month duration on selection screen, i wil display records for each week based on r_date.
    But my program is not entering the loop.Its displaying all the records together for the duration s_date only.
    In the loop, i am collecting the data into other internal table so that i can download the records into excel sheet.
    DO v_weeks TIMES.
       CLEAR v_newdat.
       CLEAR v_date1.
        CLEAR datef5.
        CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
          EXPORTING
            date      = date2
            days      = 7
            months    = 0
            signum    = '+'
            years     = 0
          IMPORTING
            calc_date = datef5.
        REFRESH r_date.
        r_date-low = date2.
        r_date-high = datef5.
        r_date-sign = 'I'.
        r_date-option = 'BT'.
        APPEND r_date.
    LOOP AT it_tab  where erdat IN r_date.
          it_tab1-v_cnt1 = v_cnt1.
          it_tab1-v_cnt2 = v_cnt2.
          it_tab1-v_cnt3 = v_cnt3.
          it_tab1-v_cnt4 = v_cnt4.
          it_tab1-date2 = r_date-low.
          it_tab1-datef5 = r_date-high.
          APPEND it_tab1.
          CLEAR v_cnt1.
          CLEAR v_cnt2.
          CLEAR v_cnt3.
          CLEAR v_cnt4.
          CLEAR v_cnt.
          CLEAR v_newdat.
          CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
            EXPORTING
              date      = datef5
              days      = 1
              months    = 0
              signum    = '+'
              years     = 0
            IMPORTING
              calc_date = v_newdat.
          date2 = v_newdat.
        ENDLOOP.
    Thanks.
    Raghu

    Hi Suresh,
       it_tab has the records for the dates entered in S_DATE, but i want to collect records based on r_date into other internal table it_tab1 so that i can download to excel.
    thx

  • BIG PROBLEM: Multiple (loop) NOTIFY COMMITS for same VO instance

    Dear forum,
    I have a big problem with 1 of my VO.
    When I insert a record using AddProjectView this works fine. The record is persisted successfully.
    When I insert another record using AnotherView (e.g. different table) a commit is also done on AddProjectView.
    In de log I can see: AddProjectView notify COMMIT ...
    I wouldn't have found any problem if I didn't had a afterCommit on AddProjectView which inserts some records in a table. The inserts fail because UK violations.
    Now the problem is, why is AddProjectView being committed again?
    If I keep updating records in AnotherView, everytime the AddProjectView is commited. If I stop the running OC4J instance and restart it, the AddProjectView is not committed anymore! It seems the VO instance is keeps 'hanging' around....
    As I don't have any idea, any help is appreciated.

    Hi,
    When exactly you are creating and inserting record in destVO?
    mere destVO.first() won't work, first() works if records are already fetched using query.
    If I understand correctly, you should be creating new record in destVO (albait the only record) as follows:
    Row row = destVO.createRow();
    //defaulting logic should go here
    row.setAttribute("Attr1", value);
    destVO.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    Thanks,
    Hrishikesh

Maybe you are looking for