Skip to content

MDL syntax of Importmapping returning an object is wrong #1176

Description

@rbolt

Problem

An importmapping can return an object or a list.
The MDL syntax always states it is a list.

Reproduce

Create an importmapping that returns an object
Create an importmapping that returns a list of objects
Create a microflow
add an activity
    Type: "Import from JSON" that uses the importmapping **that returns an object**
    Range: this option is not available for this type of mapping
    Store in variable: Yes
add a second activity
    Type: "Import from JSON" that uses the same importmapping **that returns a list**
    Range: "All"
    Store in variable: Yes
retrieve the microflow MDL syntax with mxcli
compare the MDL syntax of both activities

MDL Output

The following source lines shows the MDL of both activities:

$objectResponse = import from mapping TestModule.MF_importmapping_rest_object($sCountryISOCode) all;
$listResponse = import from mapping TestModule.MF_importmapping_rest_list($sCountryISOCode) all;

Both contain the 'all' postfix.

Expected MDL output

The syntax of object response should be without the 'all' postfix:
$objectResponse = import from mapping TestModule.MF_importmapping_rest_object($sCountryISOCode);

The syntax of the list response in this example should be:
$listResponse = import from mapping TestModule.MF_importmapping_rest_list($sCountryISOCode) all;
Remark: postfix depends on the range settings (see issue v0.23.0)

Environment

MxCLI: v0.23.0
StudioPro: v11.12.3

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

    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