Hi
The Object or List which are used as context for task queue should be a committed persistable entity
The Task Queue Microflow/Java action should return no value.
Also check the below link for Task queue documentation.
https://docs.mendix.com/refguide/task-queue/
Hope it helps!!!