Error trying to pass a string flow variable to rule engine

Hello,

I am trying to pass a string flow variable to a rule engine node as a rule set.
The string does contain multiple rules like this:

$Column$ LIKES “rome” => “rome” $Column$ LIKES “paris” => “paris”

But I keep getting this error

Rule Engine 0:633 Errors loading flow variables into node : Please separate them with spaces

I tried with a collection of strings also but it did not work.
What’s the right way of specifying multiple rules via flow variables in a rule engine node?

Is there a quick way of classifying some text looking for specific keywords?

Thanks

Ludovico

The rules

Hi @zioludo

Maybe this works

$Column$ LIKE "*rome*" => "rome"
$Column$ LIKE "*paris*" => "paris"
TRUE => "A default value, otherwise missing values are generated"

Wild cards “*” are needed with the LIKE condition. The condition is spelt “LIKE”.
The TRUE => “something else” is needed as default value if nothing matches. Otherwise missing values are generated.

In the conditions of your example, there aren’t any “string flow variables”. How are you using/inserting your flow variables ?

Hope this helps

Best

Ael

3 Likes

Thanks a lot!
The rules above were the content of a flow variable.

I have just discovered that rule engine dictionary node who does exatcly what I was looking for without messing with flow variables and I also spotted the stupid syntax mistake “LIKES” and not “LIKE”

Now it works.

THANKS ANYWAY

L.

2 Likes

My pleasure and thanks @zioludo for the clarification. I understand now what you wanted to do and definitely the -Rule Engine Dictionary- is the way to go. By the way, if you are building the conditions with exact matches, i.e. what is in between quotes is exactly what you are looking for as match, then better to use the “=” equality condition. It is much faster and it will help if you have thousands of rows. For a few, it doesn’t change that much.

Best

Ael

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.