[Resolved] Ticket Service State does not change on void since 4.1.62 upgrade

it does change when i void one of the bar items :slight_smile: perhaps the problem is related to execution timing of the relevant actions?

I think we need to separate the actual Update Ticket Service state from Void… it needs a different check… Maybe make it check if it needs to change Service state when Gift state is changed after pressing void instead of when void is pressed.

1 Like

On previous version constraint check for rules that handles same event was executing one by one as one of the rules about to run. That was permitting an action to change the constraint values for next rule. It might sound useful but I’ve discovered some cases that generates unpredictable results. Sounds like your setup was benefiting from that. With new version all rule constraints should pass at the time you click on void button.

2 Likes

I did what @Jesse suggested , and now the order voiding rules and actions are working as expected. Thanks @emre for explanation of changes & @Jesse for suggesting this alternative setup.

Dear @Emre, I had this rule:


That was working great…
now I read what you said:

but to be honest I am completely lost…

With my rule I get this screen:

Two times DESCONTO, and then I nice error:

-----------------------------
[General Info]

Application: SambaPOS
Version:     4.1.63
Region:      en
DB:          SQ
Machine:     SERVIDOR
User:        Gerlando
Date:        02/10/2014
Time:        22:59

User Explanation:

Gerlando said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.ArgumentException
Message:     An element with the same key 'Desconto' already exists in the ExpandoObject.
Source:      System.Core
Stack Trace: at System.Dynamic.ExpandoObject.TrySetValue(Object indexClass, Int32 index, Object value, String name, Boolean ignoreCase, Boolean add)
   at System.Dynamic.ExpandoObject.TryAddMember(String key, Object value)
   at System.Dynamic.ExpandoObject.System.Collections.Generic.IDictionary<System.String,System.Object>.Add(String key, Object value)
   at Samba.Services.Implementations.AutomationModule.RuleQueryBuilder.Execute(List`1 actionContainers)
   at CallSite.Target(Closure , CallSite , Object , List`1 )
   at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter, Action`1 dataAction)
   at Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, Int32 terminalId, Int32 departmentId, Int32 userRoleId, Int32 ticketTypeId, Action`1 dataAction)
   at Samba.Presentation.Common.Services.ApplicationState.NotifyEvent(String eventName, Object dataObject)
   at Samba.Modules.PosModule.TicketViewModel.ExecuteAutomationCommand(String automationCommandName, String automationCommandValue, String nextCommandValue, Boolean executeOnce)
   at Samba.Modules.PosModule.TicketViewModel.ExecuteAutomationCommand(AutomationCommand automationCommand, String selectedValue, String nextValue)
   at Samba.Modules.PosModule.TicketViewModel.OnExecuteAutomationCommand(CommandContainerButton obj)
   at Microsoft.Practices.Prism.Commands.DelegateCommand`1.<>c__DisplayClass6.<.ctor>b__2(Object o)
   at Microsoft.Practices.Prism.Commands.DelegateCommandBase.Execute(Object parameter)
   at Microsoft.Practices.Prism.Commands.DelegateCommandBase.System.Windows.Input.ICommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Primitives.ToggleButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at Samba.Presentation.App.Main()

-----------------------------

[Assembly Info]

Samba.Services, Version=1.0.0.0
mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
PresentationFramework, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
FluentValidation, Version=3.4.0.0
Samba.Domain, Version=1.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.6.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.6.0
PresentationCore, Version=4.0.0.0
Stateless, Version=1.0.0.0
System.Core, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
System.Windows.Forms, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Localization, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.6.0
PropertyTools, Version=2012.4.14.1

-----------------------------

[System Info]

Operating System
-Microsoft Windows 7 Professional
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = -180
--FreePhysicalMemory = 1168812
--OSArchitecture = 64-bit
--OSLanguage = 1046
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

Machine
-SERVIDOR
--Manufacturer = LENOVO
--Model = 2522G26
--TotalPhysicalMemory = 4080709632
--UserName = SERVIDOR\Gerlando

-----------------------------

Thnaks.
G.

I find this interesting, because according to older conversations, this shouldn’t happen (it’s executing the action twice and it shouldn’t)…

This is in contrast to what @emre is saying now…

Also…

What you are seeing @gerlandog is the Action executing twice, which it shouldn’t.

Something got broken.

This is something else. Send me a backup.

1 Like

here you are sir!!!
SambaPOS4_201410022122SQM.zip (4.3 MB)

Thanks!!!

G.

Mine is running just fine.

@gerlandog’s running fine too… wtf :slight_smile:

mmmmmmmmmmmmmmmmmmm

WAIT!!!

coud it be possible that as I was playing with regular expressions, I may have changed one action regular expression and not the other??? and that does the double question?

G.

IF that is the case, I AM VERY SORRY!!!

G.

2 Likes

If they are not exactly the same it will cause that.

OK, my bad.

SORRY!!!

G.

1 Like

BTW I noticed your keypad has the enter key on it. You can get rid of the OK button as the Carriage Return key does the same function. Not really a huge deal just thought you might want to eliminate a redundant feature :stuck_out_tongue:

2 Likes

@gerlandog so the real config was different from the screenshot? I really wondered how it happened.

yes i am struggling with that now… configuring it…

I am having a hard time with this:

\d{2}?\.\d{2}?

Seems to work great at discount, but does not work well in change price…
in discount 65.87 is actually 65.87, but in change price 65.87 converts itself to 6587,00

GGGRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR damned regular expressions and all this new languages… GGGRRRRRRRRRRRRRRRRRRRRRRRRRRRR

G.

YES, I dont know at what point I saved it different, because i am fighting some @#$%@#$ regular expressions…

SORRY again…

G.

2 Likes

I am trying to teach myself java scripting lol. Been reading over and trying to integrate my TimeTrex stuff my brain is going batty.

@gerlandog what is your windows decimal separator? If it is , that may happen.

Yes it is…

but if I change that to . everything gets messed up

G.