Ejemplo n.º 1
0
        public override Task ApplyAsync(Guid activityId, CoordinatorContext coordinatorContext)
        {
            coordinatorContext.Validate("coordinatorContext");

            foreach (var job in coordinatorContext.MappedTenantJobs.Values)
            {
                // Avoid logging or doing any processing for jobs that have no actions pending (e.g. completed jobs)
                if (job.PendingActions == ActionType.None)
                {
                    continue;
                }

                var jobId = job.Id;
                var ud    = job.TenantJob.GetJobUD();

                IAllowActionRecord allowAction = allowActionMap.Get(jobId, ud);
                if (allowAction != null)
                {
                    // Allow the user-specified actions
                    job.AllowActions(this.traceType, allowAction.Action);
                }
            }

            return(Task.FromResult(0));
        }