I have written a simple rule like this:
rule "my business logic for device-1" when has_field("device-1_M1") && has_field("device-1_M2") && has_field("device-1_M3") && to_double($message."device-1_M2") < 0.8 * to_double($message."device-1_M3") && to_double($message."device-1_M1") > 90.0 then let message = create_message(timestamp:to_date($message.timestamp), source:"devices-handling-unit-pipeline", message:"check device measures for device-1"); route_to_stream(id:"59c13f032ab79c00019e0649",message:message); end
I need to run the same business logic for other multiple devices like device-2, device-3, etc.
What is the most effective way to achieve this functionality?
I can write a custom message processor plugin for this if action was predefined.
But the “action” part of the rule should be editable from browser as well.