My goal is to have a batch queue table where I can create a number of task entries with an associated (named) server action that will be executed on chosen date/times.

My though is to have a number of timers per server, that would take the first qualified task-record and execute the corresponding server action by its name, but it seems to me (new to OS) that I can't call a server action by name (string)?

Is there a way to do it or any alternative ways to have a more dynamic batch processing engine?

Hi Mikkel,

It is indeed not possible to call a Server Action (or any other Action) using a Text for its name. However, taking one step back, it seems to me you want something that I'd say is not something you should want :). A given task should have its own Timer, so that the logging, time-out etc. only refers to the specific task, instead of having some generic mechanism that is a single Timer that does it all. If you want people to be able to schedule tasks, let them schedule Timers instead. There is, for example, the TimerHandling Forge component that you could use.

Hi,

It is possible to call a server actions by name using the following Forge component:

https://www.outsystems.com/forge/component-overview/3283/action-reflection

If you  should use it is something to first should good think about. You loose impact analysis capabilities,and as such error proun. Also this implementation expects all actions to be called to have the same contract (input/output parameters).

Regards,

Daniel

Thank you for the feedback!

We could end up with many different tasks (multiplied by 150+ "companies") in the solution, so I'm not sure having a timer for each is feasible.

The Action Reflection component sounds like the solution for us, but I'm a little concerned about the future support for this - is that normaly a concern with forge components?


Hi Mikkel,

The way the component works is using Reflection which is a .NET feature.

So this is not an undocumented OutSystems feature it is standard Microsoft .NET functionality. So I would not worry to much about that.

I personally think that losing impact analysis (where used) and the fact that wrong names will generated production errors a higher concern. But you can make a better judgement ans weight the cost against the benefits.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Mikkel,

The way the component works is using Reflection which is a .NET feature.

So this is not an undocumented OutSystems feature it is standard Microsoft .NET functionality. So I would not worry to much about that.

I personally think that losing impact analysis (where used) and the fact that wrong names will generated production errors a higher concern. But you can make a better judgement ans weight the cost against the benefits.

Regards,

Daniel

Thank you, Daniël!

I'm much less concerned now :)
And I will take your advice on the potential problems into considerations.

Br
-Mikkel


Hi,


Might I add the security implications as well and don't forget people calling actions which they should not be allowed (hidden dependencies)


J. wrote:

Hi,


Might I add the security implications as well and don't forget people calling actions which they should not be allowed (hidden dependencies)


Good point, thanks.