Code driven event handling in a while loop

I have an event driven while loop. Is there any way to trigger an event by code and not by any user action? Sometimes I need to execute the while loop once but I don't like to use the timeout event because it causes some trouble in my timecritical application.
Thank you in advance,
Andreas Langer

Andreas,
The following page has an example on how to accomplish this:
Generating an Event in LabVIEW Programmatically
http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/c0128a70970d0a0386256b48008366be?OpenDocument
Zvezdana S.
National Instruments

Similar Messages

  • Differnence between two codes of event handling

    hello i am learning event handling in swing but confused between two codes :-
    the first code of event handling is given in book "head first java " and working fine
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Swingdemo implements ActionListener {
        JButton jbut = new JButton("Click me");
          public void go(){
            JFrame jfrm = new JFrame(" sample swing");
            JLabel jlab = new JLabel("hello Swing");
            jfrm.add(BorderLayout.NORTH,jlab);
            jfrm.add(BorderLayout.CENTER,jbut);
            jfrm.setVisible(true);
            jbut.addActionListener(this); 
            jfrm.setSize(100,100);
            jfrm.setDefaultCloseOperation(jfrm.EXIT_ON_CLOSE);
       public static void main(String[] args) {
            Swingdemo obj = new Swingdemo();
            obj.go();
    public void actionPerformed(ActionEvent e)
        jbut.setText("i have been clicked");
    }}THe second code which i think is fine is giving the following error :-
    C:\java\iodemo\src\Swingdemo.java:26: non-static variable jbut cannot be referenced from a static context
            jfrm.add(BorderLayout.CENTER,jbut);
    C:\java\iodemo\src\Swingdemo.java:28: non-static variable this cannot be referenced from a static context
            jbut.addActionListener(this); 
    C:\java\iodemo\src\Swingdemo.java:28: non-static variable jbut cannot be referenced from a static context
            jbut.addActionListener(this);  the second code is as follows :-
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Swingdemo implements ActionListener {
    public static void main(String[] args) {
    JFrame jfrm = new JFrame(" sample swing");
    JLabel jlab = new JLabel("hello Swing");
    jfrm.add(BorderLayout.NORTH,jlab);
    jfrm.add(BorderLayout.CENTER,jbut);
    jfrm.setVisible(true);
    jbut.addActionListener(this);
    jfrm.setSize(100,100);
    jfrm.setDefaultCloseOperation(jfrm.EXIT_ON_CLOSE);
    JButton jbut = new JButton("Click me");
    public void actionPerformed(ActionEvent e)
    jbut.setText("i have been clicked");
    Plz help me wat this error means that not static variable cannot be reffered from static context .
    thanks

    There are multiple problems in your 2nd set of code. You call this:
    jfrm.add(BorderLayout.CENTER,jbut);
    Before you actually create the jbut button:
    JButton jbut = new JButton("Click me");
    But based on the error message, you have another 'jbut' variable somewhere that's not included in the code you posted, and that's the one it's complaining about being referenced in a static context.
    The problem with the static context is because all your code is in the static void main method. In that method, a Swingdemo instance doesn't exist yet, therefore any non-static variables won't exist yet either. If you move all that code into the Swingdemo constructor, and just have main create a new Swingdemo instance, that should do it.

  • Multiple event structure in a while loop

    Dear All,
                   I had a multiple event structure inside a while loop. The purpose of doing so is because I had a few 2D picture on the front panel. I would like to detect which 2D pictures had been click using the mouse down event structure for 8 of my 2D pictures.
                  The problem that I faced now is that when I of the event case or one of the 2D pictures had been click, it will not exit the while loop. I had to click on all the 8 2D pictures before it will exit the loop.
                  I had uncheck the under the "Edit Event" --> "Lock Front Panel (defer processing of user action) until this event case completes". But I am still stuck inside the loop.
                  Each 2D picture will perform different action therefore I cannot have an event case of all 2D pictures inside else I would know which 2D picture had been click.
                 Is there any other way out of this situation? Pls help. Thanks a lot

    A producer/consumer architecture (look at the examples that ship with LabVIEW) is comprised of two parallel while loops. One loop contains the event structure. The other contains your consumer which is basically a queued state machine. It receives messages from the producer via a queue. Your event structure can register a separate event for each 2D picture control or it can use a single event that would determine which spefic controls was clicked on. This is a more general approach and expands easily. Here is a basic example of what I am talking about.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Event Producer-Consumer.vi ‏14 KB

  • Event Structures and Do /While Loops

    I have an Event Structure inside a Do/While Loop.  One of the buttons in the event is STOP which stops the do while.  The Stop Button itself is inside the event as suggested in the help.  My problem is when I hit the stop button everything inside the Do/While runs 1 more time.  Other than than the code works perfectly.  is this normal behavior for a Do/While ..Event Structure??

    The attached file is the code in a nutshell.  I know it can sometimes be diffcult to TS w/o the actual code.  Prob is I wrote it in LV2011 on the Lab PC and I have LV2010 at my desk.  I don't have internet access in the Lab..of course.
    If I hit the OK button 2x's it "does something...does something...build array" then again a second time.  The build array is added to with each click of a button in the event structure.  If the user hits the STOP it dumps the 2x's worth of data out to excel..except I get 3 rows of data rather than 2...as if the inner loop ran one more time.
    Anyways. the only thing that caught my eye is the fact that I don't have a sequence structure around the "build data here" portion of the code.  Would that affect how the STOP inside the do while loop is handled??
    Attachments:
    event_Do_While.JPG ‏90 KB

  • OIM11gR2:Event handler goes into infinite loop

    Hi Experts,
    I have created an event handler where i am doing some functionality on execute function, that updates some UDF's when a user modifies value from the user modify form.
    I am calling the event hanlder on modify action of User entity
    Now the problem i am facing is that the eventhandler goes into infinte loop and modifies the values again and again without any break.
    Please help out, i am not able to kill the process unitill i restart the server :-(

    You can use something like below to get old values :
    HashMap<String, Serializable> interEvtDataMap = orchestration.getInterEventData();
              User newUserState = (oracle.iam.identity.usermgmt.vo.User) interEvtDataMap.get("NEW_USER_STATE");
              User oldUserState = (oracle.iam.identity.usermgmt.vo.User) interEvtDataMap.get("CURRENT_USER");
              newFirstName = (String)newUserState.getAttribute("First Name");
              oldFirstName = (String)oldUserState.getAttribute("First Name");     
    Thanks
    Suren

  • Event structure in a while loop does an extra iteration

    In this program, after the user has measured all the values, he or she will press a calibration complete button and the results of the measurement will be displayed.  However when the program runs and this button is pressed, the event structure does one more iteration.  Is there a way for the while loop to read the control before the event structure executes to prevent this?
    p.s.  I know that the wiring is probably a lot more complicated than it needs to be so if there is a better way to place values into a particular space in an array let me know
    Thanks
    Chris O.

    Probably just a matter of the order of execution in your data flow.
    Please post a VI so we can see what is going on now.
    Never mind.  You have since posted it.  SMerucurio's suggestion of a separate event case for the other button should work fine.
    Message Edited by Ravens Fan on 06-30-2008 01:20 PM
    For putting an element into a specific location of an array, look at "Replace Array Subset".  This should allow you to replace your groups of shift registers with a 1-D array since you are basically building 1-D arrays after your case structures anyway.
    Message Edited by Ravens Fan on 06-30-2008 01:24 PM

  • Stopping an event structure inside a while loop.

    I am relatively new to LabView, and especially the event structure. I have been looking at previous posts regarding the event structure and people having trouble stopping it. In my VI, I have two event cases in addition to the timeout. I am using this VI for stepper motor control. I have 2 buttons (for each case), one for movement to the left, the other to the right. It runs like it is supposed to, but when I try to stop it I have to press both buttons before it stops. As if the loop has to execute everything inside before stopping.
    In my VI, how can I make the execution stop when I press the stop button? I tried many setups of the stop button and boolean logic (which I believe was correct) but am now stuck.
    Thank you very much ,
    Alek
    Solved!
    Go to Solution.
    Attachments:
    motor control2.vi ‏24 KB

    OK, here's my simplified version. All you need is two event cases.
    Note that (with a tiny difference), the "left" and "right" cases are identical, so they can be handled in one event, reusing most of the shared code.
    We don't need a timeout event
    Just some extra tweaks...
    Message Edited by altenbach on 06-23-2008 05:09 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    RightLeft.png ‏13 KB
    motor_control2MOD.vi ‏15 KB

  • While loop inside a event structure

    Dear
    I have no much concepts on event structure.
    Let's assume there is a dialog box with Okay and Cancel button.
    I put the event structure for Okay and Cancel button.
    In Okay event, there is a while loop for detecting some data continuously.
    In this case, I want to use Cancel button to stop the while loop during the detection.
    How can I do to receive signal from the Cancel button?
    Thank you in advance.

    I'm not sure that the event structure should be used to handle that situation : while the OK event is executing, either the Front panel is locked and new occuring event will be stored until the OK event is completed (so the Cancel button action will not be detected !) or the Front panel is unlocked (see below *) and the Cancel button action will stop the loop, but the Cancel button event case will not be executed, since the event has already been processed in the OK case !
    You should probably use a single button to run/stop the loop, as shown in the attachment
    * While editing the event case, unmark the "Lock front panel for this event complete" at the bottom. But of course, the code in the cancel case will not run, since the event occuredMessage Edité par chilly charly le 03-31-2007 05:27 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Event button.vi ‏11 KB

  • How can I put a time delay between specific events in a while loop?

    How can I put a time delay between specific events within the same while loop? I'm already using the "wait" command to control the overall loop iteration speed. But I want to time the individual events as well.

    Hi Jesse,
    You can use a flat sequence. In each box you can put your individual events and attached wait.
    Don't forget to reduce your total loop time of the time you added in the individual sequences.
    Doc-Doc
    Doc-Doc
    http://www.machinevision.ch
    http://visionindustrielle.ch
    Please take time to rate this answer

  • Event Handling in labview with arrays as event data

    Hey folks,
    I have a Labview Application which uses a dll to read Ethernet data. The setup is such that, when the dll has fresh data it sends out an event to the Labview Application so that the fresh data can be displayed.
    However i have only managed to get this event based mechanism to send out a single structure at a time. Hence if there are 10 fresh data values, i need to send out 10 events (each event structure contains the parameter name, parameter value, unit and time stamp). It would be more efficient to send out an array of structures in a sigle shot.
    I have tried this but Labview keeps crashing saying that an error was encountered and Labview needs to close along with an access violation message. I did a lot of online searching and found some LV code for event handling but not come accross any implementation which uses arrays as evend data. Is this supoorted? And if so is there any example vi that can be shared so that i get some knowledge about this.
    Many Thanks in adavance,
    Abel. 

    I also gave a try by using a variant as the event data type instead of the cluster which contains the array of floats. I converted the cluster into a variant and used that to create the user event reference. Followed the same logic while decoding the dats.
    But still the crash.... Here is the windbg output...
    ModLoad: 07580000 075b7000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvalarms.dll
    ModLoad: 0ca90000 0cb72000 C:\Program Files\National Instruments\LabVIEW 2012\resource\mesa.dll
    ModLoad: 0c7f0000 0c7f9000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvuste.dll
    ModLoad: 35000000 3509b000 C:\Program Files\National Instruments\Shared\TDMS\tdms.dll
    ModLoad: 0c860000 0c87c000 D:\SapphireViewer\dll\SapphireClientDll.dll
    ModLoad: 0e240000 0e2c7000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCP80.dll
    ModLoad: 0e2d0000 0e36b000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCR80.dll
    (1cb0.1a34): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=0e47f8b4 ebx=051f0040 ecx=051f0040 edx=061e5764 esi=22820840 edi=07b10040
    eip=03c2050c esp=0e47f5cc ebp=0e47f810 iopl=0 nv up ei pl nz na po nc
    cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
    *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\National Instruments\LabVIEW 2012\resource\tdcore_12_0.dll -
    tdcore_12_0!LvVariant:etContents+0xac:
    03c2050c 837e3100 cmp dword ptr [esi+31h],0 ds:0023:22820871=????????
    I cannot really tell whats going on. Looking for some pointers.
    Regards,
    Abel.

  • How do i stop a while loop

    I'm new to labview and I'm having a problem stopping a while loop (running windows XP/2000 with the student edition of labview express 7).
    I'm doing a data acquisition program where I'm constantly reading in voltage and comparing it to a set point value, when the input voltage goes above the set point, i want the while loop to stop. How do I do this? I already have an LED going on when the criteria is met, but I'm not sure how to actually stop the loop (i.e. change the iteration value from true to false-i guess). If anyone can please assist me with this I would very much appreciate it.
    I've included my program too.
    Attachments:
    CO_Detection_Monitoring_System_Modified.vi ‏60 KB

    Hello Everyone-
    I've just posted a message about stopping a while loop and it was answered accurately and quickly- thanks to LV_Pro and PauloM- thanks much- its nice too see that there are many helpful people out there! Unfortunately, I have 2 more questions to ask of the forum.
    My application is almost completed- I just need to add an elapsed time counter that will tell me how long it took for my LED to trigger (from my set point-i.e. when from 0:00:00 until when my loop stopped).
    Now I've found a perfect elapsed time counter on the NI web site contributed from Mike Hall from Ohmeda Medical- the page is here.... http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=D37E2493DC333076E034080020E74861&p_node=DZ52032&p_source=external
    So my first question is, it looks like I can just extend the while loop box in my 'CO detector... .vi' and paste just the code from the 'elapsed time.vi' while loop into my loop and I will be set- but do I need to change my wait until next multiple to be a 1000 too in my program? Probably, but I'm not sure hence the question- or other ideas would appreciated.
    My second question is now that my application is complete (after I add the elapsed time above), I need to exactly duplicate this process for 7 other DAQ inputs (i.e. right now I'm using only 1 of 8 analog inputs on the FP-AI110). So should I make my 'CO detector.. .vi' a separate program (I remember reading something about this in one of the posts earlier).
    Any help is very appreciated.
    Thank you again,
    Daniel
    Attachments:
    CO_Detection_Monitoring_System_Modified.vi ‏60 KB

  • Event handling in Dynpage

    Hi all,
    This is my first post in SDN.
    Can any one tell me how to submit a form in DYNPAGE via radio button. If I check the radio button on, it should submit the form and should return the same page.
    Appreciate you help.
    Thanks,
    Karthik

    Hi,
    The following code regarding Event Handling for Dynpage. May be this example code useful for you.
    package com.customer.training;
    import com.sapportals.htmlb.Button;
    import com.sapportals.htmlb.Component;
    import com.sapportals.htmlb.DropdownListBox;
    import com.sapportals.htmlb.Form;
    import com.sapportals.htmlb.FormLayout;
    import com.sapportals.htmlb.GridLayout;
    import com.sapportals.htmlb.InputField;
    import com.sapportals.htmlb.Label;
    import com.sapportals.htmlb.TextView;
    import com.sapportals.htmlb.enum.ButtonDesign;
    import com.sapportals.htmlb.enum.TextViewDesign;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.htmlb.rendering.IPageContext;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    public class Suresh_SearchDynPage extends PageProcessorComponent {
      public DynPage getPage() {
        return new Suresh_SearchDynPageDynPage();
      public static class Suresh_SearchDynPageDynPage extends DynPage {
         public int flag ;
         public final static int disp_info = 1;
         public final static int read_info = 2;
         public final static int error_info = 3;
         public static String flag_info = "MyFlag";
         public static String disp_drop = " ";
         public String errorMessage;
           String firstName ;
           String lastName ;
           String Email ;
           String dropsel;
    Initialization code executed once per user.
        public void doInitialization() {
                        flag = read_info;          
                        IPageContext ctx = this.getPageContext();
                        ctx.setAttribute("FirstName","");
                        ctx.setAttribute("LastName","");
                        ctx.setAttribute("email","");     
    Input handling code. In general called the first time with the second page request from the user.
        public void doProcessAfterInput() throws PageException {
              Component comp;
              comp = this.getComponentByName("FirstName");
              if (comp instanceof InputField)
                        firstName = ((InputField) comp).getString().getValue();
              comp = this.getComponentByName("LastName");
              if (comp instanceof InputField)
                                  lastName = ((InputField) comp).getString().getValue();
              comp = this.getComponentByName("email");
                        if (comp instanceof InputField)
                                            Email = ((InputField) comp).getString().getValue();
              comp = this.getComponentByName("DisplayType");
                        if (comp instanceof DropdownListBox)
                             dropsel = ((DropdownListBox) comp).getSelection();          
    // Store the selected values in corresponding field name for nextScreen                         
              IPageContext ctx = this.getPageContext();
              flag = new Integer(ctx.getAttribute(flag_info).toString()).intValue();
              ctx.setAttribute("FirstName",firstName);
              ctx.setAttribute("LastName",lastName);
              ctx.setAttribute("email",Email);
              ctx.setAttribute("DisplayName",dropsel);                                   
    Create output. Called once per request.
        public void doProcessBeforeOutput() throws PageException {
          Form myForm = this.getForm();
           this.getPageContext().setAttribute(flag_info,new Integer(flag));
         switch(flag)
          case read_info:
                    FormLayout f1 = new FormLayout();
                    TextView t1 = new TextView();
                    t1.setDesign(TextViewDesign.HEADER2);
                    t1.setText("This is the Info U Entered................");
                    TextView t2 = new TextView();
                    t2.setText(firstName);
                    Label dispFname = new Label("dispFirstName");
                    dispFname.setText("First Name");
                    dispFname.setLabelFor(t2);
                    TextView t3 = new TextView();
                    t3.setText(lastName);
                    Label dispLname = new Label("dispLastName");
                    dispLname.setText("Last Name");
                    dispLname.setLabelFor(t3);
                    TextView t4 = new TextView();
                    t4.setText(Email);
                    Label dispEmail = new Label("dispEmail");
                    dispEmail.setText("Email");
                    dispEmail.setLabelFor(t4);
                    TextView t5 = new TextView();
                    t5.setText(dropsel);
                    Label dispType = new Label("dispInfo");
                    dispType.setText("Display Info");
                    dispType.setLabelFor(t5);
                    Button btnback = new Button("Back");
                    btnback.setText("Back");
                    btnback.setOnClick("Back");
                    f1.addComponent(1,1,t1);
                    f1.addComponent(2,1,dispFname);
                    f1.addComponent(2,2,t2);
                    f1.addComponent(3,1,dispLname);
                    f1.addComponent(3,2,t3);
                    f1.addComponent(4,1,dispEmail);
                    f1.addComponent(4,2,t4);
                    f1.addComponent(5,1,dispType);
                    f1.addComponent(5,2,t5);
                    f1.addComponent(6,1,btnback);
                    myForm.addComponent(f1);
               break;
          case error_info:
                    FormLayout f2 = new FormLayout();
                    IPageContext ctx = this.getPageContext();
                    TextView t6 = new TextView();
                    t6.setText("Error : ");
                    t6.setDesign(TextViewDesign.HEADER2);
                    t6.setText(errorMessage);
                    f2.addComponent(3,1,t6);
                    myForm.addComponent(f2);
               break;
                default:
                              // create your GUI here....
                                        GridLayout g1 = new GridLayout();
    //                                    IPageContext ctx1 = this.getPageContext();
                                        Label first_l = new Label("First Name");
                                        InputField first_if = new InputField("FirstName");
                                        Label last_l  =  new Label("Last Name");
                                        InputField last_if = new InputField("LastName");
                                        Label email_l = new Label("E-Mail Address");
                                        InputField email_if = new InputField("email");
                                        Label info_l = new Label("Display Info for");
                                        DropdownListBox displayType = new DropdownListBox("DisplayType");
                                        displayType.addItem("userinfo", "User Info");
                                        displayType.addItem("groupinfo", "Group Membership");
                                        displayType.addItem("roleinfo", "Role Assignment");     
    //                                    displayType.setSelection(ctx1.getAttribute("DisplayType").toString());
                                        Button btn = new Button("submit");            
                                        btn.setText("Get Info");
                                        btn.setDesign(ButtonDesign.EMPHASIZED);
                                        btn.setOnClick("Get");
    //                                    add the ui controls to grid
                                        g1.setCellPadding(4);
                                        g1.addComponent(1,1,first_l);
                                        g1.addComponent(1,2,first_if);
                                        g1.addComponent(2,1,last_l);
                                        g1.addComponent(2,2,last_if);
                                        g1.addComponent(3,1,email_l);
                                        g1.addComponent(3,2,email_if);
                                        g1.addComponent(4,1,info_l);
                                        g1.addComponent(4,2,displayType);
                                        g1.addColSpanComponent(5,1,btn,2);
                                        g1.setHeightPercentage(50);
                                        g1.setColumnSize(50);
                                        myForm.setFocusedControl(displayType);
                                        myForm.setMessageBarAtFormEnd(true);
                                        myForm.setWidthInHundredPercent(true);
                                        myForm.addComponent(g1);     
                                        break;
        public void onGet(Event e)
         if(firstName.length()== 0)
              flag = error_info;
              errorMessage = "Invalid Input..............";
         else
              flag = read_info;
          public void onBack(Event e1)
                flag = disp_info;

  • OIM 10g Event Handler : Integrated with User Groups.User Members

    I have created custom event handler and integrated it with User Groups.User Members data object.
    here is my code od event handler class:
    public class GroupEventHandler extends tcBaseEvent {
         public GroupEventHandler() {
              this.setEventName("Event Handler Sample");
         protected void implementation() throws Exception {
              System.out.println("============@@@@@@@@ IN EVENT HANDLER ");
              try
              String groupKey = this.getDataObject().getString("Groups.Key");
              writeToFile(groupKey);
              catch (Exception e)
                   e.printStackTrace();
    But I am getting this exception :
    ERROR [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.SERVER - Class/Method: tcTableDataObj/getString encounter some problems: Column 'GROUPS.KEY' not found
    com.thortech.xl.dataaccess.tcDataSetException: Column 'GROUPS.KEY' not found
         at com.thortech.xl.dataaccess.tcDataSet.getColumnIndex(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.getString(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.getString(Unknown Source)
         at oim.GroupEventHandler.implementation(GroupEventHandler.java:19)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcUSG.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcGroupOperationsBean.addMemberUsers(Unknown Source)
         at com.thortech.xl.ejb.beans.tcGroupOperationsSession.addMemberUsers(Unknown Source)
         at com.thortech.xl.ejb.beans.tcGroupOperations_ejm77u_EOImpl.addMemberUsers(tcGroupOperations_ejm77u_EOImpl.java:1671)
         at Thor.API.Operations.tcGroupOperationsClient.addMemberUsers(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy66.addMemberUsers(Unknown Source)
         at com.thortech.xl.webclient.actions.UserGroupMembersAction.assignMemberUsers(Unknown Source)
         at com.thortech.xl.webclient.actions.UserGroupMembersAction.assignGroupMembers(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

    Anyone have idea about why "Groups.Key" not found exception thrown here..
    I have assigned this event handler at postinsert event of User Groups.User Members Data Object.

  • Java 1 vs. Java 2 Event Handling

    Prelude: This question relates to writing code for event handling.
    Java 1 is based on a hierarchy model to handle events, ie. inheritance from superclasses. Java 2 uses delagation event handling method. Java 2 code will not compile if it includes Java 1 code still modeled according to Java 1 event handling.
    Question:
    Is it generally easier to start completely over in trying to convert Java 1 code into Java 2 code by not retaining any Java 1 code and begin reconceptualizing what is needed for a conversion to Java 2?

    From what I understand java2 should support both models, however not both at the same time, you cant mix the modles...
    I also think that the older models methods or at least most have been depreciated, meaning that the old model will, if it hasnt allready in the latest release, dissapear.. For that single reason I would recommend updating the event model to the delegation model if you hope to keep it around and running for years to come. You gain a bit by doing this since the newer model is much faster!!!

  • How to stop a while loop which contains a timed loop

    Hi,
    I'm a new hand to labview, and I'm using labviw 7.1, NOT 8.x.  I'm trying to do a measurement, in which the flow would look like the attached file (I have stipped all hardware related components to make it easy to read).  My questions are:
    1. In Loop 3, when the comparison (x>20.85) is true, Loop1, Loop2 and Loop3 are stopped, why it won't quit the while loop (I have wired it to  while loop stop)?
    2. When it is running, I click on stop button, why it won't stop?
    Thanks!
    Attachments:
    SyncTimedLoop32.vi ‏228 KB

    hwm wrote:
    2. When it is running, I click on stop button, why it won't stop?
    The stop button is read outside of the inner while loops.  So the inner while loops will continue to run until their stop conditions are met.
    hwm wrote:
    1. In Loop 3, when the comparison (x>20.85) is true, Loop1, Loop2 and Loop3 are stopped, why it won't quit the while loop (I have wired it to  while loop stop)?
    It seemed to me like it would, but sometimes it seemed like I had to set change the numeric value one more time before it would.  You have a very odd structure there by placing the event structre inside the while loop with the other loops.  I think you may be running into issues where events are getting queued up in the event structure, or race conditions between when the event structure might execute relative to the other loops.  It is all very odd and difficult to predict all the ways these structures might interact and relative timing.  Usually event structures would belong in their own parallel while loop.  I think you need to rethink exactly what you are trying to do here.  It probably isn't event necessary to use the stop timed structure functions.  A local variable or a notified to pass the "Stop status" from loop 3 to the other loops (or the separate event structure loop to the other 3) would probably be better.

Maybe you are looking for