How to solve this error?

0
am using a exposing webservice document Here. Error: Cannot distinguish arguments passed to selected microflow, because they have related entities. Property 'Microflow' of menu item 'Webservice' Navigation -
asked
3 answers
0

I've just run into a similar issue in Mx 6.3.1 I have an entity X. Entity X contains a number of attributes, like a number, a description, a title, etc, and a set of references. X can also contain a number of modules Y, with exactly the same possible attributes and references as X, with the addition of a subNumber.

In part to avoid having two of the same entities as input parameters, I made Y a specialization of X, with the subNumber as additional parameter, and a relation to X. It seemed like the most simple, straightforward solution, except for the error mentioned by the OP when calling a microflow from a page with X and Y as input parameters.

I'm going to try for a workaround, but it feels like there is no reason why the above should not be possible.

answered
0

I dont seem to understand either question B-) but in general...

if you inherit object B from object A then realize that for EVERY OBJECT B you create the system will also create an OBJECT A !

Even better, when working with OBJECT A in the modeler, eg. a datagrid, Mendix will ask you what specialization forms to use. In other words, at OBJECT A level, Mendix will be aware of the fact that there are specializations.

https://modelshare.mendix.com/models/cad99f61-d47a-4cd1-99b6-89b5e0f0e1f6/microflow-with-inherentance-split

answered
0

Hi Lex,

The problem is not so much the specialization (or understanding it). Rather, it is calling a microflow from a form or webservice, with two parameters of a similar entity (same or specialization).

When calling a microflow from another microflow, this problem does not arise, because you can manually specify the input for each parameter. Example: I have an entity X. In a subflow, I want to compare/sync/manipulate/etc two instances of X. Let's say X1 and X2. In the microflow I specify the two input parameters (X1 and X2). In the microflow that calls this subflow, I manually specify what input instance is used for each parameter. Like calling a method in java. No problem.

When calling a microflow from a form or webservice in a similar scenario, things are different. Example: I have a dataview for entity X (Let's say X1). In this dataview I have a datagrid, containing a list of X (X2). Now I want to be able to single-select an X2 from the list and call a microflow action that takes both X1 (the caller of the page) and X2 (the selected entity) as input parameters. This is where the error mentioned by the OP arises.

Allowing the developer to manually specify which entity is input for which parameter, like with subflows, sounds like a logical solution.

answered