State Machine question

0
We have a question regarding WorkOrderStateMachineAutomatic.   This is the State Machine used in the Mendix screens to create WorkOrders and automatically start the operations. However, within the scope of my task, I need to abort the WorkOrder. Since this WorkOrderStateMachineAutomatic is a state machine marked as system defined, I cannot create an aborted status or a transition for it. I would like to know how I could represent the Aborted status in the WorkOrder programmatically. Would it be another State Machine?     We are using Opcenter 2507 low Code Ui Applications version 6.0.0   Thank you
asked
1 answers
1

The system-defined WorkOrderStateMachineAutomatic cannot be extended, so adding a new state like “Aborted” or extra transitions is not supported.

As a wokraround, you can model the aborted concept outside of the system state machine. A common approach is to add a custom attribute (for example IsAborted with an optional AbortReason) or a custom enum/state machine (such as WorkOrderCustomStatus = Active / Aborted / …) on the WorkOrder. When an abort is required, you set this custom status and use it in your UI and logic (filters, button visibility, validations) to prevent further processing. If the platform or underlying system provides a cancel/abort API, you can call it via a microflow and then move the WorkOrder to the closest allowed terminal state (e.g. Cancelled or Closed). Otherwise, you can still reliably block downstream automation by checking the custom “aborted” flag in all relevant flows.

answered