See also Variables in bulk actions for more information on using bulk actions with variables.
This method is likely to produce a lot of tasks that are relatively short-lived. There is a cleanup task in midPoint that deletes old closed tasks. However, the default setting may cause tasks to stay around for too long.
Therefore there is now a
cleanupAfterCompletion task property that can be used for finer control over the cleanup. This property can be set explicitly to force task cleanup after a specific interval.