Sepasoft MES Module Suite
queue.MODE_AUTO()
Overview
Returns the canonical string token for Auto batch logic mode. Pass this value to setMode (or compare against mode values from batch UI / parameters) instead of hard-coding "Auto" so scripts stay aligned with the batch runtime’s mode vocabulary. Auto is the default run mode for procedure, unit procedure, and operation logic when a batch starts; in this mode the recipe advances automatically and transition expressions are evaluated normally.
Syntax
Python |
system.mes.batch.queue.MODE_AUTO() |
Return Value
Type | Description |
|---|---|
String | The mode identifier "Auto" (the friendly name for BatchModeTypes.AUTO). |
Scope / Availability
Registered on the system.mes.batch.queue script module (Sepasoft Batch / MES).
Gateway: Available where the batch queue script module is hosted.
Designer / Client: Same API; behavior matches other system.mes.batch.queue.* calls (RPC to the gateway that owns the queue / batch, including Enterprise routing where applicable).
Excluded / Edge Cases
This function only returns the mode string; it does not change batch state. Pass the result into setMode to apply the mode to running batch logic.
Prefer MODE_AUTO() over the literal "Auto" so scripts follow the supported constant pattern documented for the mode parameter on setMode.
setMode accepts only Procedure, Unit Procedure, or Operation paths—not step or parameter paths. If path is omitted, the procedure root (/{}) is used.
The queue entry must be active (its execution controller loaded on the gateway) when calling setMode. An unrecognized mode string raises IllegalArgumentException.
Auto mode does not enable manual-only APIs. Functions such as executeStep and changeActiveStep require the parent logic to be in Manual mode (MODE_MANUAL()).
While logic is in Auto mode, transition steps evaluate their expressions and can fire when true. In Semi-Auto or Manual mode, transitions do not auto-fire unless explicitly skipped (for example via skipTransition).
Example Usage
Minimal example
Python |
mode = system.mes.batch.queue.MODE_AUTO() |
Complex example
Python |
entry = system.mes.batch.queue.getEntry("BATCH-2026-0042") # Return a unit procedure to Auto after manual intervention system.mes.batch.queue.setMode( entry, system.mes.batch.queue.MODE_AUTO(), path="/{}/Mix_Unit_Procedure", changedBy="operatorScreen" ) |
Related Functions
system.mes.batch.queue.setMode(batchQueueEntryOrBatchID, mode, path, changedBy) — Sets run mode on procedure, unit procedure, or operation logic; use MODE_AUTO() for the mode argument.
system.mes.batch.queue.MODE_SEMI_AUTO() — Returns "Semi-Auto"; transitions do not auto-fire unless skipped.
system.mes.batch.queue.MODE_MANUAL() — Returns "Manual"; required for executeStep, changeActiveStep, and other manual execution workflows.
system.mes.batch.queue.executeStep(batchQueueEntryOrBatchID, path, changedBy) — Manually executes a step; parent logic must be in Manual mode, not Auto.
system.mes.batch.queue.skipTransition(batchQueueEntryOrBatchID, path, changedBy) — Forces a transition to pass when logic is not in Auto mode.
system.mes.batch.queue.getParameterValue(batchQueueEntryOrBatchID, path) — Read the Mode parameter on logic or steps for display or conditional script logic.
Sepasoft MES Module Suite