Skip to content

describeNanoflow loses void-microflow EndEvent fix #406

@hjotha

Description

@hjotha

Source

Follow-up from review of merged PR #371 (fix: preserve void EndEvent returns in describe).

Problem

PR #371 made `describeMicroflow` and `renderMicroflowMDL` (the LSP rendering path) emit `return;` for empty `EndEvent` nodes in void microflows. `describeNanoflow` was not updated.

`describeNanoflow` wraps the nanoflow's `ObjectCollection` in a bare `&microflows.Microflow{}` (no `ReturnType` set) so it can reuse `formatMicroflowActivities`. It does not set `DescribingMicroflowHasReturnValue` on the `ExecContext`. As a consequence, value-returning nanoflows with early-exit terminal paths still drop the explicit `EndEvent` on describe — exactly the symptom #371 fixed for microflows.

Expected behavior

Value-returning nanoflows preserve their explicit `return;` (void) or value-bearing return on describe, and bare `return;` is suppressed for value-returning nanoflows that don't have an explicit early-exit.

Proposed fix

Set `DescribingMicroflowHasReturnValue` (and any companion ExecContext fields) inside `describeNanoflow` from the nanoflow's own `ReturnType`, mirroring `describeMicroflow`. Add a `describeNanoflow` regression test for both void and value-returning nanoflow shapes.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions