Sepasoft MES Module Suite
TransitionExpressionStatus Object
Overview
A Transition Expression Status is a read-only runtime snapshot of how a batch recipe transition expression is evaluating during batch execution. Transition expressions are the boolean conditions on SFC transitions (for example, parameter comparisons combined with AND/OR logic) that must become true before the batch engine can fire the transition.
TransitionExpressionStatus is not a persisted MES object. It is returned by system.mes.batch.queue.getTransitionStatus() and system.mes.batch.queue.getPendingTransitions(), and is also published on the gateway event bus so components such as Batch Recipe Monitor can show live expression results. You cannot create, modify, or save instances from scripts.
Obtaining a TransitionExpressionStatus
Query status for one transition, or list transitions that are still waiting to evaluate to true.
Python |
# Single transition — path includes the transition step name status = system.mes.batch.queue.getTransitionStatus( 'BATCH-042', '/{}/Mix:Ready Transition' ) # Same call using a BatchQueueEntry entry = system.mes.batch.queue.getEntry('BATCH-042') status = system.mes.batch.queue.getTransitionStatus( entry, '/{}/Mix:Ready Transition' ) # Pending transitions under a logic item — path is Procedure / Unit Procedure / Operation only pending = system.mes.batch.queue.getPendingTransitions('BATCH-042', '/{}/Mix') |
Path formats
|
Function |
Path pattern |
Example |
|
getTransitionStatus() |
/{Procedure}/{Unit Procedure}/{Operation}:{Transition} |
/{}/Mix:Ready Transition |
|
getPendingTransitions() |
/{Procedure}/{Unit Procedure}/{Operation} |
/{}/Mix |
Use {} as a placeholder for the procedure name when the batch runs under a single procedure context. Paths use friendly (human-readable) names; the gateway converts them internally to UUID-based paths.
Object Identity
|
Field |
Value |
|
Type name |
TransitionExpressionStatus |
|
Kind |
Runtime response object (not an AbstractMESObject) |
|
Required module |
Batch |
|
Persistence |
None — snapshot only; not stored in the MES database |
Properties
All properties are read-only. There are no setters and no save() method.
|
Property |
Access |
Type |
Description |
|
Batch ID |
getBatchID() |
String |
Batch ID of the executing queue entry. |
|
Item Path |
getItemPath() |
String |
Friendly path to the transition (procedure, unit procedure, operation, and transition name). |
|
Change Path |
getChangePath() |
BatchItemPath |
UUID-based path to the transition. Use segment accessors such as getProcedure(), getUnitProcedure(), getOperation(), and getStep() when you need structured path data. |
|
Expression |
getExpression() |
List of String |
Text of each comparison clause in the transition expression, in evaluation order. |
|
Status |
getStatus() |
List of Boolean |
Evaluated result for each clause. Parallel to Expression — index i in Status corresponds to index i in Expression. Values may be None when a clause has not yet been evaluated. |
|
Display Status |
getDisplayStatus() |
List of Boolean |
Whether each clause should be shown in operator UI. Parallel to Expression. Internal or hidden predicates may have False here even when Status has a value. |
|
Overall Status |
getOverallStatus() |
Boolean |
Combined result of the full expression. True when the transition condition is satisfied; False when it is not yet satisfied; None when evaluation has not completed or was reset (for example after a skip). |
|
Evaluation Skipped |
isEvaluationSkipped() |
Boolean |
True when the engine is reusing a previous evaluation instead of re-running the expression. When True, Expression may include a synthetic row (This expression was previously evaluated). |
Parallel arrays
getExpression(), getStatus(), and getDisplayStatus() always have the same length. Iterate them together to build a clause-by-clause view:
Python |
status = system.mes.batch.queue.getTransitionStatus( 'BATCH-042', '/{}/Mix:Ready Transition' ) if status is not None: for i in range(len(status.getExpression())): if status.getDisplayStatus()[i]: print(status.getExpression()[i], status.getStatus()[i]) print('Overall:', status.getOverallStatus()) |
When isEvaluationSkipped() is True, per-clause Status values reflect the cached overall result rather than live re-evaluation, and the UI typically hides individual clauses (getDisplayStatus() is False for those rows).
Scope / Availability
|
Context |
How to access |
|
Gateway scripts |
system.mes.batch.queue.getTransitionStatus() / getPendingTransitions() |
|
Client / Designer scripts |
Same module via RPC when registered on the gateway |
|
Perspective / engineering UI |
Batch Recipe Monitor subscribes to live TransitionExpressionStatus events on the gateway event bus |
Both lookup functions require an actively executing batch whose execution controller is running. If the batch is not running or the controller is inactive, getTransitionStatus() returns None and getPendingTransitions() returns an empty list.
Exceptions and Constraints
|
Situation |
Behavior |
|
Batch ID not found |
getTransitionStatus() / getPendingTransitions() raise an exception (via assertBatchIDExistsAndGet). |
|
Invalid or unknown transition path (controller active) |
getTransitionStatus() raises NoSuchElementException with message No expression for path …. |
|
Batch not executing / controller inactive |
getTransitionStatus() returns None; getPendingTransitions() returns []. |
|
getPendingTransitions() filter |
Returns transitions whose Overall Status is explicitly False and that are not in a previously-evaluated (skipped re-evaluation) state. Scope is limited to transitions under the procedure, unit procedure, and operation given in the path. |
|
Persistence |
Not applicable — objects are snapshots only. |
Example Usage
Minimal — check one transition
Python |
status = system.mes.batch.queue.getTransitionStatus( 'BATCH-042', '/{}/Fill:Level OK' ) if status is not None and status.getOverallStatus(): system.mes.batch.queue.executeStepCommand( 'BATCH-042', '/{}/Fill:Level OK', system.mes.batch.queue.COMMAND_START ) |
Complex — monitor pending transitions and log clause detail
Python |
batchID = 'BATCH-042' logicPath = '/{}/Crystallize/Cool Down' pending = system.mes.batch.queue.getPendingTransitions(batchID, logicPath) if not pending: system.util.getLogger('batch.monitor').info( 'No pending transitions under %s' % logicPath ) else: for transition in pending: logger = system.util.getLogger('batch.monitor') logger.info( 'Pending: %s (overall=%s, skippedEval=%s)' % ( transition.getItemPath(), transition.getOverallStatus(), transition.isEvaluationSkipped() ) ) for i in range(len(transition.getExpression())): if not transition.getDisplayStatus()[i]: continue logger.info( ' [%s] %s' % ( transition.getStatus()[i], transition.getExpression()[i] ) ) # Drill into one specific transition for operator display detail = system.mes.batch.queue.getTransitionStatus( batchID, '/{}/Crystallize/Cool Down:Temp Reached' ) if detail is not None: ready = detail.getOverallStatus() is True system.tag.writeBlocking(['[default]Batch/TransitionReady'], [ready]) |
Related Functions
|
Function |
Description |
|
system.mes.batch.queue.getTransitionStatus(batchID, path) |
Returns one TransitionExpressionStatus for the named transition. |
|
system.mes.batch.queue.getTransitionStatus(batchQueueEntry, path) |
Same as above using a BatchQueueEntry. |
|
system.mes.batch.queue.getPendingTransitions(batchID, path) |
Returns a collection of pending TransitionExpressionStatus objects under a logic path. |
|
system.mes.batch.queue.getPendingTransitions(batchQueueEntry, path) |
Same as above using a BatchQueueEntry. |
|
Load the queue entry when you already have a batch ID. |
|
|
Batch-level state (Idle, Running, etc.) — useful before querying transitions. |
Related Objects and Components
-
BatchQueueEntry — Queue entry handle; can be passed instead of a batch ID to transition status functions.
-
BatchItemPath — Type returned by getChangePath(); shared path utility for batch recipe locations.
- Batch Recipe Monitor — Perspective component that displays live transition expression results
Sepasoft MES Module Suite