Generate event

Hi All,
I am using Labview7.0 and need to generate automatic event. It means without any button press or mouse move activity on front panel, i want to generate event after every particular time interval. 
How i can fullfill my requirement??
Regards,
Ratna
Solved!
Go to Solution.

Hi Ratna,
Dynamic event registration gives you increased flexibility in controlling how and where events are handled in your application. You can try the attachment. It should open in LV 7.0.
Thanks,
Joe
Attachments:
dynamiceventsdemo.zip ‏133 KB

Similar Messages

  • How to manually generate events in SMC 3.5 ?

    Dear,
    We are using the SDK of SMC 3.5 to build an application. To test the application, how can we generate events manually ? I'd like to have a script on Solaris that, when run, generates an event in the SMC database. Does anyone have such a script ?
    Best regards,
    Marc.

    Convert the CR2 files to DNG files, a folder at a time, using the latest DNG Converter that is from Adobe:  http://www.adobe.com/downloads/updates/
    OR buy an upgrade to LR 4.x.

  • Can I use AWT elements in a JSP, and so could I generate events with them?

    This is because I�m doing a simple JSP that showing a button, my JSP is:
    <html>
    <%@ page import="java.awt.*" %>
    <%! Button b = new Button("Hola!!!"); %>
    <% add(b); %>
    </html>
    But when I tried to see the button in the browser, my JSP generates the following:
    Compilation of '/RAID5/weblogic/myserver/classfiles/jsp_servlet/_gep/_alterno/_23_mayo/__mr4.java' failed:
    /RAID5/weblogic/myserver/classfiles/jsp_servlet/_gep/_alterno/_23_mayo/__mr4.java:79: cannot resolve symbol
    probably occurred due to an error in /gep/alterno/23_mayo/mr4.jsp line 7:
    <% add(b); %>
    Could somebody help me please?.....
    Can I use AWT elements in a JSP, and so could I generate events with them?
    Thanks!!!

    There are 2 ways to run a web page dynamically:
    1) Reload the page via use of javascript or some other scripting language.
    2) Use an applet to regularly check a URL for the data
    Remember, as Paul pointed out, JSP's only generate HTML output. AWT components need to run inside a JVM not a just the browser.
    I could recommend an applet but you may have problems with IE6 not supporting java. Otherwise there shouldn't be too much of a prob.
    If you prefer to use an AWT/Swing setup (for example an application) rather than a JSP setup, Webstart is good for delivering online applications which operate standalone or remotely.
    When you consider that the Java-Plugin and the Webstart puligin are about the same size it's just a matter of weighing up who your target clients are and whats easiest.
    Cheers,
    Anthony

  • Maintain Equipment Category u2192 Generate Event for Workflow

    Maintain Equipment Category u2192 Generate Event for Workflow
    I activated this,
    Now what should i do further to receive a workflow mail when an Equipment is created for this Equipment Category
    Thanks

    Hello
    Maybe this can be helpful
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/52/e4fac8e31111d58d3a0000e8284931/content.htm
    You can Synchronizing Fixed Assets and Equipment and in this scenarier there are workflow you can send out.
    BR/Håkan

  • Generating events such as "push buttons" in ABAP

    Hi,
    Is it possible to make code in ABAP that given a screen number can generate events for that screen.
    For example create a Z program that given the input parameters screen name and transaction, do something like:
    screen 101.pushChangeButton.?
    regards
    Baran

    yes see this code.
    REPORT  YH648_DIALOG_PROGRAM.
    *call screen 1649.
    call screen 1642.
    ***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'T_CONTROL'
    *&SPWIZARD: DEFINITION OF DDIC-TABLE
    TABLES:   SPFLI.
    *&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'T_CONTROL'
    TYPES: BEGIN OF T_T_CONTROL,
             MANDT LIKE SPFLI-MANDT,
             CARRID LIKE SPFLI-CARRID,
             CONNID LIKE SPFLI-CONNID,
             COUNTRYFR LIKE SPFLI-COUNTRYFR,
             CITYFROM LIKE SPFLI-CITYFROM,
             AIRPFROM LIKE SPFLI-AIRPFROM,
             COUNTRYTO LIKE SPFLI-COUNTRYTO,
             CITYTO LIKE SPFLI-CITYTO,
             AIRPTO LIKE SPFLI-AIRPTO,
             FLTIME LIKE SPFLI-FLTIME,
             DEPTIME LIKE SPFLI-DEPTIME,
             ARRTIME LIKE SPFLI-ARRTIME,
             DISTANCE LIKE SPFLI-DISTANCE,
             DISTID LIKE SPFLI-DISTID,
             FLTYPE LIKE SPFLI-FLTYPE,
             PERIOD LIKE SPFLI-PERIOD,
           END OF T_T_CONTROL.
    *&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'T_CONTROL'
    DATA:     G_T_CONTROL_ITAB   TYPE T_T_CONTROL OCCURS 0,
              G_T_CONTROL_WA     TYPE T_T_CONTROL. "work area
    DATA:     G_T_CONTROL_COPIED.           "copy flag
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'T_CONTROL' ITSELF
    CONTROLS: T_CONTROL TYPE TABLEVIEW USING SCREEN 1642.
    *&SPWIZARD: LINES OF TABLECONTROL 'T_CONTROL'
    DATA:     G_T_CONTROL_LINES  LIKE SY-LOOPC.
    DATA:     OK_CODE LIKE SY-UCOMM.
    module pf_status output.
      set pf-status 'STATUS_1642'.
    endmodule.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'T_CONTROL'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: COPY DDIC-TABLE TO ITAB
    MODULE T_CONTROL_INIT OUTPUT.
      IF G_T_CONTROL_COPIED IS INITIAL.
    *&SPWIZARD: COPY DDIC-TABLE 'SPFLI'
    *&SPWIZARD: INTO INTERNAL TABLE 'g_T_CONTROL_itab'
        SELECT * FROM SPFLI
           INTO CORRESPONDING FIELDS
           OF TABLE G_T_CONTROL_ITAB.
        G_T_CONTROL_COPIED = 'X'.
        REFRESH CONTROL 'T_CONTROL' FROM SCREEN '1642'.
      ENDIF.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'T_CONTROL'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MOVE ITAB TO DYNPRO
    MODULE T_CONTROL_MOVE OUTPUT.
      MOVE-CORRESPONDING G_T_CONTROL_WA TO SPFLI.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'T_CONTROL'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: GET LINES OF TABLECONTROL
    MODULE T_CONTROL_GET_LINES OUTPUT.
      G_T_CONTROL_LINES = SY-LOOPC.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'T_CONTROL'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: PROCESS USER COMMAND
    MODULE T_CONTROL_USER_COMMAND INPUT.
      OK_CODE = SY-UCOMM.
      PERFORM USER_OK_TC USING    'T_CONTROL'
                                  'G_T_CONTROL_ITAB'
                                  'FLAG'
                         CHANGING OK_CODE.
      SY-UCOMM = OK_CODE.
    ENDMODULE.
    module back_exit.
    leave program.
    endmodule.
      INCLUDE TABLECONTROL_FORMS                                         *
    *&      Form  USER_OK_TC                                               *
    FORM USER_OK_TC USING    P_TC_NAME TYPE DYNFNAM
                              P_TABLE_NAME
                              P_MARK_NAME
                     CHANGING P_OK      LIKE SY-UCOMM.
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA: L_OK              TYPE SY-UCOMM,
             L_OFFSET          TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    *&SPWIZARD: Table control specific operations                          *
    *&SPWIZARD: evaluate TC name and operations                            *
       SEARCH P_OK FOR P_TC_NAME.
       IF SY-SUBRC <> 0.
         EXIT.
       ENDIF.
       L_OFFSET = STRLEN( P_TC_NAME ) + 1.
       L_OK = P_OK+L_OFFSET.
    *&SPWIZARD: execute general and TC specific operations                 *
       CASE L_OK.
         WHEN 'INSR'.                      "insert row
           PERFORM FCODE_INSERT_ROW USING    P_TC_NAME
                                             P_TABLE_NAME.
           CLEAR P_OK.
         WHEN 'DELE'.                      "delete row
           PERFORM FCODE_DELETE_ROW USING    P_TC_NAME
                                             P_TABLE_NAME
                                             P_MARK_NAME.
           CLEAR P_OK.
         WHEN 'P--' OR                     "top of list
              'P-'  OR                     "previous page
              'P+'  OR                     "next page
              'P++'.                       "bottom of list
           PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
                                                 L_OK.
           CLEAR P_OK.
        WHEN 'L--'.                       "total left
          PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
        WHEN 'L-'.                        "column left
          PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
        WHEN 'R+'.                        "column right
          PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
        WHEN 'R++'.                       "total right
          PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
         WHEN 'MARK'.                      "mark all filled lines
           PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                             P_TABLE_NAME
                                             P_MARK_NAME   .
           CLEAR P_OK.
         WHEN 'DMRK'.                      "demark all filled lines
           PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                               P_TABLE_NAME
                                               P_MARK_NAME .
           CLEAR P_OK.
        WHEN 'SASCEND'   OR
             'SDESCEND'.                  "sort column
          PERFORM FCODE_SORT_TC USING P_TC_NAME
                                      l_ok.
       ENDCASE.
    ENDFORM.                              " USER_OK_TC
    *&      Form  FCODE_INSERT_ROW                                         *
    FORM fcode_insert_row
                   USING    P_TC_NAME           TYPE DYNFNAM
                            P_TABLE_NAME             .
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_LINES_NAME       LIKE FELD-NAME.
       DATA L_SELLINE          LIKE SY-STEPL.
       DATA L_LASTLINE         TYPE I.
       DATA L_LINE             TYPE I.
       DATA L_TABLE_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>                 TYPE CXTAB_CONTROL.
       FIELD-SYMBOLS <TABLE>              TYPE STANDARD TABLE.
       FIELD-SYMBOLS <LINES>              TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: get looplines of TableControl                              *
       CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
       ASSIGN (L_LINES_NAME) TO <LINES>.
    *&SPWIZARD: get current line                                           *
       GET CURSOR LINE L_SELLINE.
       IF SY-SUBRC <> 0.                   " append line to table
         L_SELLINE = <TC>-LINES + 1.
    *&SPWIZARD: set top line                                               *
         IF L_SELLINE > <LINES>.
           <TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
         ELSE.
           <TC>-TOP_LINE = 1.
         ENDIF.
       ELSE.                               " insert line into table
         L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
         L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
       ENDIF.
    *&SPWIZARD: set new cursor line                                        *
       L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
    *&SPWIZARD: insert initial line                                        *
       INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
       <TC>-LINES = <TC>-LINES + 1.
    *&SPWIZARD: set cursor                                                 *
       SET CURSOR LINE L_LINE.
    ENDFORM.                              " FCODE_INSERT_ROW
    *&      Form  FCODE_DELETE_ROW                                         *
    FORM fcode_delete_row
                   USING    P_TC_NAME           TYPE DYNFNAM
                            P_TABLE_NAME
                            P_MARK_NAME   .
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_TABLE_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>         TYPE cxtab_control.
       FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
       FIELD-SYMBOLS <WA>.
       FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: delete marked lines                                        *
       DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
       LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         IF <MARK_FIELD> = 'X'.
           DELETE <TABLE> INDEX SYST-TABIX.
           IF SY-SUBRC = 0.
             <TC>-LINES = <TC>-LINES - 1.
           ENDIF.
         ENDIF.
       ENDLOOP.
    ENDFORM.                              " FCODE_DELETE_ROW
    *&      Form  COMPUTE_SCROLLING_IN_TC
          text
         -->P_TC_NAME  name of tablecontrol
         -->P_OK       ok code
    FORM COMPUTE_SCROLLING_IN_TC USING    P_TC_NAME
                                           P_OK.
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_TC_NEW_TOP_LINE     TYPE I.
       DATA L_TC_NAME             LIKE FELD-NAME.
       DATA L_TC_LINES_NAME       LIKE FELD-NAME.
       DATA L_TC_FIELD_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>         TYPE cxtab_control.
       FIELD-SYMBOLS <LINES>      TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get looplines of TableControl                              *
       CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
       ASSIGN (L_TC_LINES_NAME) TO <LINES>.
    *&SPWIZARD: is no line filled?                                         *
       IF <TC>-LINES = 0.
    *&SPWIZARD: yes, ...                                                   *
         L_TC_NEW_TOP_LINE = 1.
       ELSE.
    *&SPWIZARD: no, ...                                                    *
         CALL FUNCTION 'SCROLLING_IN_TABLE'
              EXPORTING
                   ENTRY_ACT             = <TC>-TOP_LINE
                   ENTRY_FROM            = 1
                   ENTRY_TO              = <TC>-LINES
                   LAST_PAGE_FULL        = 'X'
                   LOOPS                 = <LINES>
                   OK_CODE               = P_OK
                   OVERLAPPING           = 'X'
              IMPORTING
                   ENTRY_NEW             = L_TC_NEW_TOP_LINE
              EXCEPTIONS
                 NO_ENTRY_OR_PAGE_ACT  = 01
                 NO_ENTRY_TO           = 02
                 NO_OK_CODE_OR_PAGE_GO = 03
                   OTHERS                = 0.
       ENDIF.
    *&SPWIZARD: get actual tc and column                                   *
       GET CURSOR FIELD L_TC_FIELD_NAME
                  AREA  L_TC_NAME.
       IF SYST-SUBRC = 0.
         IF L_TC_NAME = P_TC_NAME.
    *&SPWIZARD: et actual column                                           *
           SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
         ENDIF.
       ENDIF.
    *&SPWIZARD: set the new top line                                       *
       <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM.                              " COMPUTE_SCROLLING_IN_TC
    *&      Form  FCODE_TC_MARK_LINES
          marks all TableControl lines
         -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                   P_TABLE_NAME
                                   P_MARK_NAME.
    &SPWIZARD: EGIN OF LOCAL DATA----
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: mark all filled lines                                      *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         <MARK_FIELD> = 'X'.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Form  FCODE_TC_DEMARK_LINES
          demarks all TableControl lines
         -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                     P_TABLE_NAME
                                     P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: demark all filled lines                                    *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         <MARK_FIELD> = SPACE.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    see at pf-status.
    Message was edited by:
            sunil kumar

  • Differences between Robot class generated events and real input events

    Hello everyone!
    I'm having a problem with the translation of the description of the awt.Robot class.
    - "This class is used to generate native system input events" -
    Does this mean there is no difference between real input events and generated events from the Robot class? Difference in reference to that the generated events can't be recognized as generated events by the os or programs.
    Thanks in advance.
    Chris B.

    The Robot class will use an interface provided by the operating system to inject events. Those are very close to 'real' input events, but not quite there. There are, for instance, several games out there which have a protection mechanism against Robot's events to prevent scripting/botting. However, any application that is not paying special attention to the event's source will assume that the input events generated by Robot are actually coming from the user, so you can 'control' any application with the exception of the beforementioned games.

  • Event monitor cannot find PowerShell generated events

    I have a basic event monitor that only looks for an event ID and source. The event I am monitoring is generated via Powershell from a remote system rather than being locally created. I'm not sure if that matters, but it sure seems like it.
    If I change the event expression in the monitor to look for other events it will generate alerts, it just cant see my PS events. I've tried changing the ID number, the source, using different params, etc... I'm convinced that this is due to the event creation
    process and PS must be creating the event in a different manner than SCOM is looking for. Maybe its a bug where SCOM just ignores events created by proxy.
    I found this: http://www.systemcentercentral.com/monitoring-events-written-from-a-remote-server-with-scom/
    But that is for Rules. I still tried adding <AllowProxying>false</AllowProxying> to the XML of the MP...SCOM didn't like
    it.
    Has anyone ran into this before?
    We are using SCOM 2012R2 fully updated. 
    - Slow is smooth and smooth is fast.

    I guess I should have been more specific. I am using PowerShell to create an event, it isnt an actual PowerShell event.
    write-eventlog -computername Server -logname Application -source Orchestrator -eventID 1 -message "This is an example of the events created with PS that SCOM cannot detect."
    Maybe I should explain what I'm doing. I have an Orchestrator runbook that does stuff with things. If one of the runbook activities fails, it will send an event to the machine it was trying to run the activity on. SCOM is monitoring for that PowerShell generated
    event stating that the runbook failed. 
    - Slow is smooth and smooth is fast.
    I think you haven't native source "Orchestrator" in PoSh log.
    Vladimir Zelenov | http://systemcenter4all.wordpress.com
    I run a New-EventLog command first to create the Orchestrator source. Otherwise the Write-EventLog command would fail if the source wasn't there. I can see the event there in the logs.
    - Slow is smooth and smooth is fast.

  • Disabled button generates events

    Hello,
    I have a radio button that I want to disable while a background process is running.
    After the process finishes, I enable the button again.
    However, if the user clicks on the disabled button during the background process, an ActionEvent still gets generated.
    Then when the button is re-enabled, it responds to the event that was generated while it was disabled. I want to prevent my button from responding to events generated while it was disabled.
    I do not want to use the getGlassPane.setVisible(true) technique because I still want my cancel button to be able to generate events during the background process.
    I am using JDK 1.3.1 and my button is in a panel contained in a JFrame application.
    Suggestions?
    Thank you,
    Ted Hill

    Hello,
    I have a radio button that I want to disable while a background process is running.
    After the process finishes, I enable the button again.
    However, if the user clicks on the disabled button during the background process, an ActionEvent still gets generated.
    Then when the button is re-enabled, it responds to the event that was generated while it was disabled. I want to prevent my button from responding to events generated while it was disabled.
    I do not want to use the getGlassPane.setVisible(true) technique because I still want my cancel button to be able to generate events during the background process.
    I am using JDK 1.3.1 and my button is in a panel contained in a JFrame application.
    Suggestions?
    Thank you,
    Ted Hill

  • Why shared variable generates events when I write constant value?

    Hello all,
    I'm using LV 8.5 with DSC packet.
    I modified "DSC Events Demo".vi and made a test. I noticed that only variable which work okay is double typed. Why this code generate events all the time when I write constant values to shared variables? Double is okay, but string and boolean types not work okay. Is there any other people how have noticed same symption?
    Attachments:
    modified_dsc_event_demo1.zip ‏391 KB

    You may get an initial event on startup which is normal.  Also make sure that you have not enabled timestamp change events.

  • Generate Events based on Cache size

    Hi,
    I have a use case where I need to generate events when the size of the cache has reached a specific value. The cache will be highly transactions (lot of inserts and deletes totaling to 6 million transactions per day). Also, I cannot limit the size of the cache as I don't want any data to be lost (trying to insert when cache size has reached its limit).
    One of the ways I could do this is to use a MapListener to generate an event on every insert to the Cache, and then check for size each time to decide if the further processing needs to be done. With the nature of the traffic in the cache, the items in the cache are to be processed when the size threshold is reached and then deleted. But, I'm not sure how much of an overhead these events and listeners will have (with 6 million items going through the cache each day)
    Is there any other more efficient way to do this? I have looked at Continuous Query cache which uses a filter based on a cache. But, I'm not able to figure out a way to get the size of the cache using a filter.
    Any pointers are helpful
    Thanks in advance
    Regards
    Vikas
    Edited by: vikascv on Nov 17, 2009 8:48 AM

    Hi Vikas,
    Typically a size type calculation is the cumulative result of all storage enabled nodes, i.e. a Count aggregation. In your use case you want to be made aware of changes to an aggregation but as an aggregation is point in time of request opposed to continually being updated it does not fit your use case. One option is to create a MapEventTransformer that you register with the cache which increments a counters cache (on a separate service) using an EntryProcessor, i.e.
    MapEventTransformer...
    public class CounterMapEventTransformer implements MapEventTransformer, PortableObject
        String m_cacheName;
        public CounterMapEventTransformer()
        public CounterMapEventTransformer(final String cacheName)
            m_cacheName = cacheName;
        public MapEvent transform(MapEvent event)
            Long prevCount    = null;
            Long currentCount = null;
            switch( event.getId() )
                case( MapEvent.ENTRY_INSERTED ):
                    // perform counter++
                    currentCount = (Long) CacheFactory.getCache("counters").invoke(m_cacheName, new CounterOp(true));
                    break;
                case( MapEvent.ENTRY_DELETED ):
                    // perform counter--
                    currentCount = (Long) CacheFactory.getCache("counters").invoke(m_cacheName, new CounterOp(false));
                    break;
            MapEvent newEvent = new MapEvent(event.getMap(), event.getId(), event.getKey(), currentCount-1, currentCount);
            return newEvent;
        public void writeExternal(PofWriter out) throws IOException
            out.writeString(0, m_cacheName);
        public void readExternal(PofReader in) throws IOException
            m_cacheName = in.readString(0);
        }Incrementing EP...
    public class CounterOp extends AbstractProcessor implements PortableObject
        boolean m_increment;
        public CounterOp()
        public CounterOp(boolean increment)
            m_increment = increment;
        @Override
        public Object process(Entry entry)
            Long newVal = null;
            if( !entry.isPresent() )
                entry.setValue(newVal = Long.valueOf(1));
            else
                newVal = ((Long)entry.getValue()).longValue() + (isIncrement() ? 1 : -1);
                entry.setValue( newVal );
            return newVal;
        protected boolean isIncrement()
            return m_increment;
        public void writeExternal(PofWriter out) throws IOException
            out.writeBoolean(0, m_increment);
        public void readExternal(PofReader in) throws IOException
            m_increment = in.readBoolean(0);
        }cache-config
         <!--
              | listener-cacheconfig.xml | | Copyright 2001-2009 by Oracle. All
              rights reserved. | | Oracle is a registered trademarks of Oracle
              Corporation and/or its | affiliates. | | This software is the
              confidential and proprietary information of Oracle | Corporation. You
              shall not disclose such confidential and proprietary | information and
              shall use it only in accordance with the terms of the | license
              agreement you entered into with Oracle. | | This notice may not be
              removed or altered.
         -->
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>dist-*</cache-name>
                   <scheme-name>distributed-scheme</scheme-name>
              </cache-mapping>
              <cache-mapping>
                   <cache-name>counters</cache-name>
                   <scheme-name>counter-scheme</scheme-name>
              </cache-mapping>
         </caching-scheme-mapping>
         <caching-schemes>
              <!--
        Distributed caching schemes
        -->
              <distributed-scheme>
                   <scheme-name>distributed-scheme</scheme-name>
                   <service-name>DistributedCache</service-name>
                   <serializer>
                        <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
                        <init-params>
                             <init-param>
                                  <param-type>string</param-type>
                                  <param-value>pof-config.xml</param-value>
                             </init-param>
                        </init-params>
                   </serializer>
                   <backing-map-scheme>
                        <local-scheme />
                        <!--
                             <read-write-backing-map-scheme> <internal-cache-scheme>
                             <local-scheme /> </internal-cache-scheme> <cachestore-scheme>
                             <class-scheme>
                             <class-name>com.oracle.coherence.cachecounter.store.CacheCounterStore</class-name>
                             </class-scheme> </cachestore-scheme>
                             </read-write-backing-map-scheme>
                        -->
                   </backing-map-scheme>
                   <autostart>true</autostart>
              </distributed-scheme>
              <distributed-scheme>
                   <scheme-name>counter-scheme</scheme-name>
                   <service-name>CounterDistributedCache</service-name>
                   <serializer>
                        <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
                        <init-params>
                             <init-param>
                                  <param-type>string</param-type>
                                  <param-value>pof-config.xml</param-value>
                             </init-param>
                        </init-params>
                   </serializer>
                   <backing-map-scheme>
                        <local-scheme />
                   </backing-map-scheme>
                   <autostart>true</autostart>
              </distributed-scheme>
         </caching-schemes>
    </cache-config>pof-config...
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE pof-config SYSTEM "pof-config.dtd">
    <pof-config>     
       <user-type-list>          
          <!-- include all of the standard Coherence type -->
          <include>coherence-pof-config.xml</include>          
          <!-- our custom types (user types) 1000+ -->          
          <user-type>                 
             <type-id>1000</type-id>            
             <class-name>com.oracle.coherence.cachecounter.event.CounterMapEventTransformer</class-name>          
          </user-type>
          <user-type>                 
             <type-id>1001</type-id>            
             <class-name>com.oracle.coherence.cachecounter.processors.CounterOp</class-name>          
          </user-type>
       </user-type-list>
       <allow-interfaces>true</allow-interfaces>
       <allow-subclasses>true</allow-subclasses>
    </pof-config>Test class
    public class MapEventTransformerTest
        public static final String m_cacheName = "dist-test1";
        public static void setUp()
            System.setProperty("tangosol.coherence.cacheconfig", "counter-cacheconfig.xml");
            System.setProperty("tangosol.coherence.distributed.localstorage", "false");
        public static void loadVals()
            final NamedCache cache = CacheFactory.getCache(m_cacheName);
            final int MAX_SIZE = 100;
            for( int i=0; i<MAX_SIZE; i++ )
                cache.put(i, "msg "+i);
        public static void removeVals()
            final NamedCache cache = CacheFactory.getCache(m_cacheName);
            final int MAX_SIZE = 100;
            for( int i=0; i<MAX_SIZE; i++ )
                if( i%2==0 )
                    cache.remove(i);
        public static void testTransformer()
            final NamedCache cache = CacheFactory.getCache(m_cacheName);
            cache.addMapListener(new CounterAwareListener(),
                    new MapEventTransformerFilter(AlwaysFilter.INSTANCE, new CounterMapEventTransformer(m_cacheName)),
                    false);
        public static void main(String[] args) throws IOException
            setUp();
            testTransformer();
            loadVals();
            removeVals();
            System.out.println("press a key to end...");
            System.in.read();
        public static class CounterAwareListener extends MultiplexingMapListener
            @Override
            protected void onMapEvent(MapEvent evt)
                System.out.format( "# of items in cache: %d\n", evt.getNewValue() );
        }Note: Events could be received out of order but for your use case where you are interested in a threshold you may not care! -- food for thought :)
    --harvey                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How I Generate Event from ADF to talk BPEL

    Hi ,
    I want to generate Event in ADF on click of button.
    That Event suppose to send message to BPEL process.
    Can anyone suggest me on this?
    Thanks,
    Ramit

    You would need to use Mediator component in the SOA composite to listen to this event generated from the ADF layer.
    The Mediator can route to the BPEL component where you could do the required processing.
    ADF Developer's guide has all the required information with respect to this:
    http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcentities.htm#CHDHDIDB
    Thanks,
    Navaneeth

  • Disabled buttons still generate events

    It seems that disabled buttons still generate events in business one. If a button is disabled (even a standard one) click events can still be seen in the SBO event logger. I would have expected a disabled button to be completely disabled and no events to be generated whereas as it is I have to check in the event handler to see if the button is enabled or not.
    Is my understanding of this correct?
    Has anyone else had issues like this?
    Gordon Wood

    Hi Gordon,
    That sounds like an issue with the SBO Event Logger because no event is actually triggered in the addon when the button is disabled.
    Kind Regards,
    Owen

  • IDM Generate-Event in Sentinel

    I have an IDM environment setup and I configured the Audit PA to send
    events to the Sentinel IDM Collector. Sentinel is setup with the IDM
    collector via audit to receive the messages. The setup works fine for
    all built-in events.
    What I am now trying to do is get custom events created with the
    Generate-event token in IDM in Sentinel. They show up as an undefined
    event and reference the LSC file. I have located the LSC files, but am
    not able to modify those files directly. I have tried modifying them in
    the cache, in the zip file after importing, and in the zip file before
    posting. I tried modifying them in the zip file, then updating the xml
    file with the hash values, but still am not having any luck with this.
    The next thing I stumbled upon was the 'Custom Execution Mode'. I have
    added the custom.js file and a LSC file which is referenced, but am not
    sure of exactly what to add in the custom.js file to make the events get
    properly recognized by Sentinel. Currently, my custom.js file has the
    following for the customInit section:
    Collector.prototype.customInit = function() {
    // load additional maps, parameters, etc
    var file = new File(instance.CONFIG.collDir + "dirxml_GCA.lsc");
    this.MAPS.LSCMap.extend(this.CONFIG.collDir + "dirxml_GCA.lsc",
    "#EventID");
    return true;
    I have uploaded the file dirxml_GCA.lsc and verified that it exists in
    the plugins_repository for the aux_Identity-Manager... zip file.
    robertivey
    robertivey's Profile: http://forums.novell.com/member.php?userid=27938
    View this thread: http://forums.novell.com/showthread.php?t=426647

    Hi robertivey,
    This is a great question; as you've seen we've included some general
    methods to customize and extend existing Collectors, but to do so you
    also need to know a little bit about how the particular Collector you
    are extending works. We have plans to add a bit of specific
    documentation to the IDM Collector since it's so common to generate
    custom IDM events.
    What you need to know is that normal nAudit events contain a number of
    pre-defined fields such as Date, EventID, Originator, Target, Text1,
    Text2, and so forth. These pre-defined buckets define a datatype and a
    little teeny bit of semantics to the values contained within them, but
    then on top of that the protocol uses the LSC file to add an additional
    layer of semantics on top of the basic elements by adding an additional
    descriptor to each field in the event per event ID. So for example
    you'll see "Text2 Title" as something like "Client IP" which tells you
    that the value in Text2 for event ID 00031550 is the client IP of the
    system that connected to and logged in to the UserApp (note that LSC
    files use an 8-digit hex value for the event IDs; I believe IDM's policy
    code uses decimal so you'll have to convert).
    In our IDM Collector, what we've done is written a little parser that
    knows what to do for any given value in any given nAudit event field.
    For this example, we've written a parser that knows to take the value in
    Text2 and put it in Sentinel's "InitiatorIP" field, adjusting for
    endianess and the like if necessary. If you look through the LSC file
    and through 'dirxml.js', you'll see that for every combination of nAudit
    field and semantic LSC definition, there's a defined parser. We use the
    nAudit field codes defined at the top of the LSC, so you'll see a
    function: "String.prototype["T-Client IP"]", as an example.
    Now, to extend this structure is quite simple - you need to define the
    equivalent of an LSC file for your custom events. To do this, copy some
    lines from the existing LSC into a new file and edit them to match your
    events:
    1) Change the event ID to match your events. Always prefix with '0003'
    - the last four digits are the hex version of your event code, so '1000'
    becomes '03e8'.
    2) Give your event a name
    3) Assign semantic labels to your custom event fields; you should have
    paid attention to the first layer of semantic meaning in Originator,
    Target, etc, but fill in more detail as applicable.
    Note that if you can, re-use the same semantic labels that you see
    applied to other, similar IDM events.
    OK, once that's done, you need to add your new LSC file to the
    Collector using the "Add auxiliary file" process detailed on the
    Customization page.
    Next, you need to load your new LSC file and use it to extend the
    existing one. Simple: from the SDK, grab a copy of custom.js and add
    lines like you have above (you don't need to create a new File object
    though, the single 'extend' line is sufficient).
    Finally, edit your Collector and set its Execution Mode to 'custom',
    then restart.
    Your events should now be parsed!
    The only caveat is that if you don't re-use semantic labels from other
    IDM events, you'll need to define your own parser for your own
    field/label combination, which you can do in custom.js just by copying
    one of the parsers in dirxml.js and modifying the function name to
    match.
    DCorlette
    DCorlette's Profile: http://forums.novell.com/member.php?userid=4437
    View this thread: http://forums.novell.com/showthread.php?t=426647

  • Collector Rule stays with the same Description after "fast" generated Events - (Custom MP)

    Hi , I have a problem to customize one management pack
    I use this MP for a reference
    http://windowsmasher.wordpress.com/2011/02/07/monitoring-esxi-syslogs-with-opsmgr-2007-r2/
    The problem is when I generate event (they are syslog events) the description Data is all the same for some time :)
    For example if I generate 10 events fast , the description is all the same , but the data inside is different. MP should take XML element with Powershell script and it's working fine for a "slow" published events.
    I don't know why only the description data is the same . I tried to modify the script to NULL the $bag variable and $xmlMessage but without any luck.
    Any help will be appreciated
    I'm trying to build SYSLOG parser to visualize my data and eventually to do some reports.

    Still having a problem? Can you explain a little more what the issue is? Are you saying the event collection provider does not work correctly when there is a burst of events matching your criteria?
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • Generate event when stack changed

    I have a task develop a class Stack that generate event when you add new element ? Develop a class Stack is not a problem, what means event that apears when a new element is added ?[                                                                                                                                                                                                                                                                                                                                                                                               

    That about awt / swing ..or I can to apply listeners
    to My Stack ?Sorry, I thought there were also non-GUI examples there. Apparently not.
    It's probably the intention to implement the observer pattern into your code.
    Here's a small demo of how this can be done:import java.util.List;
    import java.util.ArrayList;
    class Main {
        public static void main(String[] args) {
            MagazinePublisher publisher = new MagazinePublisher();
            Subscriber carl = new Subscriber("Carl");
            Subscriber pete = new Subscriber("Pete");
            Subscriber zeke = new Subscriber("Zeke");
            publisher.registerObservers(carl);
            publisher.registerObservers(pete);
            // whenever the state of the 'publisher' changes, it's
            // subscribers should be notified
            publisher.notifyObservers();
            publisher.registerObservers(zeke);
            publisher.notifyObservers();
            publisher.removeObservers(pete);
            publisher.removeObservers(carl);
            publisher.notifyObservers();
    interface MyObserver {
        void update(int edition);
    interface MySubject {
        void registerObservers(MyObserver mo);
        void removeObservers(MyObserver mo);
        void notifyObservers();
    class MagazinePublisher implements MySubject {
        List<MyObserver> observers;
        int edition;
        public MagazinePublisher() {
            observers = new ArrayList<MyObserver>();
            edition = 1;
        public void notifyObservers() {
            for(MyObserver mo : observers) {
                mo.update(edition);
            edition++;
        public void registerObservers(MyObserver mo) {
            observers.add(mo);
        public void removeObservers(MyObserver mo) {
            observers.remove(mo);
    class Subscriber implements MyObserver {
        String name;
        public Subscriber(String n) {
            name = n;
        public boolean equals(Object o) {
            return this.name.equals(((Subscriber)o).name);
        public void update(int e) {
            System.out.println(name+" recieved a copy of the "+e+" edition!");
        // hashCode() and other methods ...
    }Details about this design pattern:
    http://en.wikipedia.org/wiki/Observer_pattern
    or Google, of course:
    http://www.google.com/search?hl=en&q=Observer+pattern&btnG=Google+Search
    Good luck!

Maybe you are looking for

  • Main Viewer Window does not display correctly

    Ever since I upgraded to Aperture 3.3 through 3.4.1, the main viewer window does not display correctly.  Everything is justified to the right of the screen.  When viewing images, the are not in teh center, they are over to the right.  I can't even se

  • Calender year quarter

    dear all, i would like to get year quater from my 0fiscper... is there anyway to do that?

  • Automatically generate awr in html/text format

    Hi, I am going to be part of a poc that will take a week. I would like to generate AUTOMATICALLY an AWR for each and every hour in this poc without the need to execute manualy: sqlplus / as sysdba @?/rdbms/admin/awrrpt.sql Enter value for report_type

  • PDF Template - Is Looping Possible

    Hi, I am trying to create a PDF template - i am using the eBusiness suite release 12, RUP4. I have created many RTF templates before that use loops, however the loops do not seem to work in a PDF template. Does anyone know whether looping in PDF temp

  • TIME MACHINE UNABLE TO BACK UP AS NOT ENOUGH SPACE

    I keep trying to  back up my Macbook Pro (I have a Buffalo hard drive) but on time machine is says that there is not enough space to complete the back up