Skip to content

CALL EXTERNAL ACTION — no way to pass empty/null binding for optional parameters; results in CE7252 #1073

Description

@acarum

Category: MDL parser / CALL EXTERNAL ACTION syntax


Summary

When an OData action declares a parameter (e.g. additional: AdditionalArgumentsDefinition) that must be bound to an empty/null value, there is no valid MDL syntax to express this. The result is that any microflow created via mxcli exec with a non-null binding for that
parameter produces a permanent CE7252 in Studio Pro that can only be fixed manually inside the IDE.


Steps to reproduce

  1. Import an OData action that declares two parameters: command and additional.
  2. Write a microflow that calls the action. Attempt any of these bindings for additional:

-- Attempt 1: null keyword
CALL EXTERNAL ACTION Mod.Service.ActionName (command = $Cmd, additional = null);
-- → Parse error

-- Attempt 2: empty keyword
CALL EXTERNAL ACTION Mod.Service.ActionName (command = $Cmd, additional = empty);
-- → Parse error

-- Attempt 3: blank (no value)
CALL EXTERNAL ACTION Mod.Service.ActionName (command = $Cmd, additional = );
-- → Parse error: mismatched input ')' expecting the start of a statement

-- Attempt 4: omit the parameter entirely
CALL EXTERNAL ACTION Mod.Service.ActionName (command = $Cmd);
-- → Reference error: "declared but not supplied: additional"
-- The action declares: command, additional

None of the four variants are accepted.

  1. The only workaround is to pass a real object:

$Additional = CREATE Mod.AdditionalArgumentsDefinition ();
CALL EXTERNAL ACTION Mod.Service.ActionName (command = $Cmd, additional = $Additional);

This passes mxcli validation but produces CE7252 in Studio Pro because the internal binding type does not match the contract.


What Studio Pro serializes (observed via DESCRIBE MICROFLOW)

When a working microflow is round-tripped through DESCRIBE MICROFLOW, mxcli itself outputs:

call external action Mod.Service.ActionName(command = $Cmd, additional = );

So additional = (empty RHS) is the canonical representation of a null binding — but the MDL parser rejects this syntax on input.


Expected behavior

One of the following should be valid MDL and round-trip correctly:

-- Option A: bare empty RHS (already used in DESCRIBE output)
CALL EXTERNAL ACTION Mod.Service.ActionName (command = $Cmd, additional = );

-- Option B: explicit null/empty keyword
CALL EXTERNAL ACTION Mod.Service.ActionName (command = $Cmd, additional = empty);

The reference validator should accept a null binding for a parameter that is declared in the contract, without requiring the parameter to be omitted entirely.


Environment

  • mxcli version: (0.20.0)
  • Mendix version: 11.12.0
  • OData service validation status: No (service not reachable at authoring time)
  • Observed via: mxcli exec, mxcli check --references, mx check

Impact

Any migration or code-generation workflow that produces CALL EXTERNAL ACTION calls with optional/null parameter bindings is broken — the generated microflow requires manual IDE intervention to clear CE7252, defeating the purpose of automated MDL generation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions