temporalio / temporalio/skill-temporal-developer
Java data-handling reference could mention Jackson computed getter pitfall
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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