system.mes.batch.queue.getEntryLinks(pageNumber, pageSize, searchPattern)

Sepasoft MES Module Suite

system.mes.batch.queue.getEntryLinks(pageNumber, pageSize, searchPattern)

Return a list of links that represent batch control recipe objects. When batches are added to the queue, a batch control recipe is created from the batch master recipe. Paging is supported by providing the page number and page size and should be used when a large number of queue entries.

getEntryLinks(pageNumber, pageSize, searchPattern) → List

Syntax

getEntryLinks(pageNumber, pageSize, searchPattern)

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 based the page number by. If paging is not required, set this parameter to a value greater than the number of batch queue entries that will ever be in the system. For example: 2147483647

String searchPattern - An optional batch ID search pattern to filter the return results by. It can contain * and ? wildcard characters. Example: Mixing *

Returns

A list of MESObjectLink objects. Links are lightweight and hold the key information of an MES Object and link.getMESObject() can be used to get the actual object.

Scope

All

Binding EBR Viewer to a Dropdown Menu

Warning

Scripting function queue.getEntryLinks() is available in versions:

3.81.5 SP5 Stable and later

3.81.6 RC2 Release Candidate and later

This script bound to a dropdown menu provides the ability to select a batch for EBR on a Perspective View during runtime.

Python
def transform(self, value, quality, timestamp):
	"""
	Transform the incoming value and return a result.

	Arguments:
		self: A reference to the component this binding is configured on.
		value: The incoming value from the binding or the previous transform.
		quality: The quality code of the incoming value.
		timestamp: The timestamp of the incoming value as a java.util.Date
	"""
	list = system.mes.batch.queue.getEntryLinks(1, 20, None)
	finalList = []
	for i in range(len(list)):
		#finalList.append({'value':list[i],'label':list[i]})
		batchID = list[i].getMESObject().getBatchID()
		finalList.append({'value':batchID,'label':batchID})
	return finalList

Sepasoft MES Module Suite