This is a follow up of https://github.com/serverlessworkflow/sdk-java/issues/359. The purpose is to add validation besides the one provided by the generator.