Pull multiple items (milkrun type model)

Pull multiple items (milkrun type model)

xavi_aguirre
Not applicable
45 Views
2 Replies
Message 1 of 3

Pull multiple items (milkrun type model)

xavi_aguirre
Not applicable
rampla-2.fsm

Hi all,

I'm trying to model a milkrun type delivery of materials, where a platform will travel to multiple locations and drop different kinds of materials.

I "joined" a queue with a task executer to create the travelling platform and I'm pushing the contents into a list. At every location node, the idea is to trigger a pull with a message to drop the specific items.

So far I have made it to drop 1 item of it's type at each location, but I would like to ask if anyone can help me in how to configure the Pull query to make it drop "N" units of itemtype 1, "X" units of itemtype 2, etc...

0 Likes
Accepted solutions (1)
46 Views
2 Replies
Replies (2)
Message 2 of 3

jeff_nordgren
Not applicable
Accepted solution

@Xavi Aguirre,

Attached is your model with the changes that I made. I added a label call "NumToPull' to both Queue10 and Queue2. And I changed the OnMessage code in both of those queues. To modify the number of items to put in the queue, all you would have to do is set that label sometime before calling the OnMessage trigger. Hope that will get you to a place where you can apply it for your needs.

rampla-2-jn1.fsm

Message 3 of 3

xavi_aguirre1
Not applicable

Thank you very much @Jeff Nordgren. I modified it a bit, since it seems that the combo taskexecuter+queue was generating 2 messages on arrival to the node and pulling twice as many items as the label value. With limiting the number of message to the value of the itemsToPull label, It is working now! Thanks

0 Likes