Flow editor round-trip to microflow MDL - #32
Merged
Conversation
- parseFlow keeps each block's original MDL statement; the canvas serializer (flowMdl.ts) walks the graph from Start, re-emitting statements with current @position/@caption and reconstructing if/else/end if from decision branches. New blocks get a valid DECLARE placeholder; disconnected blocks still serialize so nothing silently disappears. - New POST /api/flow wraps the body in CREATE OR MODIFY MICROFLOW/NANOFLOW using the imported signature (params, RETURNS, FOLDER), validates with `mxcli check`, and saves a reviewable draft (flow-plans.json), listed in /api/drafts and the Drafts tab. Draft persistence is now a shared helper. - Save flow button in the flow editor; browser title shortened to Mendix Ruby.
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.
Completes the flow editor: structural edits are no longer canvas-only drafts.
flowMdl.tsserializes the canvas graph back to a microflow body — original statements with current@position/@caption,if/else/end ifreconstructed from decision branches, validDECLAREplaceholders for newly added blocks, and disconnected blocks appended so nothing is lost.POST /api/flowwraps the body with the imported signature (CREATE OR MODIFY MICROFLOW/NANOFLOW, params,RETURNS,FOLDER), validates viamxcli check, and saves a reviewable draft (flow-plans.json); surfaced in/api/draftsand the Drafts tab. The.mpris never written — applying stays in the guarded workflow.Tests: 10 RSpec + 57 minitest, 0 failures.
npm run buildpasses.