temporalio / temporalio/skill-temporal-developer

Java data-handling reference could mention Jackson computed getter pitfall

Open Beginner friendly
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
220
Forks
30
Avg merge
22h 21m
Merged PRs (30d)
14

Description

Context

When building a Java Temporal application, I created a POJO with a computed getter (getTotalPrice() derived from
quantity * pricePerUnit) used as a workflow parameter. Jackson serialized the computed property into the payload, but
deserialization failed with UnrecognizedPropertyException because there was no corresponding field or setter.

This caused a WorkflowTask processing failure that stuck the workflow until the POJO was fixed with @JsonIgnore.

Suggestion

Add a brief note to references/java/data-handling.md (e.g., in the Best Practices section or near the Jackson
Integration section) mentioning that:

  • POJOs used as workflow/activity parameters are serialized via Jackson's default ObjectMapper
  • Computed getters (getters without a corresponding field/setter) will be serialized but fail on deserialization
  • Use @JsonIgnore on computed getters, or ensure all getters have matching setters

This is standard Jackson behavior, but it's easy to trip over in the Temporal context since the serialization error
surfaces as an opaque WorkflowTask processing failure rather than a compile-time or obvious runtime error.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Update references/java/data-handling.md, starting in the Best Practices or Jackson Integration section. Read the surrounding guidance, then document how computed getters behave during Jackson serialization and deserialization, including the @JsonIgnore or matching-setter remedies. Done means the note clearly explains the WorkflowTask failure context and the recommended fixes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.