Skip to content

Flow editor round-trip to microflow MDL - #32

Merged
lucamykael merged 1 commit into
mainfrom
feat/flow-mdl-roundtrip
Jul 25, 2026
Merged

Flow editor round-trip to microflow MDL#32
lucamykael merged 1 commit into
mainfrom
feat/flow-mdl-roundtrip

Conversation

@lucamykael

Copy link
Copy Markdown
Owner

Completes the flow editor: structural edits are no longer canvas-only drafts.

  • The parser keeps each block's original MDL statement; flowMdl.ts serializes the canvas graph back to a microflow body — original statements with current @position/@caption, if/else/end if reconstructed from decision branches, valid DECLARE placeholders for newly added blocks, and disconnected blocks appended so nothing is lost.
  • New POST /api/flow wraps the body with the imported signature (CREATE OR MODIFY MICROFLOW/NANOFLOW, params, RETURNS, FOLDER), validates via mxcli check, and saves a reviewable draft (flow-plans.json); surfaced in /api/drafts and the Drafts tab. The .mpr is never written — applying stays in the guarded workflow.
  • Save flow button in the editor toolbar; smoke-tested end-to-end against a real sandbox microflow (200, draft valid).
  • Browser title is now "Mendix Ruby".

Tests: 10 RSpec + 57 minitest, 0 failures. npm run build passes.

- 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.
@lucamykael
lucamykael merged commit 292e1b2 into main Jul 25, 2026
@lucamykael
lucamykael deleted the feat/flow-mdl-roundtrip branch July 25, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant