Open ricardoamm opened 7 months ago
the JobNotification test currently are on refactoring, so they cannot validate that at least on the tested scenario they work. In any case without a sample and detailed steps on how to repro I cannot help mych
I just configure a Execute Action Job, save one object in detail view and then force the trigger.
sample please
I'm working on a big project, and it's hard to me right now isolate same parts. I'm checking several notification approaches.
About this situation i bypass it validating the Object Type in the Notificaton Module:
internal static IObservable<Unit> JobNotification(this BlazorApplication application, string workerId) => Observable.Using(() => application.CreateNonSecuredObjectSpace(typeof(JobWorker)), objectSpace => { var jobWorker = objectSpace.GetObjectsQuery<JobWorker>().FirstOrDefault(job => job.Id == workerId); if (jobWorker != null) { if (jobWorker.Job is ObjectStateNotification job) {
I have one last question regarding the creation of Object State Notification, and it's why some Objects are not available to select in the Object Lookup. Curiously are the same as what I want.
a lot can happen when u validate the problem against your big project and my resources are also very limited, that's why a sample is always the only way to go.
your last question is unclear to me best guess you need to see how the objects populate
[DataSourceProperty(nameof(Objects))]
[ValueConverter(typeof(ObjectTypeValueConverter))]
[Persistent][RuleRequiredField]
public ObjectType Object {
get => _object;
set => SetPropertyValue(nameof(Object), ref _object, value);
}
[Browsable(false)]
public IList<ObjectType> Objects
=> ((IModelJobSchedulerNotification)CaptionHelper.ApplicationModel
.ToReactiveModule<IModelReactiveModulesJobScheduler>().JobScheduler).Notification.Types
.Select(type => new ObjectType(type.Type.TypeInfo.Type) {Name = type.Type.Caption}).ToArray();
Once again thank you for your support. I have this attributes in one object not listed:
there are detailed docs https://github.com/eXpandFramework/Reactive.XAF/tree/master/src/Modules/JobScheduler.Notification
is your type there?
Exception occurs after trigger Execute Action Job :
System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'Xpand.XAF.Modules.JobScheduler.Hangfire.BusinessObjects.ExecuteActionJob' to type 'Xpand.XAF.Modules.JobScheduler.Hangfire.Notification.BusinessObjects.ObjectStateNotification'. Source=Xpand.XAF.Modules.JobScheduler.Notification StackTrace: at Xpand.XAF.Modules.JobScheduler.Hangfire.Notification.NotificationService.<>c__DisplayClass4_0.b__1(IObjectSpace objectSpace) in C:\Users\ricardo\Desktop\grupolcsigo\JobScheduler.Notification\NotificationService.cs:line 58
at System.Reactive.Linq.ObservableImpl.Using`2..Run(Using`2 parent)