Stop Plugin VI execution

Hi Experts!
I'm wondering about an elegant solution for my problem. I have a top level VI that contains subpanel, in order to call plugin VI interfaces into. The plugin vi itself has own state machine (JKI Queued State Machine) and called by VI Server - Run VI method. 
As the plugin VI starts to run, the State machine While loop activated and the plugin VI can be closed if set the while loop condition value to True. There is no problem with that, but imagine a situation when the user wants to exit the application when both of VIs are running. (Plugin Interface and Top Level VI) The app. wont stops because the loop of the top level vi finishes execution only. 
I'm looking for an elegant solution for stopping plugin VI-s, without Closing them normally. There are many topcics about Opening Plugin VIs (Dinamic Calling) but none of Stopping them!
Thanks in advance!
+++ In God we believe, in Trance we Trust +++
[Hungary]
Solved!
Go to Solution.

All methods of cleanly stopping multiple top-level VIs revolve around using the standard message protocols for interprocess communication.  They also presume some sort of state machine or command handler in each of the top-level VIs.  There are two major categories - broadcast and point-to-point.
Broadcast methods send out a message from one sender to multiple receivers, usually without expecting a reply.  The best broadcast method is probably user-defined events, but notifiers are easier if you do not require that all messages be processed.
Point-to-point methods send out a message from one sender to one receiver.  These are often two way, call-response, message systems.  The best of these is the queue.
These methods and examples are shown in a mini-series I wrote awhile back on running top-level VIs.  You can find all the entries from the links on the last one.
All of this assumes yours top-level VIs are running on the same machine in the same process.  If you are running in different processes or on different machines, you will need to explore other protocols such as network streams, TCP/IP. or UDP to get your messages across.  However, I have never done this, so cannot coherently comment on it.
This account is no longer active. Contact ShadesOfGray for current posts and information.

