Stuck with rule for package orders

Cant see that this would be expected behavior but has thrown a spanner in the works for my setup.
Worked fine when just had starters course but now expanding to cover mains and desserts and having problems.
Below are the three rules for the three courses;

BUT NOW all items are marked as package untill there are 2 of each course… (2 being the number of guests / package cover tag value)

I can ring in in any order, starters, mains, deserts or mains, dessers, started its the same, untill there are 2 of each course/state the actions still fire.

I can only hazzard a guess they are interfering with each other somehow.

Show message of the constraints reveiles the expected values…

Here is an example;

Splitting them into three separate rules solves the issue but clearly something is clashing in the tags used.

It is because all constraints in actions are evaluate at the same time when the rule trigger.


This is a common misconception that Action Constraints happen concurrently when in fact they all evaluated at once.

1 Like

These constraints are not based on the results of the other actions within this rule.
Each action has a different constraint.
The show message shows that the values within the individual constraints are as expected.
Might test with a show message with all three constraints in the message.
i first thought that maybe the {TICKET TAG} value is being added together over the constraints or the count tag was doing that but it’s not going against 6 as can ring in many starters and mains but untill 2 of each the all keep fireing.
If it were relating to the timing of the constraint evaluations I would expect a different behaviour.
I personally think it’s a glitch in the TICKET ORDER COUNT tag, that it is merging the expressions hence that 2 of each are required.
The actions are fireing individually however all three constraints merging becoming;
Starters < 2 && Mains < 2 && Desserts < 2

Show message show correctly it doesn’t mean it is the same as constraint. Especially when you do thing in order level. when the rule first trigger, some order level variable in constraint not even available yet or it doesn’t know which order to show.

1 Like