Question: Wishlist #8 Validating Task inputKeys and outputKeys
See original GitHub issueI was hoping I would be able to contribute to this open source project, and I wanted to ask if what I had planned for the validation would be enough or was there more to the validation that was intended for this. What I had planned is simply adding a @NotEmpty(message = "")
On the inputkeys and outputKeys fields on TaskDef.java file.My reasoning for doing something so simple is because in your documentation on the fourth bullet point it states that
In the future, this can be extended to be a strict template that all task implementations must adhere to …
My understanding was that users creating tasks would need to have these fields populated to be able to document what is needed for a task to be run and what you can expect it to output once finished, making it easier for re-use. Looking forward to your response, Thank you.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
I would think that using something more flexible than an annotation on the classes would be required for input/output keys, as they’re dynamic to each task defined in the system. Using JSON Schema or having a way to describe validation requirements on the task def (or in the workflow def) would make this much more flexible.
For our custom implemented tasks, we validate task inputs in the
start
and/orexecute
methods. A few times we’ve created a data validation tasks that sit between two ‘real’ tasks in the workflow for this very purpose as well.Hello @cclulu, Me and my team, we are currently using JSON schema to make validation possible on some inputs. And my feedback is really positive. Allow to describe workflow inputs and task inputs with JSON schema, can give the possibility to perform a wide and deep validation, on types, constraints and even conditional dependencies among inputs.