Maybe something like this below, not sure all what you want. In this example it will get ERROR from full_message make field called ERROR and place data under that field with admin. You can fine tune it to your needs.
rule "Log Error"
when
contains (to_string($message.full_message), "ERROR")
then
set_field("ERROR", true);
end
rule "Some rule"
when
to_string($message.ERROR) == "true"
then
set_field("ERROR","admin");
end