cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple actions triggering at the same instance.

Former Member
0 Kudos

Hello ,

My web dynpro App has a View which has buttons and a timed trigger. The timed trigger simulates the functionality of a time out mechanism( session time out's produce an error message  and a redirect to the URL in the SICF settings causes some confusion among my users, hence developed my own custom time out functionality ).

The timed trigger has a static interval of say 10 minutes.

I get a run time error with the following description. "Too many action events in the Queue. Only one event can be placed in the Queue".

A brief info on the Dump.

    Termination occurred in the ABAP program "CL_WDR_EVENT_QUEUE============CP" -

     in "ADD_ACTION_EVENT".

    The main program was "SAPMHTTP ".

    In the source code you have the termination point in line 4

    of the (Include) program "CL_WDR_EVENT_QUEUE============CM005".

Source Code Extract

Line  SourceCde

    1 method add_action_event.

    2

    3   if me->action_event is not initial.

>>>>>     raise exception type cx_wdr_rt_exception

    5       exporting

    6         textid = cx_wdr_rt_exception=>too_many_action_events.

    7   endif.

    8   me->action_event = action_event.

    9

   10 endmethod.

Now, I believe that the root cause of the issue is that there is a second action which is being sent to the server when one action is being processed.

The situation arises when

1) User clicks on a button , a few milliseconds apart, the time out action is also triggered from the client. When the time out action event reaches the server, the server notices that the prev action was not completed and hence it throws the run time error.

2) The Vice versa too, when the time out and button get triggerd at the same instance.

Are there any options to solve this issue?.

Personally, I am not a fan of using the timed trigger ( my hands are also tied as I cannot write my Javascript code in a WD4A application ), but a situation has forced me to use it.  One instance of the application is deployed at a Kiosk which is creatng some issues.

Thanks in advance for any replies.

Thanks,

Venkat.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello All,

Thank you for your replies.  I did the following changes and it seems to be working fine as of now.

1. Changed the compatbaility settings in the browser.

2. Deactivated the Timer event in the action handler of the button ( This ,I am still not convinced if it did the trick ).

Thanks to all for your time and suggestions. Much appreciated.

Thanks,

Venkat.

former_member184578
Active Contributor
0 Kudos

Hi,

Create an attribute in Component controller ( say, gv_time_stamp ). Now in the Event handler method of Timed Trigger, set the current time to the attribute ( gv_timestamp )

In onAction of button, get the current time and read the time stamp ( from Comp Controller , gv_time_stamp ) and get the difference.

if ( current_time - gv_time_stamp ) = delay time of timed trigger.

* Use Wait or do your own action say display message

end if.

Perform action of Button

For 2nd case (vice versa ) do the same.. Take a flag in Comp controller, set the flag in the onAction of Button at the stat of method . In Event handler of Timed Trigger, read the flag, if it is set then use Wait and  at the End clear the flag.

Hope this helps u.,

Regards,

Kiran

Former Member
0 Kudos

Hello Kiran,

Thanks for your reply.

The issue is very Wierd. The dump happens even before the request reaches the action handler.

Here is the Call stack :

  13 METHOD       CL_WDR_EVENT_QUEUE============CP    CL_WDR_EVENT_QUEUE============CM005     4

     CL_WDR_EVENT_QUEUE=>ADD_ACTION_EVENT

  12 METHOD       CL_WDR_EVENT_QUEUE============CP    CL_WDR_EVENT_QUEUE============CM001    12

     CL_WDR_EVENT_QUEUE=>ADD_EVENT

  11 METHOD       /1WDA/L0STANDARD==============CP    /1WDA/L0STANDARD==============CCIMP  4844

     CL_BUTTON=>HANDLE_EVENT

  10 METHOD       CL_WDR_VIEW_ELEMENT_ADAPTER===CP    CL_WDR_VIEW_ELEMENT_ADAPTER===CM01L    72

     CL_WDR_VIEW_ELEMENT_ADAPTER=>DISPATCH_EVENT

   9 METHOD       CL_WDR_CLIENT_SSR=============CP    CL_WDR_CLIENT_SSR=============CM00R   117

     CL_WDR_CLIENT_SSR=>IF_WDR_CLIENT~GET_CLIENT_UPDATES

   8 METHOD       CL_WDR_MAIN_TASK==============CP    CL_WDR_MAIN_TASK==============CM00I    60

     CL_WDR_MAIN_TASK=>EXECUTE

   7 METHOD       CL_WDR_MAIN_TASK==============CP    CL_WDR_MAIN_TASK==============CM00U     6

     CL_WDR_MAIN_TASK=>IF_WDR_RUNTIME~EXECUTE

   6 METHOD       CL_WDR_CLIENT_ABSTRACT_HTTP===CP    CL_WDR_CLIENT_ABSTRACT_HTTP===CM01A   129

     CL_WDR_CLIENT_ABSTRACT_HTTP=>HANDLE_REQUEST

   5 METHOD       CL_WDR_MAIN_TASK==============CP    CL_WDR_MAIN_TASK==============CM010    78

     CL_WDR_MAIN_TASK=>_HANDLE_REQUEST

   4 METHOD       CL_WDR_MAIN_TASK==============CP    CL_WDR_MAIN_TASK==============CM00J    19

     CL_WDR_MAIN_TASK=>IF_HTTP_EXTENSION~HANDLE_REQUEST

   3 METHOD       CL_HTTP_SERVER================CP    CL_HTTP_SERVER================CM017   365

     CL_HTTP_SERVER=>EXECUTE_REQUEST_FROM_MEMORY

   2 FUNCTION     SAPLHTTP_RUNTIME                    LHTTP_RUNTIMEU02                      989

     HTTP_DISPATCH_REQUEST

   1 MODULE (PBO) SAPMHTTP                            SAPMHTTP                               13

     %_HTTP_START

As you can see, it stopped halfway through the request processing.

The Error occurs in such a situation;

A time out happens every 10 minutes .

Lets say they application was loaded at 09:59:56 AM.

At 10:09:47 an user clicks  a button to trigger an action. The action is still being processed .

At 10:09:56 before the Button action could be completed, the time out triggers its action. At this point the dump occurs, as the server reports there is already an action in the Queue.

I hope you get the situation now. I am not sure, that in the system generated Javascript, whether a Timed Trigger would be disabled when a request is sent preceding its time out execution.

I have to refresh this app every 10 minutes as it is positioned in a Kiosk ( Damn me,BSP BSP BSP ) and a session time out would not look good.

As you can see the error does not happen frequently, it is just a question of probability .That User who seems to wait for the time out t to expire and peforms the aciion .

Anyways,as a last resort I have tried to deactvate the timer until the duration of action execution in the Event handler of the Button. However I am not sure if that wil work.

Thanks,

Venkat.

former_member184578
Active Contributor
0 Kudos

Hi,

When the application is active ( when any actions are performing ) the time out will not occur. So, In the onAction of button Deactivate the timed trigger and at the end of method activate it again.

Regards,

Kiran

ramakrishnappa
Active Contributor
0 Kudos

Hi Venkat,

If there is any action on the application, modifyview( ) method gets called. Hence reset the timer interval.

So, if any action on application, the time out will never happen as time is reset.

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hello Venkat,

why don't to reset your timer after some action by some fix time.

Former Member
0 Kudos

Hello Chandra,

Thanks for your reply. But how would that  avoid the race condition?.

Thanks,

Venkat.

Message was edited by: Venkat Gowrishankar

Former Member
0 Kudos

I think when application is in inactive state then only timer start, otherwise it automatically reset after each action.