question

Marcin S5 avatar image
0 Likes"
Marcin S5 asked Felix Möhlmann commented

Use of the Sink only when all necesarry objects are collected.

boxes.png

Hello,

As described in the picture above, I am asking you for advice on the easiest way to make objects go to Sink only when collecting 33 boxes on the queue (not earlier). In addition, that could happen only at certain times (e.g. 10:00:00, 14:00:00, 18:00:00 [3 times, 33 boxes each]. Thank you in advance for your help.


queuessinkspecific time
boxes.png (550.0 KiB)
5 |100000

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

Felix Möhlmann avatar image
2 Likes"
Felix Möhlmann answered Felix Möhlmann commented

The queue object has a built in batch function, that prevents it from releasing items until the specified number is reached.

1642578136685.png

To have this happen at specific times I would suggest to use a process flow. An event triggered source listens to the "On End Collecting" event on the queue, meaning a batch has reached the required number of items. The token created by this source then waits until a different token, responsible for the timing, enters a specific activity in the process flow which happens at the times you want to release items. A simple loop with delay activities can be used to control the "timing token".

1642578322023.png

ReleaseBatchTiming.fsm


· 2
5 |100000

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

Many thanks Felix, that was really helpful! Just one more question, can you please advise is it possible to add a Schedule, that storage of boxes on the Queue starts only at specific times? In such a way that boxes are not transported to Queue until these specific times.

I mean it should works same as the "On arrival" function in the Source:

example.png

Many thanks in advance!

0 Likes 0 ·
example.png (9.8 KiB)

If you are using port connections to move the items into the queue then you can close the input on the queue on model start and whenever a batch is collected. A schedule source in process flow can create tokens at the wanted times which open the input again.

ReleaseBatchTiming_1.fsm

1 Like 1 ·
Krzysztof J avatar image
0 Likes"
Krzysztof J answered

On the queue select "Perform Batching", then "Target Batch Size" equal 33.

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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