Hello why i have this problem with the order Ready Button?

Hecho%201 Hecho%202 Hecho%203 Hecho%204 Hecho%205
Application: SambaPOS
Version: 5.2.18
Region: de
DB: SQ
Machine: LAPTOP
User: manue
Date: 09.03.2019
Time: 16:04

User Explanation:

manue said “”

[Exception Info 1]

Top-level Exception
Type: System.Reflection.TargetInvocationException
Message: Ein Aufrufziel hat einen Ausnahmefehler verursacht.
Source: mscorlib
Stack Trace: bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
bei System.Delegate.DynamicInvokeImpl(Object[] args)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Inner Exception 1
Type: System.NullReferenceException
Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Source: Samba.Presentation.ClientLibrary
Stack Trace: bei Samba.Presentation.ClientLibrary.Modules.TicketModule.ActionProcessors.CloseActiveTicket.Process(ActionData actionData, RuleExecutionContext context) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\TicketModule\ActionProcessors\CloseActiveTicket.cs:Zeile 45.
bei Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData, RuleExecutionContext context) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Common\RuleActionTypeRegistry.cs:Zeile 39.
bei Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData, RuleExecutionContext context) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\AutomationService.cs:Zeile 42.
bei Samba.Services.Implementations.AutomationModule.ActionDataBuilder.<>c__DisplayClass13_0.b__0() in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\ActionDataBuilder.cs:Zeile 76.
bei System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
bei System.Windows.Threading.Dispatcher.Invoke(Action callback)
bei Samba.Services.Implementations.AutomationModule.ActionDataBuilder.InvokeWith(AppState appState, RuleExecutionContext context) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\ActionDataBuilder.cs:Zeile 84.
bei Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWithoutLogging(Object ruleData) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\RuleExecutor.cs:Zeile 125.
bei Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\RuleExecutor.cs:Zeile 62.
bei Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, AppState appState) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\NotificationService.cs:Zeile 26.
bei CallSite.Target(Closure , CallSite , INotificationService , String , Object , AppState )
bei System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
bei Samba.Services.Implementations.AutomationModule.CommandExecutionService.ExecuteAutomationCommand(AppState appState, String commandName, String commandValue, Object dataObject, Boolean background) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\CommandExecutionService.cs:Zeile 75.
bei Samba.Presentation.ClientLibrary.Modules.AutomationModule.VisibleAutomationModule.b__6_3(EventParameters1 x) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\AutomationModule\VisibleAutomationModule.cs:Zeile 67. bei Microsoft.Practices.Prism.Events.EventSubscription1.InvokeAction(Action1 action, TPayload argument) bei Microsoft.Practices.Prism.Events.EventSubscription1.<>c__DisplayClass2.b__0(Object[] arguments)
bei Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
bei Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
bei Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)


[Assembly Info]

mscorlib, Version=4.0.0.0
Samba.Services, Version=1.0.0.0
Samba.Domain, Version=1.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
System.Core, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
DevExpress.Xpf.LayoutControl.v16.2, Version=16.2.13.0
System.Xml, Version=4.0.0.0
DevExpress.Xpf.Grid.v16.2, Version=16.2.13.0
System, Version=4.0.0.0
DevExpress.Xpf.Grid.v16.2.Core, Version=16.2.13.0
System.Xaml, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Runtime.Serialization, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
DevExpress.Xpf.Core.v16.2, Version=16.2.13.0
System.Windows.Forms, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
Samba.Persistance, Version=1.0.0.0
Stateless, Version=1.0.0.0
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=1.0.0.0
ReachFramework, Version=4.0.0.0
EntityFramework, Version=6.0.0.0
FluentValidation, Version=3.4.0.0
NCalc, Version=1.3.8.0
Microsoft.CSharp, Version=4.0.0.0
Omu.ValueInjecter, Version=2.3.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
DevExpress.Data.v16.2, Version=16.2.13.0
WindowsInput, Version=1.0.4.0


[System Info]

Operating System
-Microsoft Windows 10 Pro
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = -180
–FreePhysicalMemory = 1203316
–OSArchitecture = 64-Bit
–OSLanguage = 1031
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 10.0.17134

