The has_field() function only checks if the specified message field exists. I doubt that you’re really trying to check for a field named “externalId: 4624”. You probably want to check the value of the message field named “externalId”.
Example:
when
has_field("externalId") &&
to_long($message.externalId) == 4624
then
// ...
end
Thanks J. I checked the link you sent and it was helpful. What happens if i want to set a new field inside the “then” part of the above code. can this work?? I already tried it but didnt see it amongst d searched field
rule "successful logons"
when
has_field(“externalId”) &&
to_long($message.externalId) == 4624
then
set_field(field:“successful”, value: 4624);
end