Skip to content

Conversation

@shijiesheng
Copy link
Member

What changed?

  • add WorkflowInstance
  • workflow class object is constructed once per WorkflowEngine for maintaining state.
  • workflow coroutine is created once on first decision processing inside the DeterministicEventLoop
  • remove not useful unite tests

TODO

  • workflow completion logic isn't correct
  • relay logic isn't correct

Why?

From user perspective, workflow is just a coroutine which should be able to use any event loop APIs. This isn't correct because most I/O are non-deterministic.

Instead, workflow coroutines are running in a DeterministicEventLoop which is a minimal implementation that forbids all I/O operations.

How did you test it?

Unit Test

Potential risks

Release notes

Documentation Changes

Copy link
Member

@timl3136 timl3136 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@shijiesheng shijiesheng merged commit 273f7d0 into cadence-workflow:main Nov 18, 2025
6 checks passed
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.

2 participants