Skip to content

Conversation

@cgillum
Copy link
Member

@cgillum cgillum commented Oct 11, 2024

Fixes #178

This updates the SQL-based terminate logic to handle the case where users try to terminate scheduled orchestrations. We can't use the previous approach of sending an ExecutionTerminated message because DTFx doesn't know how to handle the case where this message is received and there is no orchestration state (you end up with a repeating NullReferenceException until the scheduled orchestration actually starts).

This PR also includes an integration test for this scenario.

return historyEvent.EventType switch
{
EventType.ExecutionStarted => ((ExecutionStartedEvent)historyEvent).Version,
EventType.SubOrchestrationInstanceCreated => ((SubOrchestrationInstanceCreatedEvent)historyEvent).Version,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated fix that I happened to notice independently. I'm just adding it to this PR as a convenience since it's a small change.

@lilyjma
Copy link
Member

lilyjma commented Feb 26, 2025

@cgillum /@bachuv - Just bringing this up on your radar again in case it's a small item that can be wrapped up quickly. I think two customers have reported this issue.

@sophiatev sophiatev merged commit d48539e into main Oct 23, 2025
5 checks passed
@sophiatev sophiatev deleted the cgillum/fix178 branch October 23, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminate Pending orchestration

5 participants