Skip to content

Java data-handling reference could mention Jackson computed getter pitfall #71

Description

@donald-pinckney

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions