In the documentation of the Process Queue module, it says:
"Off course you’ll want to retrieve the object for which you’ve created an queuedAction, the best way to do this is create an association from your object to the QueuedAction entity. This can either be a reference(set) with the default owner or the owner both, but try to prevent to add an association from QueuedAction to your entity. You should minimize the changes to this module.
In the microflow you’ve configured in the queue there should be an QueuedAction input parameter, using this parameter you can retrieve your object. In the folder: “Example / Test” you will found an example how to queue an action.”
Note how this differs from Austin’s answer: you associate your own entity TO the QueuedAction entity, instead of the other way around. This mean you haven’t changed the Process Queue module, which means you can later upgrade it without problems.
You can add associations to the QueuedAction entity. When setting up your queue you can set the association to the object that you need in your microflow and commit it. When the microflow runs, you can retrieve your object over association from the Queued action and then go on with your microflow.
Hope this helps!
Great thanks to Austin and Rom! I can now pass parameters into a mocroflow that will be called to do a queue process! :)
Now I’m looking into an strange memory issue:
The first time I ran all the Qs, almost no memory increase, but seems like there were a few Qs didn’t finish . After I made some tiny changes on a few log messages, the memory starts to increase for around 1.5G. (Solving the memory issue was the reason I looked into using the Mendix Queue)
Maybe this is another issue I need to resolve, but at least the passing params works! :)
Many thanks again for your great help.
I assumed before that after the completion of a Queue execution, the memory used by that Queue should be automatically released. Currently I created one “InitializeQueue” then added all Queues into it. Maybe I missed something like release the Queue’s memory after complete?