Question bay

Question bay

faouzane_atte
Explorer Explorer
228 Views
2 Replies
Message 1 of 3

Question bay

faouzane_atte
Explorer
Explorer

Question please

My logic is the following: I have a set of pallets that I prepare and I need to store them in the same bay of a flow storage system until the bay capacity is reached. Once the bay is full, I move to another empty bay. These pallets all belong to the same truck.

However, I deposit the pallets one by one. So when I perform the first Find Slot, I want to find a slot in a bay that is either empty or already contains one or more pallets from the same truck.

After this first Find Slot, I need to assign a label to the bay. Then, for the second Find Slot, I first want to check whether a bay assigned to this truck already exists and still has available capacity. If yes, I continue storing pallets in the same bay. If not, I search for a new empty bay with no truck assigned.

What is the simplest way to implement this logic in Process Flow, and how should I do it?

0 Likes
229 Views
2 Replies
Replies (2)
Message 2 of 3

FelixMoehlmann
Collaborator
Collaborator

The Find Slot activity allows you to add multiple queries that are run from top to bottom. When a slot is found further queries are ignored.

The first query looks for a slot that has already been assigned to the truck. If no such slot is found, the second query searches for one that has no truck assigned at all. If the second query is successful, set the label on all slots that belong to that same bay in the "On Success" trigger.

 

Screenshot 2026-02-20 151647.png

 

You later need to clear the slot labels again when all slots in the bay are empty. On "On Slot Exit" trigger of the rack is well suited for this. You can loop over all slots in the bay and if all are empty, reset their labels.

if(slot.slotItems.length == 0 || (slot.slotItems.length == 1 && slot.slotItems[1].item == item))
{
	// Last item in slot -> check other slots for items
	Storage.Bay bay = slot.bay;
	Storage.Level lvl;
	Storage.Slot curSlot;
	int allEmpty = 1;
	for(int l = 1; l <= bay.levels.length && allEmpty; l++)
	{
		lvl = bay.levels[l];
		for(int s = 1; s <= lvl.slots.length; s++)
		{
			curSlot = lvl.slots[s];
			if(curSlot.slotItems.length > 0 && (curSlot == slot))
			{
				allEmpty = 0;
				break;
			}
		}
	}
	
	if(allEmpty)
	{
		// Reset slot label
		bay.setSlotLabels("OrderID", 0);
	}
}

 

Message 3 of 3

faouzane_atte
Explorer
Explorer

Thank you ! That solved my issue! Thanks again for your response. 

0 Likes