Sepasoft MES Module Suite
getParameterOptions(...)
Returns selectable options for a searchable batch sub-parameter on a queue entry, identified either by a BatchQueueEntry or by batch ID. The returned options are MESObjectLink objects, such as material lots, equipment, material classes, manifests, or enum definitions, filtered by the current sibling sub-parameter values where applicable.
Syntax
Python |
system.mes.batch.queue.getParameterOptions(batchQueueEntry, path) system.mes.batch.queue.getParameterOptions(batchQueueEntry, path, searchString) system.mes.batch.queue.getParameterOptions(batchQueueEntry, path, searchString, maxResults) system.mes.batch.queue.getParameterOptions(batchID, path) system.mes.batch.queue.getParameterOptions(batchID, path, searchString) system.mes.batch.queue.getParameterOptions(batchID, path, searchString, maxResults) |
Parameters
Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
batchQueueEntry | BatchQueueEntry | Required (one overload) | — | Queue entry whose batch sub-parameter options should be listed. Must refer to a valid batch queue entry. |
batchID | String | Required (one overload) | — | Batch ID string for the queue entry whose batch sub-parameter options should be listed. |
path | String | Required | — | Full path to a searchable batch sub-parameter. See Location / Paths. |
searchString | String | Optional | "" | Filters returned option names to values containing this text. |
maxResults | Integer | Optional | 100 | Maximum number of options to return. Use caution with large values because returning unnecessary options can degrade performance. |
Return Value
Type | Description |
|---|---|
**List** | Links representing valid options for the requested sub-parameter. For enum-backed options, the list contains a single Enum Definition link; the associated enum definition contains the selectable values. |
Location / Paths
Paths follow the /Procedure/Unit_Procedure/Operation:Step.Parameter.Sub-parameter pattern. The procedure segment may be abbreviated as {}.
Examples:
/{}:Step.Parameter.Sub-parameter
/{}/Unit_Procedure:Step.Parameter.Sub-parameter
/{}/Unit_Procedure/Operation:Step.Parameter.Sub-parameter
/{}/Mix:Add_Flour.My_Material.Lot_No
The final segment must be a recognized searchable sub-parameter, not the parent parameter itself.
Supported Option Types
Sub-parameter category | Returned options |
|---|---|
Material lot number | Material Lot links, filtered by related sibling values such as lot equipment class, lot equipment, material class, material name, manifest class, manifest, and lot status. |
Material lot equipment | Equipment links, filtered by material lot equipment class. |
Material lot equipment class / Supplemental equipment class | Equipment class links. |
Material lot manifest | Manifest links, filtered by material lot manifest class. |
Material lot manifest class | Manifest class links. |
Material class | Material class links. |
Material name | Material links, filtered by material class. |
Material lot status / Material UOM | Enum Definition links for lot status or lot UOM. |
Supplemental equipment name | Supplemental equipment links, filtered by supplemental equipment class. |
Supplemental equipment status / Supplemental UOM | Enum Definition links for equipment status or equipment UOM. |
Scope / Availability
Registered on system.mes.batch.queue (Sepasoft Batch / MES).
Gateway: Executes against the batch execution manager.
Designer / Client: Delegates to the connected gateway through the production RPC proxy.
Excluded / Edge Cases
MES runtime — The MES system must be started before options can be resolved.
Unsupported parameter — If path does not end in a sub-parameter, or the sub-parameter does not support searchable options, the call raises OperationNotSupportedException.
Unknown sub-parameter — If the final sub-parameter name is not recognized, the call raises NoSuchElementException.
Missing control logic — If the batch or path cannot be resolved to control logic, the call fails with an exception such as IllegalStateException.
Running vs idle batches — For running batches, options are resolved from the active execution controller. Otherwise, options are resolved from persisted batch control logic.
Enum-backed options — Enum values are not expanded into one link per option; the result contains the relevant Enum Definition link.
Example Usage
Minimal Example
Python |
entry = system.mes.batch.queue.getEntry("BATCH-001") options = system.mes.batch.queue.getParameterOptions( entry, "/{}/Mix:Add_Flour.My_Material.Lot_No" ) |
Complex Example
Python |
batchID = "BATCH-2026-0142" lotPath = "/{}/Mixing:Charge.Addition_Material.Lot_No" try: lotOptions = system.mes.batch.queue.getParameterOptions( batchID, lotPath, "LOT-2026", 25 ) for lotLink in lotOptions: system.util.getLogger("BatchOptions").info( "Available lot option: %s" % lotLink.getName() ) except Exception, ex: system.util.getLogger("BatchOptions").error( "Unable to load lot options for %s: %s" % (batchID, ex) ) |
Related Functions
system.mes.batch.queue.getParameterValue(batchQueueEntry, path) / (..., batchID, path) — Reads the current raw parameter value.
system.mes.batch.queue.getParameterValueAsString(batchQueueEntry, path) / (..., batchID, path) — Reads the current parameter value as a display string.
system.mes.batch.queue.setParameterValue(batchQueueEntry, path, value, changedBy) / (..., batchID, path, value, changedBy) — Writes a parameter value.
system.mes.batch.queue.getEntry(batchID) — Retrieves the BatchQueueEntry used with the object overload.
Sepasoft MES Module Suite