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 |
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
Hardcoded in
sdk/mpr/writer_widgets_action.go:ProgressBar: "None"Asynchronous: falseFormValidations: "All"ConfirmationInfo: nilDisabledDuringExecution: trueExpected behavior
Allow configuring these settings in MDL syntax, e.g.:
Scope
Requires changes across 5 layers:
MDLParser.g4mdl/ast/ast_page_v3.goActionV3mdl/visitor/mdl/executor/cmd_pages_builder_v3.gosdk/mpr/writer_widgets_action.goAvailable settings in Mendix
None,NonBlocking,Blockingtrue/falseAll,Nonetrue/false