Converting String to Enum

0
I’ve duplicated the Community Commons EnumerationFromString Java action and renamed it and placed it in the module I require it.  I’ve then used this java action in a microflow but it is not working.  I have selected the correct input variable and the valid enum for the output.   I found a similar query from a few years back and it appears that I might have to change the code within the java file.  The snippet from the code is shown below and they say we should replace the LogLevel.class by the proxy class for my enum.  If my enum is called ENUM_Countries then should I be replacing LogLevel.class with ENUM_Countries?  I’m not quite sure what the proxy class is for my enum.   // BEGIN USER CODE                              // Replace LogLevel.class by the proxy class for your Enumeration         Optional<LogLevel> result = Misc.enumFromString(LogLevel.class, toConvert);                 return result.orElseThrow().name();         // END USER CODE   Thanks Kath
asked
1 answers
1

Hi Kath

I see your comment on this previous forum post on this topic.

This medium article linked in that post goes into detail about the steps that you need to take to get this properly configured.

Hope this helps!
Danny

answered