Skip to content

feat(workflow): decode resumed inputs by type - #1986

Open
zhangxiangnan wants to merge 1 commit into
google:mainfrom
zhangxiangnan:feat/typed-resume-input
Open

zhangxiangnan wants to merge 1 commit into
google:mainfrom
zhangxiangnan:feat/typed-resume-input

Conversation

@zhangxiangnan

@zhangxiangnan zhangxiangnan commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Rerunning FunctionNode bodies currently read resumed answers as raw objects. Add FunctionNodes.resumeInput overloads for Class<T> and TypeReference<T> to decode those answers with the existing workflow port rules, including conversion from JSON maps to records and generic collections.

A missing interrupt answer raises IllegalStateException; a present null remains null for reference types and is rejected for primitive types. Document typed resume reads and cover them in the existing FunctionNodeTest.

The request/resume/rerun tests verify typed record conversion, a null answer continuing to the successor without asking again, and an invalid answer failing with the expected NodeInputValidationException type and message before the successor executes. Direct helper tests also cover generic answers, missing answers, and null primitive answers.

Testing

  • ./mvnw -o -Daether.syncContext.named.factory=noop -pl core -Dtest=FunctionNodeTest test-compile surefire:test@basic — 366 tests passed, 0 failures, 0 errors, 0 skipped.
  • git diff HEAD^ --check — passed.

The full core suite was not rerun for this update.

@zhangxiangnan
zhangxiangnan force-pushed the feat/typed-resume-input branch from 4d5ace6 to 3651a64 Compare December 2, 2026 03:53
@zhangxiangnan
zhangxiangnan force-pushed the feat/typed-resume-input branch from 3651a64 to 3645b0d Compare December 2, 2026 12:18
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.

1 participant