I want to start a Workflow function with some parameters (one String and one LocalDateTime). I would like to encapsulate these parameters in a Java Record (which also implements Serializable), but when I try to invoke the Workflow Function via WorkflowClient.start( () -> myWorkflow.myWorkflowFunction(myWorkflowParameters)), “myWorkflowParameters” gets initialized as a new instance with null fields. Am I missing something here? Why isn’t myWorkflowFunction being called with the parameters I pass in, or at the very least a deep copy?
Hi @samf
you should be able to use a record type as a parameter object.
Could you share a small reproduction of the issue?
Antonio
Thanks for the reply. It was an issue with the serialization of some of the fields (I think because we provided a custom object mapper) and I solved it by adding @JsonProperty annotations