How to set attribute values in java action after passing entity as parameter ?

0
I want to set value for the Enum attribute in the entity by checking user inputted string is present in the Enum value or not if persent then set that value and return that object to microflow by creating Java Action.
asked
1 answers
0

It seems you want to convert a string to enum with checking. Create a java action with param ‘value’ that returns an enumeration and with code like this

		if(value != null && !value.isEmpty() && Enum_XXX.valueOf(value) != null) {
			return Enum_XX.valueOf(value).name();
		}
		return null;

 

answered