Triggering events from event queue

Can anyone tell me if events triggered FROM the event queue execute immediatly before returning to the place where the trigger occured (as it seems to when I follow the code in the debugger).
for example in my code I am:
1) capturing a tab change event so I'm on the AWT event queue.
2) calling stopcellediting() on a table which eventually triggers a losefocus event on a control within the table.
3) the program flow seems to go straight to the focuslost event before returning to process the rest of tab change event.
is this behaviour reliable? or is it just a timing coincidence?
thanks in advance.

This behaviour is reliable.
All the code that executes these events is performed in the same thread, so it has no means to do something in parallel.
SwingUtilities.invokeLater method does provide an ability to postpone execution of some code but inside Swing package it is used mainly for paint related tasks (for example the painting of the focus change will most likely occur only after the rest of tab change event processing will be executed).

Similar Messages

  • Receiving events from event hub was blocked.

    In our Cloud Service project, we have 2 instances for work role (deploy to Azure), the work role is consume events from the EventHub using EventProcessorHost(host name is RoleInstance name).
    For sending events:
        var
    client = EventHubClient.CreateFromConnectionString(serviceBusConnectionString,
    hubName);
    while (true)
    var eventData =
    new
    EventData(Encoding.UTF8.GetBytes("test"))
    {PartitionKey = "key"};
                        eventData.Properties.Add("time",
    DateTime.UtcNow);
                    client.SendAsync(eventData).Wait();
                    Thread.Sleep(50);
    Each 50ms, we send one event (event1, 2,3 …….);
    For receiving data:    
     public
    async
    Task ProcessEventsAsync(PartitionContext
    context, IEnumerable<EventData>
    events)
                //when
    we get the event, so we can view the log
    Trace.WriteLine(“got events”);
    foreach (var
    eventData in events)
                    // handle the event
    Task.Delay(12000).Wait();
    await ContextCheckpointAsync(context);
    We add the
    delay for event operation.
    It seems that we cannot receive data in time from the log, seems event6 was blocked for the Event5 delay, after the 12ms, we can receive event6 from the EventHub, and the Event6
    delay is 40s(from the log, we send event6 to Hub at 35:10, but we get from Hub at 35:50),
    So I wonder to know the maximum number of threads are working on processing fot the EventProcessorHost? Depends on the Partitions?
    And is there any way to receiving events in time?

    Hi Jordan
    Since Task.Delay call blocks the callback, host won't hand over new events until you're done with the current batch. This is due to order guarantee of the events delivered, i.e. host should process the events in order from the same partition.
    If event process is taking so long then you should consider to move process job into a separate thread so host can deliver new batch of events while thread is working on the previous batch.

  • Delete Event from Event Library?

    I want to delete an "event" from library - it will never be used. Is there a simple way? (clips from within it have already been deleted)

    It just seems crazy to have it in both places.  Thanks so much for your help!
    It Is NOT in both places, please try to grasp this, it will save you from problems later!!!
    Try this, in a room with 4 windows is a vase, look through any window and you'll see it. Take the vase out through one of the windows and you will not be able to see it through any window.
    You have 1 copy of the picture, no matter how many albums you look at it with.

  • Listing possible events from event source (or DLL)

    Does anyone know of a replacement for MOM 2005 resource kit tool mpwizard, which could dig out what sort of events COULD be written to event viewer logs. Not interested about a tool that could parse the existing event logs, but specifically one that is capable
    of listing what could be created by DLL's that write into event viewer.
    http://technet.microsoft.com/en-us/library/cc180050.aspx
    http://blogs.technet.com/b/kevinholman/archive/2009/02/16/how-to-find-all-possible-event-id-s-for-a-given-event-source.aspx
    If there's no replacement, how about someone digging it from their secret stash of nice tools, I didn't find it anymore
    from my stash.
    Thanks for thoughts and ideas!
    MCT | MCSE | MCITP | MCTS SCOM, SCCM, SCVMM, SCDPM | Open CITS

    Hi,
    Based on my research, MP Event Analyzer tool is designed to help a user with functional and exploratory testing and debugging of event based management pack workflows like rules and monitors.
    The tool is in System Center Operation Manager 2007 Administration Resource Kit.
    Please go through the below link for more details:
    http://blogs.technet.com/b/momteam/archive/2011/06/03/system-center-operations-manager-2007-r2-admin-reskit-released.aspx
    Management Pack Wizard is used to create a custom Management Pack for your MOM environment. If we have SCOM 2007 R2 installed then with the operational manager console, we can use Authoring workspace to custom managed packs, and we can also export MP to
    xml and then modify it by editing the xml file.
    Regards,
    Yan Li
    Regards, Yan Li

  • Error while deleting events from the integration event queue

    I am trying to delete all the events from the integration event queue after reading it, like this (this is in Java):
            IntegrationEventWS_DeleteEvents_Input input = new IntegrationEventWS_DeleteEvents_Input();
            input.setDateTime("");
            input.setLastEventId("");
            try {
                 ((Default_Binding_IntegrationEventWS)onDemandStub).deleteEvents(input);
            } catch (Exception e) {
                 log.error("Deleting events from integration queue failed: ", e);
            }Alas, I get the following error message:
    Invalid method parameter(s): 'File Id'(SBL-ODS-50007)What does this mean? What is this mysterious "File Id" it supposedly gets? I don't see it anywhere in the SOAP message I'm sending and it isn't mentioned anywhere in the docs.
    Thanks in advance for any input.

    Dont keep this attributes null
    input.setDateTime(""); //Put a Default Time way in
    the past. Ex:"1/1/2000"
    input.setLastEventId(""); //pass the eventIdThe documentation states that those two are optional (although they are not nillable, for some reason). I tried to set the date to today, but I got the same result. Since setting a date is supposed to delete all events older than that date, I don't think setting it in the past will delete anything.

  • Triggering background job event from Unix script

    Hi all,
      I am having one question regarding triggering of background job in SAP using Events from Unix script. Is this possible? If so, can anyboy provide some sample code related to Unix script and how do we communicate to SAP from Unix system. Actually, here the backend of R/3 system is MSSQL. I am having a program in R/3 system which is scheduled as a background job based upon event trigger. I want to trigger that even from the unix script.
      Appreciate for your help in advance.
    Thanks,
    Adithya K

    Hi,
    Check if this can help you
    http://help.sap.com/saphelp_sm32/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/content.htm
    Regards,
    Atish

  • Object does not match target type when raising an event from c# to VB6

    I have a c# .net DLL that I use from a VB6 app. It exposes an event,
    and the VB6 app is sinking it.
    The VB6 app is receiving the event, as long as it is raised from the
    main thread of the .net DLL.
    I have an aync task being handled inside the DLL (delegate BeginInvoke). Any
    attempt to raise the event from within that thread casuses the reported
    error, even from within the AsyncCallback function, when the thread is ending.
    I noticed that the delegate for the event is not declared inside the
    interface. It's in that module, but above the interface definition:
        [ComVisible(false)]
        public delegate void LoggingEventHandler( string logData );
    The event is declared in the class itself as:
        public class Processor : _Processor
            public event LoggingEventHandler        LogNotification;
    Finally, to raise the event:
    if ( this.Completed != null )
        this.Completed( true );
    If I open the tlb with OLEVIEW, I can see the public event just fine. Of course, I expected to, as it's working up until the helper thread kicks in.
    Now for the REAL WIERD PART! This DOES work on several servers that have
    been in production for months. It's just this one server that it won't work
    on. Same code. Resinstalled/registered it 1,000 times. It took me a while to
    find that an error was even occuring, since it was being raised in the
    seperate thread. In other words, I'm receiving the event just fine on a series of servers. This is a new machine we're trying to bring online. I suspect it's environmental, but I can't figure it out.
    I don't understand why the publisher would be expecting a certain type of
    subscriber in the first place... unless the error is really triggered by the client when the event reaches it. I've put logging into the client, though, and the first line of code inside the event is not being executed.
    For the VB6 app, I reference the tlb file that is automatically created when
    I compile (Interop is checked). I unregistered and re-registered the tlb on
    the server. I regasm'd the dll itself. All dlls are in the same folder - not
    in the GAC.
    The stack trace is as follows:
       at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
    invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
    culture, String[] namedParameters)
       at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
    Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
    CultureInfo culture, String[] namedParameters)
       at System.RuntimeType.ForwardCallToInvokeMember(String memberName,
    BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
    msgData)
       at HPFS.Queue.IProcessorEvents.LogNotification(String logData))

    This is driving me nuts!
    I sure would appreciate any suggestions.
    I got this working on one of the two machines. The other machine had some other issues, so I had it re-imaged. It's been so long since I fixed the first one, that I can't remember exactly how I did it. Plus, I did so many things to it over two weeks, that I never really felt confident, anyway. But ... I could *swear* that the last thing I did back then to get this event to flow was to re-register the DLL's TLB.
    So ... This is win 2k with FW 1.1 + SP1.
    Completed is the delagate I'm trying to invoke.
    this.Completed.Target.GetType().Name = "__comobject"
    I've tried everything. Unregistered the .tlb. Unregistered the .net DLL. Verified that the app completely failed while unregistered. Created the TLB using RegAsm /tlb syntax.
    I tried using CLR SPY. It registers nothing. It only lets me pick an EXE. This is a DLL tring to raise to an EXE.
    I've looked at the TLB in OLE VIEW and I just don't know what I'm looking at.
    Is there any other tool or technique I can use to audit/monitor/trap this? .net is giving me *** for details about what's failing. I wish I could somehow debug into exactly what it's trying to do and get more details on the failure.
    Here's the error I'm getting:
    (Code -1) Object does not match target type.<Source:mscorlib>(Stack:    at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
       at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
       at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
       at HPFS.Queue.IProcessorEvents.Completed(Boolean success)
       at HPFS.Queue.Processor.RequestDone())
    Processor = the DLL I'm trying to raise the event from.
    IProcessor = the event interface that's exposed through COM.

  • Standard PO workflow giving error due to Release coe is not getting passed from event

    Hi Team,
    I am getting the below error while processing the Standard workflow for PO.
    I think its due to the Release code is not getting passed from Event to workflow.
    Can you please sugest from where the release code is getting fetched before triggering the event.
    Error processing following event linkage:
    BUS2012 RELEASESTEPCREATED WS20000075
    Following error occurred:
    SWF_RUN 594
    Message text:
    Import container contains errors (are any obligatory elements missing?)
    Event container appended as attachment.
    Event linkage not changed.
    Event stored temporarily.
    Events can be redelivered via event queue
    administration (transaction SWEQADM)

    Hi 
    Please check threads, response by Fernando Carames, ( Jul 19, 2007 2:37 PM): http://scn.sap.com/thread/483005
    Or by Trevor Ticehurst  on Oct 9, 2008 3:39 PM at:  http://scn.sap.com/thread/1080411
    OR
    http://www.sapfans.com/forums/viewtopic.php?f=26&t=297786
    All these mention certian notes which may be helpful.
    However, it is important to first ensure that the release startegy is configured and working properly (check with your MM con)
    regards,
    Modak

  • How to trigger events from inside an event to another event-stru​cture

    Hello,
    i have two event-structures (struct1 and struct2) which are running at the same time parallel in a loop.
    Currently there is an keydown-event in struct1, so when i press an ok-button then the corresponding event executes in struct1.
    struct2 is used to execute menu-entries from a custom runtime-menue.
    What i want to do is to select a menue-entry (which executes an event in struct2) and the from inside this event i want to trigger an event in struct1 (means simulate keypress ? ).
    Is this possible?
    Thanks for the help
    Solved!
    Go to Solution.

    If I read this problem correctly, you are essentially trying to do the same thing from different events in different event structures.  This type of problem is very common in UI based programs, since you often want to have the same action triggered by multiple events (e.g. button press, menu selection, keyboard shortcut).  You may wish to consider a change in your basic architecture.  Instead of splitting your code into two event structure loops, try splitting it into an event structure loop and a task handling loop.  The event structure only processes events.  At each event, it generates one or more tasks, which are passed to the task loop via queue.  Traditionally, the task data would be an enum for the task name and a variant for the task data.  You can find a discussion of this type of design here.
    For new designs, I would recommend a task object (use LabVIEW classes).  The task data type is the parent task object.  The actual tasks will be child objects.  This simplifies your top-level code quite a bit and makes it easily extensible without changing the top-level code.
    If you need more information, let us know.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Subtype event not triggering and supertype event triggers twice!!!!!!

    Hi,
    We have created a subtype for object bus2030 and also an event created for that. My workflow should trigger whenever an inquiry is created.
    I've maintained this as triggering event in SWDD and done type linkage is SWE2 and everything looks fine.
    When i simulate or create event the WF is triggered but when create inquiry in VA11 WF does not triggers.
    I've checked SWEL for event trace but no event is triggered at all... Am i missing something... I've done almost everything that i used to do...
    Even synchronized buffer!!! nothing paid me a solution...
    Infact the same was working with 3.1i system but after migration to ECC6 we had to create new WF template for the same Process.
    Now I also see that the supertype bus2030-created event is triggered twice but, obviously no receiver type exists. But the zbus2030 event is not being triggered at all!!!!
    Kindly help me understanding my mistake...
    Regards,
    PB

    Hope you have already set the deletegation in SWO6.
    Now, event dont get triggered automatically, jus because they are defined in object. They have to be explicitly published in thesystem.
    Check for a suitable user exit in your transaction, which makes use of function module to create the event, from that you know how to proceed.
    If you dont find user exit, try other triggering techniques such as change documents, logistics, BTEs... etc.
    regards,
    Sandeep Josyula

  • Calling Portal event from ABAP class

    Hi Experts,
    I need a following clarificatrion, Please help,
    1. Is it possible to call a webdynpro method from a normal ABAP class?
    2. If no, we need a functionality of a class 'CL_WDR_HTTP_EXT_MIME_HANDLER' having method 'DO_DOMAIN_RELAX_HTML'.
    Is there any alternative method which can be used in ABAP having the same functionality.
    3. Is there any ways with which we can call portal event from ABAP class?
    Thanks,
    Shabir

    >1. Is it possible to call a webdynpro method from a normal ABAP class?
    I wouldn't necessarily recommend this approach. You shouldn't try to trigger events or any of the standard WDDO* methods from outside the WD Component itself.  That said, you can pass the object reference (like the WD_COMP_CONTROLLER object reference or the View Object Reference) into methods of normal classes.  Be careful if you are finding yourself calling a lot of your added methods from outside WD.  This is probably a sign that these methods should be in the Assistance Class or some other Class functioning as a Model Object.
    >2. If no, we need a functionality of a class 'CL_WDR_HTTP_EXT_MIME_HANDLER' having method 'DO_DOMAIN_RELAX_HTML'.
    Is there any alternative method which can be used in ABAP having the same functionality.
    What exactly do you want to do here?  Do you just want to get the relaxation script?  For what purpose?  You should never need to inject the relaxation script into WDA. 
    >3. Is there any ways with which we can call portal event from ABAP class?
    To what purpose.  Do you just want to delegate the triggering of the event that is inside WD Component to be called from a class?  If so you can pass the portal API object reference into a class from the WD Component.  However this only works while running within WD.
    How is this class used?  Are you running in WD?  Are you trying to generate some HTML code that runs in the portal independent of WD?

  • Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY- ERROR EVENT_RAISED - Error updating the process object

    Hi All
    I have set up a simple custom HCM process and Form regarding Infotype TO CREATE AND CHANGE POSITION. I have checked the process and form consistency and it seems fine. Now when I run the process from HRASR_DT it generates a process number but it also gives an error workflow could not start.I get following error (SWIA log - Step history)
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Exception occurred - Error when starting work item 000000007031
    PROCESS_NODE - Error when processing node '0000000014' (ParForEach index 000000)
    CREATE - Error when creating a component of type 'Step'
    CREATE_WIM_HANDLE - Error when creating a work item
    CREATE_VIA_WFM - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event CREATED and (target) status
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY->ERROR
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Executing flow work item - Work item 000000007031: Object FLOWITEM method EXECUTE cannot be executed
    Executing flow work item - Error when processing node '0000000014' (ParForEach index 000000)
    Points to be noted:
    1) I have searched few SAP notes such as 1384961(Notes for 6.0.4) but our system is in higher level patch 6.0.5
    2) WF-BATCH have SAP_NEW and SAP_ALL authorization.
    Appreciate your valuable suggestions.
    Thanks
    Ragav

    Hi Ragav
    did you try to debug this? maybe something is missing in config of P&F?
    Since you are on 605, the following note would be there in your system....use it to debug:
    1422496 - Debugging background workflow tasks in HCM P&F
    This will help you find the root cause.
    regards,
    modak

  • Passing value from event to workflow container

    Hi experts,
    I have triggered a workflow using SAP_WAPI_CREATE_EVENT fm. I have declared 3 parameters in the BO for the event. Similarly i have created the 3 parameters in workflow container to receive the values.When the user clicks a button i trigger the workflow using the fm. I have to pass values of these 3 parameters to 3 parameters of the workflow container. Can you please tell me how should i pass the value from event to workflow container. Is there any way i can set workflow container parameter values while calling the fm itself.

    INPUT_CONTAINER     LIKE     SWR_CONT     Input container (name-value pairs)
    The above tables parameter is used to transfer the values from FM to workflow.
    declare a internal table of type SWR_CONT
    DATA:
    lt_cont TYPE STANDARD TABLE OF swr_cont,
    ls_cont TYPE swr_cont.
    ls_cont-element = 'ELEMENT NAME 1'.
    ls_cont-value = <Variable which holds the value>
    APPEND ls_cont TO lt_cont.
    ls_cont-element = 'ELEMENT NAME 2'.
    ls_cont-value = <Variable  which holds the value>
    APPEND ls_cont TO lt_cont.
    ls_cont-element = 'ELEMENT NAME 3'.
    ls_cont-value = <Variable  which holds the value>
    APPEND ls_cont TO lt_cont.
    pass lt_cont to the parameter INPUT_CONTAINER

  • Device event from within a semantic event

    Is there a way through which, in an event listener for a Java semantic event, we could get basic
    properties informations on the raw physical event from the device, e.g. mouse, that had triggered
    the semantic event?
    I know Component#getMousePosition() is usable but it only gives current (x, y) coords of
    the mouse. It seems we have nothing else.
    TIA.

    Is there a way through which, in an event listener for a Java semantic event, we could get basic
    properties informations on the raw physical event from the device, e.g. mouse, that had triggered
    the semantic event?
    I know Component#getMousePosition() is usable but it only gives current (x, y) coords of
    the mouse. It seems we have nothing else.
    TIA.

  • Raise an event from do_prepare_output

    Hi All,
    I have a requirement where I need to raise an event after having defaulted a value in a dropdownlist field.
    I'm working on component BT120H_CPL/NewComplEF.
    Here I have to default a value in the field REFOBJECTTYPE (context node NEWCOMPL). This is not a problem, I actually managed to write my logic in the do_prepare_output.
    My problem is that upon selecting a value for this field the event ONREFOBJECTTYPE is executed, unfortunately if I default a value the server_event 'select' is not triggered and the sub-screen ExtRefItemEL is not called.
    Do you know how to push/simulate an event from do_prepare_output in order to call the sub-screen immediately?
    Thanks in advance
    Paolo

    Hi Paolo,
    You can call the event handler ONREFOBJECTTYPE
    from do_prepare-output by calling
       CALL METHOD me->eh_ONREFOBJECTTYPE
    *  EXPORTING
    *    htmlb_event    =
    *    htmlb_event_ex =   .
    please try and tel me know.
    Regards,
    Taity

Maybe you are looking for