Hello Team,

                   Assume that there are two timers like A and B. if the condition is true A timer should be execute  if it is false B timer should be execute. Is it possible in outsystems. If yes, could you share the oml which am expected.


Regards,

Saravana

Hi Saravanan,

Each timer has a wake action, so in the true branch of the if you call the wake action for timer A, and in the false branch the wake action for timer B.

Regards,

Daniel

Hi Saravana Kumar Sivaraj,

May i know why you are creating two timer to achieve this?

You can create one timer, and inside the action of the timer you can write the logic like if the condition is true, run A timer's logic if false run B timer's logic.



Thanks

Rajendra Singh

Hi,

It's something like this that you want?




Rajendra koranga wrote:

Hi Saravana Kumar Sivaraj,

May i know why you are creating two timer to achieve this?

You can create one timer, and inside the action of the timer you can write the logic like if the condition is true, run A timer's logic if false run B timer's logic.



Thanks

Rajendra Singh

Hi Rajendra,

It's a valid solution, but, if we want to reuse that code in other place, that "If" inside the logic can be outside of context.  


Best regards,

Ricardo


Ricardo Pereira wrote:

Hi,

It's something like this that you want?




Rajendra koranga wrote:

Hi Saravana Kumar Sivaraj,

May i know why you are creating two timer to achieve this?

You can create one timer, and inside the action of the timer you can write the logic like if the condition is true, run A timer's logic if false run B timer's logic.



Thanks

Rajendra Singh

Hi Rajendra,

It's a valid solution, but, if we want to reuse that code in other place, that "If" inside the logic can be outside of context.  


Best regards,

Ricardo


Hi Recardo,

We can reuse these logic by creating public server action.


Thanks

Rajendra Singh




Rajendra koranga wrote:

Ricardo Pereira wrote:

Hi,

It's something like this that you want?




Rajendra koranga wrote:

Hi Saravana Kumar Sivaraj,

May i know why you are creating two timer to achieve this?

You can create one timer, and inside the action of the timer you can write the logic like if the condition is true, run A timer's logic if false run B timer's logic.



Thanks

Rajendra Singh

Hi Rajendra,

It's a valid solution, but, if we want to reuse that code in other place, that "If" inside the logic can be outside of context.  


Best regards,

Ricardo


Hi Recardo,

We can reuse these logic by creating public server action.


Thanks

Rajendra Singh




Hi Rajendra,

Yes, you can reuse it in public server action or in service action (in platform 11). That's not what I'm talking about.

If you put that if inside that action, it can be out of context in other usages. In this case, make sense, in others can not make. What I'm trying to say it's that need to be evaluated by the dev if make sense or not. I'm not saying that your idea it's a bad idea, just need to be adapted to the necessity. :)


Regards,

Ricardo


Hi Saravana,


I don't know the business case, but you could also create 2 timers and schedule them. Then the first action of each timer is to check wether it should do anything or not.


Regards,
Lennart