Hotel Rooms (Entity?)


#41

I have rebuilt Command Start Action from the ground up, created new rule for RoomEntityGrid.

I have then tried all combinations of
Execute Once
clear Values
Not tried Toggle Values but dont think this applies.

Dont know if I need to Map the Automation Command to any particular navigation screen. Dont think so

I have screen shots following for each relevant Command/Action/Rule


#42

This is the format of Generic Execute Automation Command

And this is the Command Start Rule

These are my settings for RoomEntityGrid Automation Command


These are the RoomEntityGridAskQuestions screenshots



I cannot find any logical reason why the Generic Execute Automation Command will not fire the RoomEntityGridAskQuestions Command. Can you send a screenshot of your Generic Execute Automation Action?

Any further ideas? Sorry to keep taking your time on this but whilst I have a built in problem solving determination I realise it is distracting me from the implementation of the POS in my Hotel Restaurant and I may just have to simplify my whole approach. This is an elegant solution however and would love to have it in place at the Hotel.


#43

Where is the Rule that handles RoomEntityGridAskQuestions ?

If you have the Rule, it is probably not firing because of its Constraints. A small typo/error, including case-sensitivity is all it takes to break this… either in the calling Action or the listening Rule.

It should be a Rule for the event of Automation Command Executed with a Constraint of:

Automation Command Name Equals RoomEntityGridAskQuestions

And within that Rule, you probably want some Ask Question Actions by the sounds of it…


#44

You do not need to define an Automation Command if it is not going to be a visible button somewhere in the system. So all of those settings and the mapping (what makes the button visible somewhere) are not necessary.


#45

You know you dont need to make automation command (buttons) to go with the execute automation command actions, the action is automatically simulating the button…

As Q said show your questions rule, you just showed the grid rule again…


#46

This might be the problem …


#47

I left empty in my setup…


#48

That works too.

Empty in the case of this particular Action is the same as “NOT True”, which means False. :stuck_out_tongue_winking_eye:

But be aware, for other actions with True/False parameters are not necessarily like this. Some default to True when left blank.


#49

I was merely pointing out that he had deviated from the screenshot I posted :wink:


#50

The True value was listed in the screengrab as I had been trying all combinations of True, False and Null. It just happened to be in that state when I grabbed the image. Any of the three selections makes no difference to the functionality.

This is a screengrab of the Debugger with the Background setting at False.All my Room Entities are currently not ‘Occupied’ therefore the Constraints in Grid Rule prevent the setting of Entity GridBookingNumber and EntityGridBookingBalance values and therefore Jumps straight to the Execute Automation Command Action to start the AskQuestions Rule.

At this point the EntityGridCommandStart AutomationCommand loops and calls itself again and asks again for confirmation. If I were to switch off Confirmation of the Automation Command it goes into an “infinite loop” and SambaPos crashes without any error message. The only way I can break the loop is by selecting No on the Confirmation question.

As mentioned earlier I do not feel the Ask Questions Rule is even being executed as this does not appear on the Debugger Screen.

If I amend the Booking Entity Grid properties to execute ‘RoomEntityGridAskQuestions’ the Ask Question Rule runs and looks OK (Except [:CommandValue] is obviously not set)

Here is the EntityGridAskQuestion Grabs. Note the Contraints are truncated by the ScreenGrab and I will cut and paste my settings below

Constraint 1
’{REPORT ENTITY DETAIL:EC.Room Status:(EN=[:CommandValue])}’ != ‘Occupied’

Constraint 2
’{REPORT ENTITY DETAIL:EC.Room Status:(EN=[:CommandValue])}’ == ‘Occupied’ && ‘{CALL:accountinfo.BalanceFromEntityGridBookingNumberSetting()}’ != ‘’ && ‘{CALL:accountinfo.BalanceFromEntityGridBookingNumberSetting()}’ != ‘0.00’

Constraint 3
’{REPORT ENTITY DETAIL:EC.Room Status:(EN=[:CommandValue])}’ == ‘Occupied’ && (’{CALL:accountinfo.BalanceFromEntityGridBookingNumberSetting()}’ == ‘’ || ‘{CALL:accountinfo.BalanceFromEntityGridBookingNumberSetting()}’ == ‘0.00’)

The full constraints were copied from the detail provided directly by Joe so I am confident these are correct.


#51

They were correct in my setup :wink: but obviously they are dependent on other user selected fields/options etc.

Regrdless either way it’s the looping that’s confusing m and command confirmation??? What do you mean by that? When you say that I get the thought your triggering it from an automation command button not entity grid…


#52

No its just a selection in the Automation Command when it executes. Just a way of confirming to process the Automation Command. I am just using it as a break/process tracking.


#53

OK, found the problem…
You set the [:] name in both the execute automation command action and ask question action to [:AutomationCommandName]…

[:AutomationCommandName] is not good as it is the tag for the command name in rules so although it was showing the custom field with header of AutomationCommandName it was ignoring the value because [:AutomationCommandName] meant the command name the action in the rule was fireing was the command name which triggered the rule, giving you the loop…

Does that make sense?

You need to edit the ask question and the execute anutmation command actions to say have spaces in the header [:] expressions.
This would mean removing and re-saving the the rules.
What would be better would be to create new ask question and execute command actions.
Add those to the rules the number of times needed.
Copy and paste the constrains and expressions then remove the current actions from those rules.

F Me did that take some tinkering to realize that was the issue… The way it still shows the enpty field in the rule but ignores the contents and just uses the rule [:] value… makes sence as to why it does it but dont think it should be allowed/doable.

@emre I think there needs to be some form of validation here so that something like if a generic action [:] expression is used the action instances in the rule screen does not show the usual blank field if it is a valid rule [:] expression…
Say it that way encase there is reason to want to set a rule [:] expression on action rather than in the rule, alternatively I guess valid [:] rule expressions would be disallowed from being used in action fields…
To simplifyso you dont need to read all that, this example results in a infinite loop as [:AutomationCommandName] in the ask question or execute automation command action still displays the open/empty field for the action in the rule but ignores the entered values and uses the [:AutomationCommandName] which for an automation command rule is the command that triggered the rule causing the loop.


#54

@JTRTech Thank you very much for testing it and letting me know that. If it is possible and won’t take more than 5 minutes can you please demonstrate that issue in default setup? If it will be hard to reproduce on default setup I’ll try to handle it from your description.


#55

Have messaged you with a backup replicating.

Default setup.
One button (Test Loop)
One new action (Ask Question)
Rule firing the question action on Test Loop button/command

Loops due to the [:AutomationCommandName] field on the action which shows the empty filed in the rule as described.


#56

Awesome! We’ll warn when an action parameter name matches to a rule constraint name.


#57

Is that on saving the action or the rule?


#58

Yes and blocking save ATM but I’ll change it to a warning that executes as soon as action is added.


#59

Looks like upon saving the Rule. I think it would be better upon saving the Action @emre


#60

Would it not be better on the action saving?