Rule debugger says Update Available Entity Color rule -that works on ticket close- updates status back as Available. Was it working for V4 with no additional constraints?
Hi @emre
I have just checked on the v4 setup and it appears that there are a couple of actions missing on the rule to set the entity as occupied. I have added these in but still this isn’t working . I’ve looked for other constraints but can’t see anything. Added pics below … can’t do screenshot as v4 .System no longer on the network.
I have been having a play around and if I add the constraint ‘{ORDER COUNT} Greater than 0’ to the 'update available entity’ rule it then works. But then it doesn’t change settled/closed tickets back to available and changes them to ‘new orders’
Maybe there is a better way of doing this with V5 - all that is needed is an automated command button to change the state of a Table entity - without an order being placed.
Maybe you should use a different state than default one. Default states have a specific sequence of flow in the rule system and what is happening is your state is getting reverted back due to that flow. You should create a new state and use that.
The problem that you might be running into is common with State flows. You need to understand that in some State flows, the Previous/Current State is used as a constraint. So in that case, the State will not change unless the previous State constraint is satisfied.
As it happens, by default anyway, the EntityStatusState Name is not constrained at all. So the State is arbitrary. That said, when you add an Order to a Table, the default flow is to set Status to New Orders. So this will override your OccupiedStatusState for that Table.
This is in contrast to the OrderStatusState, for example. The State Flow for OrderStatus is constrained to only change when the previous/current State condition is met.
Thanks for your help guys! OK Ive tried that but still looks like the ‘update available entity rule’ changes it to available when I click close…
its just odd how my current config works in V4
EDIT: This seems to work when using CSETTING for the inner value … :still_baffled:
EDIT2: Unfortunately, this is not going to work properly either, in the end, since I have no way to tell what the cached setting (CSETTING) actually contains at any given time.
I wondered if {ENTITY STATE BY NAME:Tables.{ENTITY NAME:Tables}:Status} working why you wanted to store table name inside OStatus setting instead of just using {ENTITY NAME:Tables}? Is there any point you can’t access table name?
btw your backup seems to slightly different from the state that setting issue occurred. How can I reproduce that issue?