Retreive background task microflow parameters from QueuedTask JobScheduler functionality

Hi, We are running several tasks in the background using the job scheduler ( It would be very helpfull to be able to retreive some information on the queued microflow. For example the user who triggerd the task or parameters that have been passed to the microflow for analysing the problem but also to inform the user that the task has finished.  If checked the objects ProcessedQueueTask and QueuedTask but there doesnt seems to be a refference. Does anyone know how to solve this problem?
1 answers

See the documentation here:

Look at the 2.7 part:


2.7 Execution Context

Prior to Mendix 9.6 tasks were always executed in a sudo context, even if the scheduling microflow had Apply entity access set to true (see Microflow Properties for more information). As of Mendix 9.6 this behavior has been deprecated and tasks now run in an equivalent context to the one in which they were scheduled. This has the following effect:

    When a user is logged in, the task will be executed in a new context for the same named user. This context will be the same as if the user is logged in.
    When no user is logged in, the task will be executed in a new anonymous context. This context will be for a new anonymous user with the same language and timezone as the original user.
    When a system session is used to schedule the task (using the Java API), the task will be executed in a new system context.

This means that you do know now what user it is. Because you now have a currentuser object to use.