@@ -37,7 +37,6 @@ public void CreateSchedule(TaskEntityContext context, ScheduleCreationOptions sc
3737 throw new ScheduleInvalidTransitionException ( scheduleCreationOptions ? . ScheduleId ?? string . Empty , this . State . Status , ScheduleStatus . Active , nameof ( this . CreateSchedule ) ) ;
3838 }
3939
40- // CreateSchedule is allowed, we shall throw exception if any following step failed to inform caller
4140 if ( scheduleCreationOptions == null )
4241 {
4342 throw new ScheduleClientValidationException ( string . Empty , "Schedule creation options cannot be null" ) ;
@@ -55,7 +54,7 @@ public void CreateSchedule(TaskEntityContext context, ScheduleCreationOptions sc
5554 }
5655 catch ( ScheduleInvalidTransitionException scheduleInvalidTransitionEx )
5756 {
58- // this.logger.ScheduleOperationError(ex .ScheduleId, nameof(this.CreateSchedule), ex .Message, ex );
57+ this . logger . ScheduleOperationError ( scheduleCreationOptions ? . ScheduleId ?? string . Empty , nameof ( this . CreateSchedule ) , scheduleInvalidTransitionEx . Message , scheduleInvalidTransitionEx ) ;
5958 this . State . AddActivityLog ( nameof ( this . CreateSchedule ) , ScheduleOperationStatus . Failed . ToString ( ) , new FailureDetails
6059 {
6160 Reason = scheduleInvalidTransitionEx . Message ,
@@ -66,7 +65,7 @@ public void CreateSchedule(TaskEntityContext context, ScheduleCreationOptions sc
6665 }
6766 catch ( ScheduleClientValidationException scheduleClientValidationEx )
6867 {
69- // this.logger.ScheduleOperationError(ex .ScheduleId, nameof(this.CreateSchedule), ex .Message, ex );
68+ this . logger . ScheduleOperationError ( scheduleCreationOptions ? . ScheduleId ?? string . Empty , nameof ( this . CreateSchedule ) , scheduleClientValidationEx . Message , scheduleClientValidationEx ) ;
7069 this . State . AddActivityLog ( nameof ( this . CreateSchedule ) , ScheduleOperationStatus . Failed . ToString ( ) , new FailureDetails
7170 {
7271 Reason = scheduleClientValidationEx . Message ,
@@ -147,7 +146,7 @@ public void UpdateSchedule(TaskEntityContext context, ScheduleUpdateOptions sche
147146 }
148147 catch ( ScheduleInvalidTransitionException scheduleInvalidTransitionEx )
149148 {
150- // this.logger.ScheduleOperationError(ex. ScheduleId, nameof(this.UpdateSchedule), ex .Message, ex );
149+ this . logger . ScheduleOperationError ( this . State . ScheduleConfiguration ? . ScheduleId ?? string . Empty , nameof ( this . UpdateSchedule ) , scheduleInvalidTransitionEx . Message , scheduleInvalidTransitionEx ) ;
151150 this . State . AddActivityLog ( nameof ( this . UpdateSchedule ) , ScheduleOperationStatus . Failed . ToString ( ) , new FailureDetails
152151 {
153152 Reason = scheduleInvalidTransitionEx . Message ,
@@ -158,7 +157,7 @@ public void UpdateSchedule(TaskEntityContext context, ScheduleUpdateOptions sche
158157 }
159158 catch ( ScheduleClientValidationException scheduleClientValidationEx )
160159 {
161- // this.logger.ScheduleOperationError(ex. ScheduleId, nameof(this.UpdateSchedule), ex .Message, ex );
160+ this . logger . ScheduleOperationError ( this . State . ScheduleConfiguration ? . ScheduleId ?? string . Empty , nameof ( this . UpdateSchedule ) , scheduleClientValidationEx . Message , scheduleClientValidationEx ) ;
162161 this . State . AddActivityLog ( nameof ( this . UpdateSchedule ) , ScheduleOperationStatus . Failed . ToString ( ) , new FailureDetails
163162 {
164163 Reason = scheduleClientValidationEx . Message ,
@@ -205,7 +204,7 @@ public void PauseSchedule(TaskEntityContext context)
205204 }
206205 catch ( ScheduleInvalidTransitionException scheduleInvalidTransitionEx )
207206 {
208- // this.logger.ScheduleOperationError(ex. ScheduleId, nameof(this.PauseSchedule), ex .Message, ex );
207+ this . logger . ScheduleOperationError ( this . State . ScheduleConfiguration ? . ScheduleId ?? string . Empty , nameof ( this . PauseSchedule ) , scheduleInvalidTransitionEx . Message , scheduleInvalidTransitionEx ) ;
209208 this . State . AddActivityLog ( nameof ( this . PauseSchedule ) , ScheduleOperationStatus . Failed . ToString ( ) , new FailureDetails
210209 {
211210 Reason = scheduleInvalidTransitionEx . Message ,
@@ -216,7 +215,7 @@ public void PauseSchedule(TaskEntityContext context)
216215 }
217216 catch ( ScheduleClientValidationException scheduleClientValidationEx )
218217 {
219- // this.logger.ScheduleOperationError(ex. ScheduleId, nameof(this.PauseSchedule), ex .Message, ex );
218+ this . logger . ScheduleOperationError ( this . State . ScheduleConfiguration ? . ScheduleId ?? string . Empty , nameof ( this . PauseSchedule ) , scheduleClientValidationEx . Message , scheduleClientValidationEx ) ;
220219 this . State . AddActivityLog ( nameof ( this . PauseSchedule ) , ScheduleOperationStatus . Failed . ToString ( ) , new FailureDetails
221220 {
222221 Reason = scheduleClientValidationEx . Message ,
@@ -264,7 +263,7 @@ public void ResumeSchedule(TaskEntityContext context)
264263 }
265264 catch ( ScheduleInvalidTransitionException scheduleInvalidTransitionEx )
266265 {
267- // this.logger.ScheduleOperationError(ex. ScheduleId, nameof(this.ResumeSchedule), ex .Message, ex );
266+ this . logger . ScheduleOperationError ( this . State . ScheduleConfiguration ? . ScheduleId ?? string . Empty , nameof ( this . ResumeSchedule ) , scheduleInvalidTransitionEx . Message , scheduleInvalidTransitionEx ) ;
268267 this . State . AddActivityLog ( nameof ( this . ResumeSchedule ) , ScheduleOperationStatus . Failed . ToString ( ) , new FailureDetails
269268 {
270269 Reason = scheduleInvalidTransitionEx . Message ,
@@ -275,7 +274,7 @@ public void ResumeSchedule(TaskEntityContext context)
275274 }
276275 catch ( ScheduleClientValidationException scheduleClientValidationEx )
277276 {
278- // this.logger.ScheduleOperationError(ex. ScheduleId, nameof(this.ResumeSchedule), ex .Message, ex );
277+ this . logger . ScheduleOperationError ( this . State . ScheduleConfiguration ? . ScheduleId ?? string . Empty , nameof ( this . ResumeSchedule ) , scheduleClientValidationEx . Message , scheduleClientValidationEx ) ;
279278 this . State . AddActivityLog ( nameof ( this . ResumeSchedule ) , ScheduleOperationStatus . Failed . ToString ( ) , new FailureDetails
280279 {
281280 Reason = scheduleClientValidationEx . Message ,
0 commit comments