Sepasoft MES Module Suite
executeStepCommand(batchQueueEntry, path, command, changedBy)
Sends a batch command targeted at a single recipe step for an active batch queue entry. The runtime validates the step path, resolves the step for the running controller, and delivers a SET_STEP_COMMAND notification so the batch execution controller and equipment phase logic can apply the command (for example Hold, Reset, Stop) at that step. In MES 3.81.13 SP3, MES 4.83.3 SP3, and later, Abort is also accepted when the step’s current state allows it, the same rule as Stop and Hold. Abort applies only to that step and does not abort the parent batch. Use system.mes.batch.queue.COMMAND_* helpers for the command argument so the string matches the supported command vocabulary.
executeStepCommand(batchQueueEntry, path, command, changedBy) → void
Syntax
Python |
system.mes.batch.queue.executeStepCommand(batchQueueEntry, stepPath, command) system.mes.batch.queue.executeStepCommand(batchQueueEntry, stepPath, command, changedBy="operator") |
Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
batchQueueEntry | BatchQueueEntry | Required | The queue entry whose running batch controller should receive the command. |
stepPath | str | Required | Full path to the step in the batch recipe. Must follow /Procedure/Unit_Procedure/Operation:Step. You may use {} as the procedure placeholder, for example /{}/My_UP/My_Op:My_Step. |
command | str | Required | Command to execute at the step. system.mes.batch.queue.COMMAND_ABORT() system.mes.batch.queue.COMMAND_HOLD() system.mes.batch.queue.COMMAND_PAUSE() system.mes.batch.queue.COMMAND_RESET() |
changedBy | str | Optional | Optional label stored with the change (for example an operator or screen name). Associates user actions with parameter changes. |
Return Type
Type | Description |
|---|---|
None | The function returns nothing when the command is accepted; failures raise an exception. |
Scope / Availability
Registered on system.mes.batch.queue (Sepasoft Batch / MES).
Gateway: Executes on the gateway that hosts the batch queue and active controller for the entry.
Designer / Client: Same API; calls are forwarded via the production RPC layer to the owning gateway (including Enterprise routing where applicable), consistent with other system.mes.batch.queue.* operations.
Excluded / Edge Cases
- The queue entry’s batch controller must be active. If it is not, the call raises IllegalStateException with a message indicating the entry is not currently active.
- Only system.mes.batch.queue.COMMAND_START() is rejected at step scope. The call raises IllegalArgumentException: Cannot manually execute Start command on a step. Use executeEntryCommand (or the async and blocking variants) for batch Start and for batch-level Abort. In MES 3.81.13 SP3, MES 4.83.3 SP3, and later, COMMAND_ABORT() is accepted at step scope when the step’s current state allows Abort, the same rule as Stop and Hold. A step Abort does not abort the parent batch. A Stopped step can be aborted so the electronic batch record shows Aborted as the terminal state.
- Unrecognized commands (including None / empty resolution) raise IllegalArgumentException (Invalid command.).
- If stepPath does not resolve to a valid step for the running recipe logic, the call raises Exception with Invalid stepPath.
- If E-Signature is enabled and the command has a configured Signature Template, if the script path does not bypass signatures; the call raises IllegalAccessException instructing you to use the Batch Controller Perspective component to run the command with authorization.
- If the handler returns a non-empty error message after sending the notification, that text is thrown as Exception.
- A missing or unknown BatchQueueEntry (not present on this gateway’s queue) surfaces as BatchQueueEntryNotFoundException (or related gateway errors). A null entry raises IllegalArgumentException.
- The MES / batch subsystem must be started; otherwise checkMESSystemStarted failures apply as for other queue APIs.
Sepasoft MES Module Suite