"branching issue when updating from version 6.x to 7.2"
Using RM7.2 below works :
<operator activated="true" class="branch" compatibility="6.4.000" expanded="true" height="82" name="something" width="90" x="45" y="30">
<parameter key="condition_type" value="expression"/>
<parameter key="condition_value" value="equals("%{myMacro}","1")"/>
<parameter key="expression" value="equals("%{myMacro}","1")"/>
....
but when upgrading the operator to 7.2 it fails (using else instead of if as to be expected) (as below)
<operator activated="true" class="branch" compatibility="7.2.000" expanded="true" height="82" name="something" width="90" x="45" y="30">
<parameter key="condition_type" value="expression"/>
<parameter key="condition_value" value="equals("%{myMacro}","1")"/>
<parameter key="expression" value="equals("%{myMacro}","1")"/>
So, is there a change in how macro values are to be called between v6.2 and v7.2?
Best Answers
-
bhupendra_patil Employee, Member Posts: 168 RM Data Scientist
6.5 intridocued the eval function for handling macros
here is an excerpt from
http://docs.rapidminer.com/studio/releases/6.5/
The macro expression %{} is now a regular function, evaluated just as any other function, and results in the string value of the macro. The new eval("expression") function allows you to evaluate strings as expressions. To resolve the value of a macro (i.e., as a number), use eval(%{macro}). If a macro references an attribute by name, treat it as an expression written as eval(%{macro}) or the shorthand #{macro}. (This shorthand is only applicable for attribute names.)
Also i tried updating XML and it seems to wrok fine, you need the hit the checkbox dialog, if the edited xml has issues then may be it may not update
0 -
kayman Member Posts: 662 Unicorn
Ok, fixed it.
Seems that I copied the quotation marks when shifting from 6 to 7.
in the old format it was condition value = equals("%{myMacro}","1")
in the new format it is expression=equals(%{myMacro},"1")
As for the XML, thanks for the tip, I indeed missed the check box part.
0
Answers
Also, it seems changes in the XML file are no longer reflected anymore in the design pane, making it no longer possible to copy / paste XML