system.mes.batch.unit.getAllocationList(pageNumber, pageSize, searchPattern, includeAllocation, includeWaiting)

Sepasoft MES Module Suite

Description

Return a snapshot list of the current active allocations and waiting allocations. Paging is supported by providing the page number and page size and should be used when a large number of allocations.

getAllocationList(pageNumber, pageSize, searchPattern, includeAllocation, includeWaiting) → List

Syntax

getAllocationList(pageNumber, pageSize, searchPattern, includeAllocation, includeWaiting)

  • Parameters

 int pageNumber - The page number to include in the return results. If paging is not required, set this parameter to 0.

int pageSize - The page size to base the page number by. If paging is not required, set this parameter to a value greater than the number of units that will ever be in the system. For example: 2147483647

String searchPattern - A case-insensitive search pattern to filter the return results. This string must be contained in the object name. An empty string will apply no filtering.

boolean includeAllocation - If True, the results will include active allocations.

boolean includeWaiting - If True, the results will include waiting allocation requests.


  • Returns

 A list of BatchAllocationRequest objects.

  • Scope

All

Scripting Example

Code
system.mes.batch.unit.getAllocationList(0, 100, '', True, True)
Code
>>> 
[Batch ID: 101b, Requested Unit: Enterprise\El Dorado Hills\Packaging Area\Chocolate Production\White Chocolate, Priority: 1, Requested At: Wed Dec 07 13:29:44 PST 2022, Allocated At: Wed Dec 07 13:29:44 PST 2022, Allocated Unit: Enterprise\El Dorado Hills\Packaging Area\Chocolate Production\White Chocolate, Batch ID: 101b, Requested Unit Class: My Unit Class, Priority: 50, Requested At: Wed Dec 07 13:29:43 PST 2022, Allocated At: , Allocated Unit: ]
>>>

Sepasoft MES Module Suite