How to convert the type from Decimal to  IMendixObject in Java action?

Hi. I want to make a list using input parameter which has type of Decimal in Java action. Java action need to return  a List of IMendixObject. I learned about that I have to use the Core.instantiate (?) method to create a concrete object of the correct type. But Mendix says this method isn’t correct. Which method is correct to convert the type from Decimal to  IMendixObject?  
1 answers

If you want to instantiate an object in Java you need to pass the full qualified name like ‘MyFirstModule.Customer’  You can not instantiate with a Decimal.

Probably you have created an entity that should contain the values. Like ‘MyFirstModule.DecimalParameter’ with two attributes of type Decimal ‘UnderStatusParam’ and ‘OverStatusParam’.

Use the proxy is easier.

DecimalParameter decimalParameter = new DecimalParameter(getContext());



Please note: this is pseudocode, not checked.

BTW This could be easier achieved in a microflow.