Extend StatusFlow for hierarchical FSM; add physics and engineering units of measure#720
Open
moqui-industrial wants to merge 1 commit into
Open
Extend StatusFlow for hierarchical FSM; add physics and engineering units of measure#720moqui-industrial wants to merge 1 commit into
moqui-industrial wants to merge 1 commit into
Conversation
StatusFlow gains parentStatusFlowId (recursive FK) enabling nested / hierarchical state machines (HSM). StatusFlowTransition gains toStatusFlowId PK field for cross-flow transitions. New StatusFlowStack entity (create-only, cache="never") tracks the FSM execution stack per entity/pk pair. NOTE: StatusFlowTransition PK change requires DB migration for existing deployments with data in STATUS_FLOW_TRANSITION (low risk — configuration data reloaded on startup). UnitData.xml additions: Acceleration, Jerk, Snap, Angle, Angular Velocity/Acceleration, Volumetric and Mass Flow, Sound Level, Electrical (charge, capacitance, inductance), Viscosity, Force, Torque — covering common industrial and IoT measurement types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two independent additions to the data model:
1. Hierarchical StatusFlow (HSM)
Adds support for nested state machines by extending the
StatusFlowentity:StatusFlow.parentStatusFlowId— self-referential FK, allows a flow to be a sub-flow of anotherStatusFlowStackentity — tracks the active sub-flow stack per record, enabling hierarchical state navigation (enter sub-flow, exit back to parent on completion)StatusFlowTransitionPK change: addstoStatusFlowIdto support transitions that enter a sub-flowUseful for complex domain objects (equipment lifecycle, multi-stage orders) where a top-level state contains an independent sub-machine.
2. Physics and engineering units of measure
Extends the
UomTypeandUomseed data with standard physical and engineering dimensions:These complement the existing length/mass/time UoMs already in the framework.