Machine
-LAPTOP
–Manufacturer = HP
–Model = HP 250 G4 Notebook PC
–TotalPhysicalMemory = 4206252032
–UserName = LAPTOP

I think this has to do with the load ticket action, because all the orders ar for the same ticket…has samba a problem to load 4 times the same ticket or what?

Will take me a bit to translate all of that but I will try to figure out what your problem is.

1 Like

You can not load multiple tickets at the same time. You have to create a loop action and loop them.

Hi @Jesse thank you how i do that?

You are also sending the word Complete as command value and not the ticket id. You are actually not sending the ticket id at all.

Try changing your button commands to Hecho={TICKET ID}

Actualy wait a sec let me test something I may be telling you wrong.

I have this setup from here

Yes that is correct so test something. Put a show message action in the automation command executed rule. Set the message to be [:CommandValue]

Lets see what its sending.

Rofl i took out the change order state action and put in again with the show message action and now its working
thats wahts showing up
Hecho%206

it looks like y changed something and and i refreshed that with take the action out and in again, right?

but btw. how i can change only the order state for the order who is ready actually all the order are changing to KücheFertig what means “KitchenReady”?

Update it will come back an error again

Inner Exception 1
Type: System.InvalidOperationException
Message: The relationship between the two objects cannot be defined because they are attached to different ObjectContext objects.
Source: EntityFramework
Stack Trace: bei System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.ValidateContextsAreCompatible(RelatedEnd targetRelatedEnd)
bei System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.Add(IEntityWrapper wrappedTarget, Boolean applyConstraints, Boolean addRelationshipAsUnchanged, Boolean relationshipAlreadyExists, Boolean allowModifyingOtherEndOfRelationship, Boolean forceForeignKeyChanges)
bei System.Data.Entity.Core.Objects.ObjectStateManager.PerformAdd(IEntityWrapper wrappedOwner, RelatedEnd relatedEnd, IEntityWrapper entityToAdd, Boolean isForeignKeyChange)
bei System.Data.Entity.Core.Objects.ObjectStateManager.PerformAdd(IList1 entries) bei System.Data.Entity.Core.Objects.ObjectStateManager.DetectChanges() bei System.Data.Entity.Core.Objects.ObjectContext.DetectChanges() bei System.Data.Entity.Internal.InternalContext.DetectChanges(Boolean force) bei System.Data.Entity.Infrastructure.DbChangeTracker.HasChanges() bei Samba.Infrastructure.Data.SqlData.EFWorkspace.HasChanges() bei Samba.Persistance.Data.CachedDao.CacheSave[T](T entity) bei Samba.Persistance.Data.Dao.Save[T](T entity) bei Samba.Persistance.Implementations.TicketDao.Save(Ticket ticket) bei Samba.Services.Implementations.TicketModule.TicketServiceBase.SubmitTicket(Ticket ticket, TicketType ticketType, AppState appState) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\TicketModule\TicketServiceBase.cs:Zeile 553. bei Samba.Services.Implementations.TicketModule.TicketServiceBase.CloseTicket(Ticket ticket, AppState appState) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\TicketModule\TicketServiceBase.cs:Zeile 571. bei Samba.Presentation.Services.Implementations.TicketModule.TicketService.CloseTicket(Ticket ticket) bei Samba.Presentation.ClientLibrary.Modules.PosModule.PosViewModel.CloseTicket() in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\PosModule\PosViewModel.cs:Zeile 700. bei Samba.Presentation.ClientLibrary.Modules.PosModule.PosViewModel.OnTicketEvent(EventParameters1 obj) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\PosModule\PosViewModel.cs:Zeile 522.
bei Microsoft.Practices.Prism.Events.EventSubscription1.InvokeAction(Action1 action, TPayload argument)
bei Microsoft.Practices.Prism.Events.EventSubscription1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments) bei Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments) bei Microsoft.Practices.Prism.Events.CompositePresentationEvent1.Publish(TPayload payload)
bei Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)