Hey folks! I want to import an enum attribute and map it to my already predefined enums (27 different ones). Now i could obviously make alot of ifs to check the string for its corrisponding enums but that seems like a lot of effort. Is there a faster way to check the incoming string and map it to my enum? Cheers, Niklas
asked
Niklas Höflmayr
3 answers
0
u can write a java action to achive this with less work just pass it the value from ur end and then in java u can map the value to a enum in a for each loop with Enum.valuesAll()
answered
Chandresh Shukla
0
As an addition to Chandresh, here is a link of a Java example (note that the blog is a little older and a slightly different solution than Chandresh).
answered
Daan Verweij
0
Community Commons has an EnumerationFromString Java action that uses `LogLevel` as an example enumeration. Duplicate and modify it to reflect your desired enumeration class.