Timer how to send information from the main session to timer session (Unresolved)

Timer how to send information from the main session to timer session (Unresolved)

  

I have a case where i want to upload excel, and the uploaded excel is run by a Timer. The excel belongs to the user that is login, so i want to pass the userid to the Timer action, but always returns 0 as they are different session. My question is how to send information to the timer so that they know that i want to process only the excell belongs to the current user? (there are many users that can upload xls file)



thank you, regards,

indra

Hello,

If I understood right, It's not possible to accomplish what you need with Timers, because they don't hold a session. They're supposed to run assyncronously on the server without any client interation.

Do you really need the upload to be processed assyncronously? You can accomplish this by using BPT, or implementing a more elaborated approach, for example, recording in a control table the users logged in the system, and making the timer consume this table...

Thank you Sir. Here what i do:

- i upload xls to a table and save username to the table also.

Once the excel file uploaded, i launch a timer to extract the xls to a table. Unfortunately i have no idea how to tell the timer action whose xls file to extract to a table as they are different sessions.

Regards; ib

Solution

It's not possible really. Timers are supposed to run assyncronously.

Why don't you call an action once the file is uploaded? Is it too heavy?

Solution

João Melo wrote:

It's not possible really. Timers are supposed to run assyncronously.

Why don't you call an action once the file is uploaded? Is it too heavy?

the records is about 3000 rows and by asynchronous the user do not have to wait..is it correct? 

Tq


Yes, it's correct, the user doesn't have to wait, but you cannot pass any parameter through a timer.

Try to use BPT... ;)

Ok tq Sir.. can you summarize what good is bpt compared to timer? Maybe i can start from your information to start read the bpt..

Well, BPT is assyncronous, as timers are. But you can define when they start, or which event can trigger them.

For example, you can tell the system: whenever a new records comes to the table X, start process A.

In your case: Whenever the user uploads a file (and you can record it in a DB table), start the process "Import file"

Ok thank you very much