You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one of my orchestrations a timer gets based on a date specified in the orchestration input object. This date sometimes needs to be updated after the orchestration has started. I am currently trying to implement an event that cancels the existing timer and creates a new timer with the updated date.
I am able to cancel the existing timer successfully and also I am able to set a new timer but the new timer does not seem to be firing.
my onEvent method in my orchestration finds the required event handler based on the input and then calls the HandleProcess method.
The date change event handler HandleProcess method cancels the current timer and schedules a new timer
publicCustomOrchestrationStateHandleProcess<T>(Tinput){EventHandlerInputcustomInput=(inputasEventHandlerInput);if(!customInput.CustomOrchestrationState.AllowActionDateChange){//date change not allowedthrownewException();}DateTimenewDate=newDateTime();try{newDate=Convert.ToDateTime(customInput.EventInput);}catch(Exceptionex){//Invalid Date format}CancellationTokenSourcenewToken=newCancellationTokenSource();customInput.OrchestrationContext.CreateTimer(newDate,customInput,newToken.Token);customInput.CustomOrchestrationState.TimerCancelationToken?.Dispose();CancelCurrentTimer(customInput.CustomOrchestrationState);customInput.CustomOrchestrationState.ActionDate=newDate;customInput.CustomOrchestrationState.TimerCancelationToken=newToken;returncustomInput.CustomOrchestrationState;}
In the SQL database I can see that the new timer is created but the orchestration seems to stay stuck when the new timer should have fired.
Is this behavior expected or is it a bug? Any suggestions on how I can debug this issue or any improvements I can implement to get this working.
The text was updated successfully, but these errors were encountered:
In one of my orchestrations a timer gets based on a date specified in the orchestration input object. This date sometimes needs to be updated after the orchestration has started. I am currently trying to implement an event that cancels the existing timer and creates a new timer with the updated date.
I am able to cancel the existing timer successfully and also I am able to set a new timer but the new timer does not seem to be firing.
my onEvent method in my orchestration finds the required event handler based on the input and then calls the HandleProcess method.
The date change event handler HandleProcess method cancels the current timer and schedules a new timer
In the SQL database I can see that the new timer is created but the orchestration seems to stay stuck when the new timer should have fired.
Is this behavior expected or is it a bug? Any suggestions on how I can debug this issue or any improvements I can implement to get this working.
The text was updated successfully, but these errors were encountered: