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.
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:
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.
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
They were correct in my setup 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…
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.
@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.