Retreive background task microflow parameters from QueuedTask JobScheduler functionality

0
Hi, We are running several tasks in the background using the job scheduler (https://www.mendix.com/blog/mendix-9-spotlight-task-queue/). 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?
asked
1 answers
0

See the documentation here: https://docs.mendix.com/refguide/task-queue#context

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.
Regards,
Ronald

 

answered