Similar Messages

  • HT203163 All of a sudden I'm getting  a message Itunes has stopped working Data Execution prevention has closed Itunes what is causing this now, never had an issue until yesterday

    All of a sudden I'm getting a message Itunes has stopped working Data Execution Prevention has closed Itunes. What is causing this now, never had an issue until yesterday

    please sombody help me, apple support are no help, the shop are no help, the only thing i havent tried is delete everything on my laptop and put it back to factory, which is my very last resort

  • How to stop processRequest method execution second time in CO

    Hi all,
    I have a Requirment like to stop ProcessRequest method execution In my controler when i click the button on my page
    Regards,
    Shiva

    Hi Shiva,
    You can make use of session parameters..
    When you click on a button ?? why will the page go to PR method ??
    By default it goes in PFR method.
    Anyways if you are redirecting it to the same page : u can make use of below methods for the same to control the execution of methods in PR.
    While coming back to PR method : check the parameter value.. & make sure that..no methods are executed in it.
    PR Method
    String dieFromUpdate = pageContext.getParameter("DieValue");
    if(dieFromUpdate!=null)
    make use of this condition and execute the statements..
    PF Method
    String Die ='IN PF Method " ;
    pageContext.putParameter("DieValue", Die);
    Regards
    Sridhar

  • Stop the method Execution.

    Hi..
    I have a method call to make a credit card payment.sometimes it takes so much times.If that process takes more than 10 minutes,
    I want to stop that method execution.I have implemented the TimerTask to check the execution time and stop..but I don't have a idea to stop that processing method...
    can anyone give me a suggetion.
    Regards
    Amila

    Hi,
    You may have a look at this thread [http://forums.sun.com/thread.jspa?threadID=5347956&tstart=0]
    I changed the suggested code a little to make it (hopefully) suitable for your use case. Note that the long running task communicates to its invoker via System.out.
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import javax.swing.AbstractAction;
    import javax.swing.Action;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextPane;
    import javax.swing.JToolBar;
    import javax.swing.SwingUtilities;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.Document;
    public class TaskDispatcher {
        private static long lengthy = 10000;
        public static void main(String[] args) {
         SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
              new TaskDispatcher().createGUI();
        private JTextPane textPane;
        private JLabel message;
        private Process process;
        private Action kill = new AbstractAction("Kill") {
         private static final long serialVersionUID = 1L;
             this.setEnabled(false);
         @Override
         public void actionPerformed(ActionEvent event) {
             destroy();
        private Action dispatch = new AbstractAction("Dispatch") {
         private static final long serialVersionUID = 1L;
         @Override
         public void actionPerformed(ActionEvent event) {
             dispatch();
        public void createGUI() {
         JFrame frame = new JFrame();
         textPane = new JTextPane();
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         message = new JLabel("Status", JLabel.CENTER);
         JToolBar toolBar = new JToolBar();
         frame.add(toolBar, BorderLayout.PAGE_START);
         frame.add(new JScrollPane(textPane), BorderLayout.CENTER);
         frame.add(message, BorderLayout.PAGE_END);
         toolBar.add(dispatch);
         toolBar.add(kill);
         frame.setSize(400, 400);
         frame.setLocationRelativeTo(null);
         frame.setVisible(true);
        private void appendLine(String line) {
         Document doc = textPane.getDocument();
         try {
             doc.insertString(doc.getLength(), line + "\n", null);
         } catch (BadLocationException e) {
             e.printStackTrace();
        private void destroy() {
         kill.setEnabled(false);
         process.destroy();
         dispatch.setEnabled(true);
        private void dispatch() {
         dispatch.setEnabled(false);
         try {
             textPane.setText("");
             launch();
             kill.setEnabled(true);
         } catch (IOException e) {
             e.printStackTrace();
             dispatch.setEnabled(true);
        private void handleErr(final Process process) {
         new Thread(new Runnable() {
             final BufferedReader errReader;
              errReader = new BufferedReader(new InputStreamReader(process
                   .getErrorStream()));
             @Override
             public void run() {
              try {
                  String line = null;
                  while ((line = errReader.readLine()) != null) {
                   System.err.println("Other JVM: " + line);
              } catch (Throwable t) {
                  t.printStackTrace();
              } finally {
                  try {
                   errReader.close();
                  } catch (IOException e) {
                   e.printStackTrace();
         }).start();
        private void handleOut(final Process process) {
         new Thread(new Runnable() {
             final BufferedReader outReader;
              outReader = new BufferedReader(new InputStreamReader(process
                   .getInputStream()));
             @Override
             public void run() {
              try {
                  String line = null;
                  while ((line = outReader.readLine()) != null) {
                   appendLine(line);
              } catch (Throwable t) {
                  t.printStackTrace();
              } finally {
                  try {
                   outReader.close();
                  } catch (Throwable t) {
                   t.printStackTrace();
         }).start();
        private void launch() throws IOException {
         final String command;
         command = "java -cp \"" + System.getProperty("java.class.path") + "\" "
              + LengthyTask.class.getCanonicalName() + " \"" + lengthy + "\"";
         process = Runtime.getRuntime().exec(command);
         message.setText("Process is running");
         handleOut(process);
         handleErr(process);
         new Thread(new Runnable() {
             @Override
             public void run() {
              try {
                  int rc = process.waitFor();
                  kill.setEnabled(false);
                  if (rc != 0) {
                   appendLine("Exit code " + rc);
                  dispatch.setEnabled(true);
                  message.setText(rc == 0 ? "Completed successfully"
                       : "Problem exit code: " + rc);
              } catch (InterruptedException e) {
                  e.printStackTrace();
         }).start();
    }Piet

  • Is there any way to stop a process execution (all instances)

    Hello,
    I´d like to know if there is any way to stop a specific process for execution at the engine without need to undeploy it, since we don´t want to loose process instances when we need to start this process for execution latter on.
    We have a PRD environment with a lot of processes from different departments (developed by different teams and external suppliers) and a feature for stop a specific process and isolate the environment could be very good to do root cause analysis when issues occurs at the environment.
    Sometimes stop a specific process (or some of them) could help in issues investigation that causes the engine to malfunction (lot of audit enabled, some loop bad controlled, lot of concurrent access) but I could not see this option at the webconsole.
    In the version 5.7 one EAR was created separatedly for each process deployed and this could be done stopping the EAR created for that process. Anyone know how to do this at version 6?
    Thanks

    Well the bad news is you are right, there really isn't any way to do this in versions after 5.7
    Starting at 6.0 all projects are deployed under the 'engine ear'. So if you stop the engine, you stop all projects deployed.
    I'm a little concerned that you are first seeing these issues in a 'PRD' environment, is this something that you could set up in a DEV, or UAT, or SIT, or any other environment (That is built similarly) to recreate the issues? - Then undeploy any of the other projects... and isolate the problem...
    -Kevin

  • Stopping Mapping Program Execution.

    Hi all,
    How can I stop execution of a message mapping program based on some condition in mapping?
    Is here java code sample I can use in this?
    Please help me.
    -kanth.

    Hi,
    could you have a look at the following thread please?
    Re: XPATH and Receiver Determination
    thanks,
    kanth.
    Message was edited by:
            sri kanth

  • HT1527 Can't open iTunes...windows connectivity test says that iTunes has stopped working -  Date execution prevention has closed iTunes.   What do I do now?

    I can't open iTunes...Windows connectivity test says that iTunes has stopped working....Date execution prevention has closed iTunes.  

    If you update your QuickTime Player to the latest version, does that clear up the DEP errors in iTunes?

  • Can't stop a job execution

    I have Oracle 10g and a scheduled job which executes a hot backup every day at 2 AM.
    Yesterday evening at 10 PM the listener hung. I rebooted the machine this morning and everything is fine now.
    However, the Jobs page shows, that the last backup has been running for 15 hours now!
    When I try to stop it, it says "The job was stopped successfully", but I see status is still "Running". I tried to delete it, but it says it must be stopped first.
    Is there any way to kill this job?
    I know there is a DBMS_SCHEDULER.STOP_JOB procedure, but it requires job name and I don't know how to get that.
    I didn't find anything useful in dba_jobs or any other view.

    I have had some success with finding the offending session and killing it, then killing the offending OS process.
    Since we are using RAC (on RHEL), and the session is known to be running under a job class, which runs under a service, we find the offending session by:
    select sid, serial#, status from gv$session where service_name = 'BACKUPS';
    SID SERIAL# STATUS
    3185 4664 ACTIVE
    Then issue: ALTER SYSTEM KILL SESSION '3185, 4664' IMMEDIATE;
    SID SERIAL# STATUS
    3185 4664 KILLED
    Now, find the OS process associated with that SID (assuming you are using UNIX):
    select s.username, s.status, s.sid oracle_sid, s.process unix_pid, s.serial#, p.spid, s.machine, s.lockwait
         from v$session s, v$process p
         where s.sid = '&oracle_sid'
         and s.paddr = p.addr
    Enter value for oracle_sid: 3185
    USERNAME STATUS ORACLE_SID UNIX_PID
    APP_SERVER INACTIVE 3185 1234
    Then, leave sqlplus, and kill the offending OS process using a command prompt on the server:
    kill -9 1234
    After this, the job can be disabled/modified/dropped

  • How can i stop plugin check from insisting i update my non-updateable plugins on Win2K?

    I'm still running Win2K. Since it has officially gone off support, many of my plugins are updated as far as they ever can be. The "Plugin Check" page is opening every time i start Firefox, and there's nothing I can do to satisfy it. How can I disable it?

    Possibly a plugin that should be removed see
    plugin page keeps coming up: see https://support.mozilla.com/en-US/questions/832793 particularly the replies near the end (different replies for different users).
    look for the word "red".
    Possibly by having Firefox not check for updates for add-ons.
    Tools > Options > Advanced > Updates > ...

  • Stop Static Block Execution while loading class

    Hi,
    I want to load one class using Class. forname method. But with one condition that It should not execute static body of class.

    I would suppose that one had better really know what they are doing before using that method.

  • Stopping Pipeline from execution.

    Hi All,
    I hav a requirement where i'm sending File(XML)->XI->File(XML).The problem is that even if i remove a closing tag in the sender xml, an output file is getting created on the reciver side with no content which i really don't want.i want the output file to b created if the process is successfull and with some relavant data.Can anyone help me in this regard?
    Thnx in advance
    Anil.

    Anil,
    u can call CallSAPAdapter from ur module program by looking up for that EJB.I am giving u a code which was given by Satish in earlier thread
    **********************Code************************
    try {
    InitialContext ctx = new InitialContext(); // Get the root context
    ModuleLocalHome home =
    (ModuleHome) ctx.lookup("localejbs/sap.com/CallSAPAdapter"); // get the local home for CALLSAPADAPTER
    ModuleLocal local = home.create(); // Get the local node of CallSapAdapter bean
    local.process(ModuleContext mc, ModuleData md) // Call process method.
    catch (Exception ex) {
    throw new SAXException( "Error while calling CallSAPAdapter" + ex.getMessage());
    it should be ModuleLocalHome for CallSAPAdapterLocalHome
    and ModuleLocal for CallSAPAdapterLocal.
    *********************End Code********************
    if ur XML validation is true then call this EJB otherwise don't perform the lookup.Also do not include CallSAPAdapter inside ur configuration settings as ur calling the same from ur Module EJB.
    Hope this should help.
    Regards
    Rajeev

  • Safari flash: disable "stop plugin" or connect mac to power source

    this error shows up from lion to mavericks wth different versions of flash, open for example this link http://gry.onet.pl/world-of-tanks-m60a2-najwiekszy-niewypal-w-historii-armii-usa /78317 in new background tab

    From your Safari menu bar click Safari > Preferences then select the Security tab.
    Make sure:   Allow Plug-ins  is selected.

  • How do i stop the plugin from showing up and crshin??

    how can i stop plugin from showing up while i play my games??

    Use VMware Fusion? But seriously, Fusion does what you want. It just puts a mini VM control menu at the top when running full screen (and that's configurable, too), so the main menu bar doesn't appear at all. Which means that it's up to Parallels to handle this. Are you running Parallels 7, which is designed for Lion? If you are and Parallels still doesn't offer something similar, you need to contact Parallels.

  • Stopping execution of the script from the databank

    I'd like to provide control through the databank for the user to programmatically stop the script execution depending on certain real time conditions or data calculations. Does anyone have a sample VBA script example for the ThisJob object. Thanks.

    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> timing start total_elapsed
    <do your things here>
    SQL> timing stop total_elapsed
    timing for: total_elapsed
    Elapsed: 00:00:11.28

  • Plugin-container.exe brought my PC to its knees. How to stop this?

    I had absolutely no response from my computer for several minutes. After repeatedly trying to open the task manager, I finally succeeded. I noticed that plugin-container.exe was running at over 50%. I attempted to close all the running processes, but they were hung. I finally had to shut off my PC. One of your background processes should not be hijacking my computer for minutes! Please fix this!!!!!!
    Also, your submit feedback is not working.

    I found the way to stop using plugin-container.exe from somewhere and it works.
    Steps to stop plugin-container.exe process:
    * Open Firefox web browser.
    * Type about:config in the address bar and press Enter key.
    * A warning will appear. Ignore it and press the "I』ll be careful, I promise!" button.
    * In the Filter field type dom.ipc. Six preferences will appear for the filter dom.ipc.
    * Ignore first and last preferences. Toggle (double-click) each of the four remaining preferences to change the value from "true" to "false".
    Explanation: The crash protection feature in Firefox 3.6 is enabled for certain plugins only. The four preferences that we modified here specifies four different out-of-process plugins. They are the the NPAPI test plugin, Adobe Flash, Apple QuickTime (Windows) and Microsoft Silverlight (Windows). These plugins are specified in a separate dom.ipc.plugins.enabled.<filename> preference by default is set to true. We can disable them by changing their value to false. And thus plugin-container.exe will not run. By default the preference dom.ipc.plugins.enabled is already set to "false". So, no need to touch it. The dom.ipc.plugins.timeoutSecs is also not important here as other values are false.

Maybe you are looking for

  • XMLTYPE from Pooled Connection throws ClassCastException

    Hello, I am developing a Java web application using Developer 10.1.3 that is tied to an Oracle database through a connection pool. The application is utilizing Oracle's xmldb libraries in order to store xml documents as XMLTYPE in the database. The t

  • HELP! INVALID CURSOR STATE

    i have this simple jsp page that will display a few data from an SQL Database... im just trying to check my connectivity. but everytime i view the page it says "[Microsoft][ODBC SQL Server Driver]Invalid cursor state'"my JSP environment is J2EE 1.2.1

  • Search in SharePoint 2013 with Oracle as external DB

    hello experts... i want to create a custom search page with intellisense enable text box and button to search Oracle DB as external content. from where can i start? i googled a bit and get the following link as start up. http://lightningtools.com/bcs

  • Problem in rem

    Dear pp guru!                         I have faced one problem.how to activate reporting point backflush in rem profile.for a particular operation for example EX: I have 10 operations.I want activate reporting point  backflush for 5th operation.plz e

  • Setting H264 ICodec properties in Metro (Modern) interface through an IMFMediaSink/IMFStreamSink pair.

    Hello, I'm trying to set some properties (CODECAPI_AVEncCommonRateControlMode and CODECAPI_AVEncCommonQuality), but I'm not sure how to do it. I tried to set them through the media type, but they seem to get ignored by the system (I tried with 1 and