Skip to content

Page button microflow call: support MicroflowSettings configuration #148

@engalar

Description

@engalar

Problem

When calling a microflow from a page button (ACTIONBUTTON), all MicroflowSettings are hardcoded to defaults in the BSON writer. Users cannot configure progress bar, async execution, form validations, or confirmation dialogs.

Current behavior

ACTIONBUTTON btnProcess (
  Caption: 'Process',
  Action: MICROFLOW Module.ACT_DoSomething(Product: $currentObject)
)

Hardcoded in sdk/mpr/writer_widgets_action.go:

  • ProgressBar: "None"
  • Asynchronous: false
  • FormValidations: "All"
  • ConfirmationInfo: nil
  • DisabledDuringExecution: true

Expected behavior

Allow configuring these settings in MDL syntax, e.g.:

ACTIONBUTTON btnProcess (
  Caption: 'Process',
  Action: MICROFLOW Module.ACT_DoSomething(Product: $currentObject) (
    ProgressBar: Blocking,
    ProgressMessage: 'Processing...',
    Asynchronous: false,
    FormValidations: All,
    Confirmation: (
      Question: 'Are you sure?',
      ProceedCaption: 'Yes',
      CancelCaption: 'No'
    )
  )
)

Scope

Requires changes across 5 layers:

Layer File Change
Grammar MDLParser.g4 Add settings syntax after microflow args
AST mdl/ast/ast_page_v3.go Add settings fields to ActionV3
Visitor mdl/visitor/ Parse settings from parse tree
PageBuilder mdl/executor/cmd_pages_builder_v3.go Pass settings to pages model
BSON Writer sdk/mpr/writer_widgets_action.go Use actual values instead of hardcoded defaults

Available settings in Mendix

Setting Type Values
ProgressBar enum None, NonBlocking, Blocking
ProgressMessage translatable string custom text
Asynchronous bool true/false
FormValidations enum All, None
ConfirmationInfo object Question, ProceedCaption, CancelCaption
DisabledDuringExecution bool true/false

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