AfterStartup Microflow

0
Hi, I've got a microflow in my afterstartup microflow that counts and updates tasks everyday after login but because it uses the default UTC time, the counts only get updated after 10:00am brisbane time (which is 12:00am UTC time) . How do i get the  microflow to run in my local time and not the default UTC time.
asked
3 answers
0

This depends on how you do your retrieve or count. For example in xpath you can use differen function for local and UTC time. i.e: '[%BeginOfCurrentDayUTC%]' and '[%BeginOfCurrentDay%]'

See also this FAQ from Mendix on DateTime handling: https://docs.mendix.com/refguide/datetime-handling-faq

answered
0

When, how/by who is this microflow invoked?

When a microflow is triggered as AfterStartup microflow, this microflow is only executed after (re)starting the application. And thus will only run once. Not when a user logs in. Also, the AfterStartUp microflow runs in the context of the app/server. Not in the context of a specific user. This is the reason why you have an offset in DateTime values triggering it manually and as AfterStartUp.

If you want that the tasks are updated each day, then are 2 options (among many others). 

  1. Run a scheduled event each day, which handles all tasks  and set the correct dates/times
  2. Replace the Home page by a microflow, which executes the task updates once. 

 

In both cases, Hold the DateTime handling in to account, as Maarten mentioned!

 

answered
0

When using a scheduled event (which I think you are or should be using) the timezone config can be set through Project Setting > Runtime > Scheduled event time zone.

answered