How do I include setup/cleanup in operation state without breaking JobDispatcher/CountStrategy #2
Replies: 1 comment
-
|
Answering my own questions after some discussions now: Some design decisions that reflect in the codebase
Three options to modify behaviour safelyScheduler option (recommended for flow control):Method: Gate production jobs while clean-up is active; Implement a scheduler that refuses to start new production jobs while any clean-up is pending/active. Lightweight UI clarity:add BeginRestrictions via OrderManagementFacade Use the facade’s restriction events to surface “blocked by cleanup” to the operator. This is lighter weight than changing the OperationDispatcher and is rendered by the web UI automatically. Improving operator clarity with notificationsDispatcher-level notification: If you already customize the OperationDispatcher, you can set a persistent notification on the operation while the clean-up is running (e.g., in Resource-level notification: Use resource notifications to emit warnings while a clean-up is ongoing; clear them when done. If the provided visual instructions I assume your resource is displaying does not draw enough attention or is not visible from all areas in the machine, you can provide an additional notification for a more prominent feedback. SummaryControl flow: Gate new production jobs in the scheduler (keeps job start decisions clean and separate from orders/operations). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem In our application,
OperationStateis currently derived only from production jobs attached to OperationData.Jobs. Setups and cleanups are ignored. This leads to two issues:Attempting to “fix” this by changing the
CountStrategy(e.g., returning false from CanReachAmount/AmountReached while setups/cleanups exist via JobManagement) causes theJobDispatcherto push more articles and can lead to state transitions like AmountReached → Interrupting, effectively breaking OrderManagement until a restart.Question: How can we account for setup/cleanup phases when determining and presenting OperationState, without interfering with JobDispatcher/CountStrategy and the core job flow?
Beta Was this translation helpful? Give feedback.
All reactions