Closed isatahiri closed 3 years ago
if you e.handled=true
means that u override the default map which will create an object for the Insert
case like
if (args.Instance.mapAction == MapAction.Insert&&synchronizationType.IsCreate()){
localEvent = (IEvent)objectSpace.CreateObject(newCloudEventType);
objectSpace.CommitChanges();
objectSpace.NewCloudObject(localEvent, args.Instance.cloud).Wait();
localEvent.Update( args);
}
else if (args.Instance.mapAction == MapAction.Update&&synchronizationType.IsUpdate()){
localEvent.Update( args);
}
it use the Model for the newCloudEventType
which by looking a bit up in the call chain is retrieved from
var newCloudEventType = _.frame.View.Model.Application.Calendar().NewCloudEvent.TypeInfo.Type;
an I have to request it in the db on the fly ?
so yes an object must be created since does not exist locally either from u or from the default map
I'll handle only update in this case. Seems to work. Thanks. I'm still having " SessionStore is not available.". I do not know how to repro it. So until then, I guess we cannot do much.
The error occurred:
Type: InvalidOperationException
Message: SessionStore is not available.
Data: 0 entries
Stack trace:
à DevExpress.ExpressApp.Web.ASPSessionValueManagerBase.SetValue(String key, Object value)
à DevExpress.ExpressApp.Web.ASPSessionValueManager1.set_Value(ValueType value) à DevExpress.ExpressApp.Model.Core.ModelNodeValuesCache.get_ModelValuesCache() à DevExpress.ExpressApp.Model.Core.ModelNodeValuesCache.GetValue(ModelNode modelNode, String name, Func
2 getValueMethod)
à DevExpress.ExpressApp.Model.Core.ModelNode.GetDefaultValueCore(ModelValueInfo info, String name)
à DevExpress.ExpressApp.Model.Core.ModelNode.GetValue[ValueType](IModelValue1 modelValue, String name, Int32 aspectIndex) à DevExpress.ExpressApp.Model.Core.ModelNode.GetValue[T](String name, Boolean inThisLayer, Int32 aspectIndex) à DevExpress.ExpressApp.Model.Core.ModelNode.GetValue[T](String name) à ModelCalendarItem.get_ObjectView() à Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar.CalendarService.<>c__DisplayClass27_0.<Authorize>b__4(IModelCalendarItem item) dans D:\a\1\s\src\Modules\Office.Cloud.Microsoft.Calendar\CalendarService.cs:ligne 116 à System.Linq.Enumerable.First[TSource](IEnumerable
1 source, Func2 predicate) à Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar.CalendarService.<>c.<Authorize>b__27_2(ValueTuple
3 t) dans D:\a\1\s\src\Modules\Office.Cloud.Microsoft.Calendar\CalendarService.cs:ligne 114
à System.Reactive.Linq.ObservableImpl.Select`2.Selector..OnNext(TSource value) dans //Rx.NET/Source/src/System.Reactive/Linq/Observable/Select.cs:ligne 39
InnerException is null
SessionStore is not availabl
means that u access non-thread safe data stored in the HttpSession which is not available. from the screenshot u posted I cannot see clear, if you cannot find it ping me tomorrow on skype and I can remote to you
Ok Thanks
So after commenting all my customization, I still have the issue When looking at the stack, i checked the line 114-116 of the CalendarService and there you are accessing to the model :
Method in CalendarService
static IObservable<(Frame frame, GraphServiceClient client, global::Microsoft.Graph.Calendar calendar, IModelCalendarItem calerdarItem)> Authorize(this IObservable<Frame> source)
=> source
.AuthorizeMS()
.EnsureCalendar()
.Publish().RefCount()
.WhenNotDefault(t => t.frame.Application)
.Do(tuple => ClientSubject.OnNext((tuple.frame,tuple.client)))
.Select(t => (t.frame, t.client, t.calendar,
t.frame.Application.Model.ToReactiveModule<IModelReactiveModuleOffice>().Office.Microsoft()
.Calendar().Items.First(item => item.ObjectView==t.frame.View.Model)))
.TraceMicrosoftCalendarModule(_ => _.frame.View.Id);
The pre-release 2.201.19.3 in the DevExpress.XAF lab
branch includes commits that relate to this task:
To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).
Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.
If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.
Thanks a lot for your contribution.
The pre-release 2.201.20.1 in the DevExpress.XAF lab
branch includes commits that relate to this task:
To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).
Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.
If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.
Thanks a lot for your contribution.
Passing to blazor... So closing this issue created for asp.net app.
𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻 In the IN direction, the local event is always null. Does that mean I have to request it in the db on the fly ? If so, the Id of the event is store in the CloudOfficeObject table i guess.