question

gilbert jerald avatar image
0 Likes"
gilbert jerald asked Joerg Vogel commented

How to send item to queue using operator by matching the item type ?

Hi,

I want to send the item to four different queue's based on match item type using operator. I have used match item type in send to the port field but it's not working properly when I use an operator to transport the item. I have attached the model for your reference. send-item-by-matching-the-item-type.fsm

Thank you in advance for your valuable answer.

matching itemtypes transporter
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered Joerg Vogel commented
@gilbert jerald

The way that queues work, is that when a flowitem enters a queue, it is immediately ready to leave. This causes the Send To Port code to fire. Because you are using an Operator to transport the flowitems, when flowitems come into the queue, the operator has not yet dropped off any previous flowitems so it get confused as to where flowitems are in the queues. It's a timing thing because of the time it takes the operator to drop off a flowitem. During that time, lots of flowitems enter the queue and are ready to leave and where they are to go is calculated based on what is in the download queues when then enter the upstream queue.

Here is how I would "manage" that. In the attached model, I put a second queue after the Source, or rather a another queue between the Source and Queue1. Then I only allow 1 flowitem into Queue1 at a time, closing the input port on entry into the queue. Then in the downstream queues, when a flowitem enters, I re-open the input port of Queue1. Then the logic on Queue1 will work because the flowitems are in the downstream queues when the Send To Port code is executed in Queue1.

I hope all of that made some sense? Take a look at the attached mode. If you have any questions or problems, please let us know.

Thanks.

send-item-by-matching-the-item-type-jn1-v1714.fsm


· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.