How Execute Async Action?

I need execute a action asynchronously. I have a custom audit action, but I need execute in a separeted Thread. How Can I do It? In other technologies this is a simple challenge :(
Depending on what you need you can do it with a timer.

If that isn't an option, you can probably create an extension to do it, but I'd say that will take a lot of work


A timer isn't a option for me. I think about create a Extension, but I dont know how do a call for a action outside my extension from inside my extension. Do you know how call a external action from a Extension?]


Thiago Burgo


What kind of external action?

Calling an action in an extension from inside an eSpace is easy, simply add the extension to the eSpace and it'll show up in the "references" section.

Or do you want to call an action in an eSpace from an extension? I've never actually tried it, but if you can get compiled assembly for the eSpace, you should be able to import it into a Visual Studio project. I know you can do this for at least some of the platform's own assemblies, for instance if you need to manipulate Record Lists inside an extension.


When a said "external action" I wanna mean "call an action in an eSpace from an extension", my extension Action will receive a kind of reference/name of action in eSpace for I can call from inside my Extension, you knows how to do this?
Hi Thiago,

Why does your audit need to run async? Is it that heavy?

It is not imposible to use theads in an extension ...but it is highly unrecomended. The application server has restrictions on the number of threads, so you will endup create problems on the requests being served.

If your problem is the database contention, try searching in the site for Custom Logging.
It provides a way to insert data asyncronously and in bulk to any espace entity.

João Rosado
I understand the problems with Threads in Extension, but I wanna assume that risks, your solution don't works for my problem. How can I call a Action in eSpace from my extension? With this I can create my own solution for my Auditing requisites.

Thank you.
Hi Thiago,

Sorry, I did not understand why you can't use a timer. You know you can create a timer with no schedule defined and then do a waketimer whenever you want, right?

Tiago Simões
Hi Thiago,

"How can I call a Action in eSpace from my extension?"
The answer is, you can't.

That's why we trying to understand your problem, to help on a better solution.
Why is the custom logging extension not an option?

João Rosado
This is a simple requirement. In my situation my action is a webservice call that mustn't lock the UI, so I want to call action in separate thread.