Beispiel #1
0
        protected internal virtual void ScheduleEventAsync(object payload)
        {
            EventSubscriptionJobDeclaration asyncDeclaration = JobDeclaration;

            if (asyncDeclaration == null)
            {
                // fallback to sync if we couldn't find a job declaration
                ProcessEventSync(payload);
            }
            else
            {
                MessageEntity  message        = asyncDeclaration.CreateJobInstance(this);
                CommandContext commandContext = context.Impl.Context.CommandContext;
                commandContext.JobManager.Send(message);
            }
        }
Beispiel #2
0
        protected internal virtual void scheduleEventAsync(object payload, object payloadLocal, string businessKey)
        {
            EventSubscriptionJobDeclaration asyncDeclaration = JobDeclaration;

            if (asyncDeclaration == null)
            {
                // fallback to sync if we couldn't find a job declaration
                processEventSync(payload, payloadLocal, businessKey);
            }
            else
            {
                MessageEntity  message        = asyncDeclaration.createJobInstance(this);
                CommandContext commandContext = Context.CommandContext;
                commandContext.JobManager.send(message);
            }
        }