Can Mendix Queue accept parameter(s)?

0
Hi Mendix Queue experts, I’m new to Mendix Queue and have got my first testing Queue working with NO input parameter.  I plan to put a microflow (with a few input parameters) into a Queue execution, just wonder can Mendix Queue accept parameter(s)? Seems like I can only provide the called microflow’s name as a string when creating a Queue Job and there is no place to pass in parameters? I tried a few times but couldn’t find a way to pass a parameter into the called microflow… Any hint or suggestions will be very much appreciated. Richard
asked
4 answers
2

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.

answered
0

Hi Richard,

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!

answered
0

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.

Richard 

answered
0

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?

 

Richard

answered