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

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.
1 answers

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;