Raising An Event

Hi,
How can i raise an event from one thread, that will be handled by another thread?
Thnx in advance.

Can you be more specific about what type of event you want to raise?
In general it's possible using a queue like:
public synchronized void enqueue() {
   //place the item on the queue
   notify();
public synchronized Object dequeue() {
   do {
     Object first = pop();
     if (first == null) wait();
    } while (first == null);
}

Similar Messages

  • Unable to raise button Event in BlackBerry Emulator

    Hi All,
    I've created a WebDynpro Application which invokes a BAPI on click of a button(or Link to Action). This Application s running fine on IE.
    I wanted t port this on a Blackberry device. I'm testing on a BlackBerry emulator. The first view is getting displayed properly, but I'm unable to click the Button which is displayed.
    How to raise this event on the BlackBerry Emulator?
    Thanks and regards
    RK

    Hi,
    Thanks for looking at my post.
    @Heidi: I had already gone thru the link.
    @Stefanie: I am using BlackBerry Emulator for model 7520/7920. There is no wheel(I guess I didn't understand you properly). Yes I clicked on enter button.
    I'm a bit confused with the Button. In manual they said that the property 'Design' is ignored for Mobile Devices and at the same time they say if the Design is emphasized then you will get a softkey. I tried with Design Standard(which is default) and also Emphasized. I dont see any Softkey. I really don't know how a softkey looks like. I guess there will be a extra icon or button on the screen. But I don't see any.
    Thanks and regards
    RK

  • The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    Hi,
    Can any one help me on the below issue ?
    while executing automated test case in test center it is showing as test case is in progress, then i navigated to virtual machine (where the test agent is online), there Internet
    explore has opened automatically and my test case execution started, but with in a seconds IE has closed . However, in test center, test case status is showing as in
    progress, after  2 or 3 min  some of  test cases getting passed and some are failed.
    Here my question is in lab center-->virtual machine, IE has opened automatically and navigated the 2 or 3  links and with in seconds IE has getting closed. Why IE is getting closed without completing execution?
    Error Message :
    The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the
    installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event: 
    (mtm.exe, PID 5240, Thread 4) FileAggregatorSessionInfo: Error occurred while deleting temporary directoryException: System.IO.DirectoryNotFoundException: Could not find a part of the path 
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
       at Microsoft.VisualStudio.TestTools.Execution.Aggregation.FileAggregator.FileAggregatorSessionInfo.DeleteTemporaryDirectory(String temporaryDirectory)
    the message resource is present but the message is not found in the string/message table
    Thanks
    Suresh
    Suresh

    Hi,
    Can any one help me on the below issue ?
    while executing automated test case in test center it is showing as test case is in progress, then i navigated to virtual machine (where the test agent is online), there Internet
    explore has opened automatically and my test case execution started, but with in a seconds IE has closed . However, in test center, test case status is showing as in
    progress, after  2 or 3 min  some of  test cases getting passed and some are failed.
    Here my question is in lab center-->virtual machine, IE has opened automatically and navigated the 2 or 3  links and with in seconds IE has getting closed. Why IE is getting closed without completing execution?
    Error Message :
    The description for Event ID 0
    from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event: 
    (mtm.exe, PID 5240, Thread 4) FileAggregatorSessionInfo: Error occurred while deleting temporary directoryException: System.IO.DirectoryNotFoundException:
    Could not find a part of the path 
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
       at Microsoft.VisualStudio.TestTools.Execution.Aggregation.FileAggregator.FileAggregatorSessionInfo.DeleteTemporaryDirectory(String
    temporaryDirectory)
    the message resource is present but the message is not found in the string/message table
    We are using VS 2013 (premium) and IE 10.0,  scripts have been created on the same versions. It is working fine  on
    developers command prompt but the same tests are getting failed in lab center test agent machine
    test agent log:
    QTAgentService.exe, AgentService: calling AgentObject.RunEndFileCopyComplete
    QTAgentService.exe, AgentProcessManager.WaitForDataCollectionAgentProcessToStart: waiting for agents to start.
    QTAgentService.exe, AgentProcessManager.WaitForDataCollectionAgentProcessToStart: Agents started.
    QTAgentService.exe, AgentProcessManager.PerformActionIgnoringExceptions: Successfully called 'Cleanup' on the test agent
    QTAgentService.exe, AgentProcessManager.PerformActionIgnoringExceptions: Calling 'StopDataCollection(int)' on the data collection agent
    QTAgentService.exe, AgentProcessManager.IsDataCollectionAgentNeeded: IsExecutedOutOfProc? True
    QTAgentService.exe, AgentPro
    QTAgentService.exe, AgentProcessManager.WaitForDataCollectionAgentProcessToStart: Agents started.
    QTAgentService.exe, AgentService: Connection to controller is up.
    Thanks
    Suresh

  • 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.

  • Raise an Event in Redwood after a Commit to an External Oracle DB?

    Hello Netweaver Community / Redwood specific,
    I am at customer site and have been presented with the following scenario and subsequent question...
    The scenario is that there is a 3rd party product (powerBuilder program / windows executable) that is updating an Oracle database on a server outside of the SAP landscape.  This PB program is writing records to the oracle db that need to be picked up by XI process.  The idea is that after the PB program makes its COMMIT of the records, then the XI process needs to be triggered to start so it can pick up the records.
    So the question is...  How can an event be raised in Redwood after a COMMIT of records has been made to this oracle DB that is on a server outside of the SAP landscape?
    I am familiar with (and we are already doing) the raising of an event in Redwood from an ABAP program with function module that raises external events.
    This is what I know - please do not hesitate to ask for further clarification.
    Thank you,
    Dean Atteberry.

    Carol,
    Sorry for the delay! I am not that frequent to SAP forums. You can write to me on my mail if you have something important. We can always update forum note for everyone.
    I do not know XI that well. But If I understand correctly, you can trigger events in it based on arrival of a file. You can create a dummy job in Redwood on Unix or any filesystem you use to create a zero byte file once Powerbuilder job is ready.
    Let me know if this helps!
    - Bhushan

  • ECC6.0 WebDynpro(ABAP) - raising terminating event

    Hi, in ECC6.0 I have a custom WDA application with a custom workflow.  The workflow is launched via an event that is raised in the WDA application.  However, at one point workflow sends a link to one of the WDA pages, whereby the user clicks a button which raises what should be a terminating event for the workflow task.  However, while this event is raised, as confirmed in SWEL, it doesn't terminate the task.  The event is raised through a WDA assistance class.  The object type, event and object key are all being set properly during the raising of the event.  Viewing the event in SWEL confirms the proper setting of the key fields.  So why isn't the step terminating?
    Thanks in advance,
    Kevin

    Hi,
    If the object that is waiting for event has no instance, the task will not be terminated when the event is created in the system (As I said). So now the reason is clear for you.
    >The event is raised through a WDA assistance class
    I am not sure what you mean by this. You raise the event from the WDA assistance class? Or you raise an event for the assistance class? (Or perhaps both?).
    If you raise the event for the assistance class, you should have an instance of that class in the workflow container (which you would then bind from workflow container to the task container). So, now the question is: do you have an instance of the assistance class in the WF container (when you look it from log)? Or is it initial also?
    Actually I don't really even understand how you have managed to combine the WDA assistance class and WF class? How do you actually start the workflow (with which kind of event)? Whatever event it is, it should most likely instantiate some class/object in the workflow. Then in your problematic task you should most likely use this same class in the terminating event (unless there is something really fancy in your workflow).
    Regards,
    Karri

  • Raise an event when an idoc invoice (INVOIC02) gets created in error

    Hi All,
    I’m trying to generate an email message from an output invoice when processed incorrectly.
    I created a subtype of IDOCINVOIC, updated the linkage table using swe2  but the events are not raised when I go to re-issue my invoice output.
    I know it’s possible to raise these events in idoc invoice exit ZXEDFU02 but  the status is not created at this stage.
    Is it possible to raise an event when an idoc invoice gets created in error?
    King Regards
    Ann

    @CoolDadTX -That's because I've written com servers in the past using VB.net, however they were not registered with the Running object table.
     What I'm trying to do in this case is have an application that will be started by the user, and then they will start another application written in .Net to connect to that first application.  The reason for this is that we have an application
    written in an old version of smalltalk that doesn't seem to support getObject but can create an IUknown, and we already have base classes to attach to COM objects written in .Net.  As this new application needs to be started first it can't be tightly
    coupled to the legacy application, so we are trying to register the new application and then connect a Dotnet Client that is being started through a  COM Interface from the legacy application.  I know it's convoluted but we need to keep the legacy
    application alive for a bit longer while we rewrite it as an add-in for the new application.
    The article that you linked to has been very helpful on the server side, but do you have any ideas as to how I can connect the sink on the client side in C#?

  • How do we raise an event into R/3 from a BW info-package ?

    Hi friends,
    Is there a way to raise an event from a BW stand-along info-package into the R/3 system, without using Event Collector..?
    I cannot use the subsequent event option in the package itself since that will raise the event only into BW. I want it into R/3. I can probably raise an event from the package to start a process-chain and then add a step in the PC to run a pgm to raise an event into R/3.
    But I am trying to see if there is a better and simpler way without having to create a extra PC.
    I am on the BW 3.1 system.
    Any suggestions/solutions will be greatly appreciated.
    Thanks
    lz70d71

    hi, here is what you do: This addition is with respect to the previous reply
    You need an event from BW to R/3
    Step1: create a custom FM copy of BP_EVENT_RAISE  and making it rfc enable. To make a FM RFC enabled you just need to tick the radio button in the attributes of the FM.
    Step2: Create a custome z program in BW and call FM z_bp_event_raise created in ECC.
    Step3: call that program in Process chain.
    hope this helps. if you need more let me know.
    thanks
    syed

  • New feature in SP5: Closing a popup window raises an event

    I'm trying to use this new feature that came in SP5, "Popup Enhancement - Closing a popup window raises an event to the containing iView".  Can anyone give me an example of how this works?  In the configure element for the popup, there is a new field called, 'Closure Event'.  I though by adding by event to this new field, that the event will be raised after closing the popup window, but it didn't.  What am I doing wrong?

    Hi,
    you should add an end-point to the popup and/or use the "Close" action.
    there's a difference between when closing the popup implicitly or explicitly

  • How to raise an event from a program

    Hi,
    I am creating a workflow for HR, the person will request a basic pay change than, this will start the workflow. For this i am making a screen from where i need to triger the event for the workflow.
    Does anybody has any idea? of how to raise an event from a program. or has anybody worked on a scenario like this
    Khusro Habib

    You can also use the FM SAP_WAPI_CREATE_EVENT which is a little newer I think. (I don't have access to a system today so that may not be the exact name of the FM but if you search SE37 under SAPWAPIEVENT* you should find it.
    the parameters will be the event name, and the object key.  The object key will be the key field of the workflow object you are using. 
    For example if you were using the saled document object then the object key would be the sales document number.  Carefull how you enter the object key, it can be a little tricky on whether or not you need the leading zeros in the input parameter. 
    Hope this helps.
    Brent

  • Registering classes to raise noncustom events in ActionScript 3

    I'm using ActionScript 3 in Flash Professional and I'd like my class to raise an event, not a custom event but an existing one. I've set up my class so that it extends EventDispatcher. In the documentation http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/EventDispa tcher.html the example declares a custom event by adding a static String variable:
    class CustomDispatcher extends EventDispatcher {
            public static var ACTION:String = "action";
    I assume that enables:
    dispatcher.addEventListener(CustomDispatcher.ACTION, actionHandler);
    or at least auto-complete when you've typed 'dispatcher.addEventListener(' into the Flash Professional IDE.
    But lots of classes that raise events raise a mixture of existing noncustom events. For example if you have an instance of a flash.netFileReference and type
    fileRef.addEventListener(
    a long list of potential events to listen for is given including DataEvent.UPLOAD_COMPLETE_DATA, Event.SELECT, HTTPStatusEvent.HTTP_STATUS, SecurityErrorEvent.SECURITY_ERROR, etc.
    If I want my class to be registered to raise those existing events, what code do I need? Preferably so that the IDE knows instances of my class may raise the event and suggests them in the addEventListener auto-complete/intellisense list.
    (PS I hope it is OK to cross-post; I've asked this on StackOverflow too. I'll update either thread with a pointer to the answer.)

    Laurent answered over on StackOverflow:
    To make the events show up in the intellisense, you need to register them using the Event metatag:
    [Event(name="eventName", type="package.eventType")]
    Add this just before the classes that dispatches this event.

  • HRMD_A IDoc in error not raising an event

    I have workflows enabled for IDocs in error.
    If an inbound order IDoc (ORDERS) arrives in status 51, it triggers a workflow.
    If an HR master data IDoc (message type HRMD_A) arrives in status 51, no workflow is triggered.
    Here is what I have checked:
    Partner profile has me as responsible agent in both cases.
    Both type linkages are active for IDOCHRMD and IDOCORDERS event InputErrorOccurred.
    Both IDocs types are posted in with the test tool and end up in status 51.
    When I investigate the event trace, I can see that an event is raised for the ORDERS IDoc but not for the HRMD_A IDoc.
    There are no errors in the type linkage status column.
    So why would it be that the event is not being raised for the HRMD_A IDoc?
    How can I find out what should be raising the event? I guess that there is a function module call to SWE_EVENT_CREATE or SAP_WAPI_CREATE_EVENT.
    Kind Regards,
    Tony.

    Hi Tony,
    I am a complete novice to workflow but I have a requirement liek yours to trigger workflow for idocs in error, so I was hoping you could point me in the direction of some documentation/steps on how to do this?

  • Raise an event with no arguments

    In VB.net I can declare and raise an event like this
    Public Event SomeEvent()
    Public Sub SomeMethod
    RaiseEvent SomeEvent()
    End Sub
    I need to work out how to do this in c# however all of the examples of raising events include event handlers.  This won't work for me as I am raising this event over a COM interface, and so I can't send eventargs or non basic types through the interface
    to the client application.

    OK, Action doesn't work as I end up with the following error
    An exception of type 'System.InvalidCastException' occurred in AdtakerInterfaceSampleCsharp.exe but was not handled in user code
    Additional information: Unable to cast object of type 'System.__ComObject' to type 'System.Action'.
    You asked how to raise an event with no arguments in C# and I gave you the solution for this. You could certainly use an Action to raise an event with no arguments as my sample code clearly demonstrates.
    How to call your specific COM interface is a totally different topic.
    Please start a new thread if you have a new question. You may also want to provide some more details if you want anyone to be able to help you with this. Remember that the forums are for helping solving specific issues though, they are not for anyone to
    write an entire application, class or module for you :)

  • 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

  • Raise an event

    Hi,
    I created in SWO1 transaction an objectype, ZPPBUS2018, subtype of object BUS2018. My object has a method, ZPP_MONTAR_ROTOR and an event, MONTAR_ROTOR.
    I implemented the transference of data ifrom container to method in PFTC_INS transaction.
    I want raise the event in a user-exit when it create a transfer order. The problem is that this object is not in CDHDR.
    I'm using the function SWE_EVENT_CREATE_FOR_UPD_TASK. The parameters are:
        EXPORTING
          objtype                       = 'ZPPBUS2018'
          objkey                        = l_objkey
          event                         = l_event
          creator                       = l_creator
          TAKE_WORKITEM_REQUESTER       = 'X'
          START_WITH_DELAY              = 'X'
    where l_objkey is a string: concatenate lgnum ltap (key fields of object)
             l_event is 'MONTAR_ROTOR'
             l_creator sy-uname
    Somebody has some idea, please?
    Thanks and regards.

    Hi,
    I've created an event and not raise.
    Thanks and regards

  • RAISING AN EVENT WHEN DATABASE TABLE UPDATES

    hi all,
             i want to raise an event when database table updates.For eg : if a price of a material has been changed then i have to raise an event and run the abap program in back ground.i know transaction SM62 to create event, i dont know about transaction SM64. please give me the procedure how to solve this problem. i dont know work flow. please give me a sample code how to raise event.
    thanka and regards
    suresh

    Hi Suresh
    It is important to understand that the SAP architecture abstracts the database from the application.
    I think that you should look for ways that the application triggers an event when an update has taken place, rather than the DB.
    Two ways of doing this that spring to mind are change pointers (for the ALE interface, see menu SALE) and Business Transaction Events (various things including CRM integration, see menu FIBF).
    The latter works very well for sending prices to CRM when they change. I am more familiar with this than ALE so I will discuss it.
    If you go to menu FIBF and then follow menu path Environment -> Info System (P/S), and then run the report for event 00503301, you can find documentation and a sample function module that you can copy.
    Once you register your new function module in the event tables then it will be called when prices are changed.
    Cheers
    Dom

Maybe you are looking for

  • SSRS 2008 R2: How to add Border to Parent Column group only in Tablix?

    Hi there, I have a report where there is a Parent and Child group on columns.  I want to add a left/right border to just the Parent Group (Fiscal Period) with no border between the Child grouping (Fiscal Weeks).  How can I do this?  I have found expr

  • How can I create a template of a Data Flow Task in SSDT?

    The majority of the Data Flow Tasks that I build have the same five elements in them (OLE DB Source, Conditional Split, Derived Column, Data Conversion, and OLE DB Destination).  I'd love to have a template of a Data Flow Task which already contains

  • How can I get itunes to sync my iPhone contacts with outlook?

    Contacts doesn't appear among videos, music and tv shows under device and when I request sync, itunes doesn't sync my contacts or internet preferences from my notebook.

  • Sending LOB to procedure

    Is there any possibility how to send BLOB parameter to PL/SQL procedure from OCI The following PL/SQL code is working connect test_user1/test_user1; drop table test_tab; create table test_tab (f1 integer, f2 blob); create or replace procedure test_bl

  • ERROR# 27101: Share Realm does not exist

    When evere my database server reboots, then on connecting to oracl server this message is recieved Err# ? : Oracle not available Err# 27101: Share Realm does not exist how could i remove this problem