Plugin Best Practice
- Fail fast on configuration errors. If it's possible to detect user errors in configuration, schema incompatibility they should be handled during onConfigure() method.
- Every plugin if possible should add the ability to specify how to handle error in record processing.
- They should provide three options as follows:
- Skip error (id: skip-error),
- Send to error port (id: send-to-error-port),
- Fail pipeline (id: fail-pipeline)
- The radio button layout should be of 'block' type
- This should be in a separate group called "Error Handling" of configuration
- Example
- JSON configuration
{
"label" : "Error Handling",
"properties" : [
{
"name": "on-error",
"label": "On Record Error",
"widget-type": "radio-group",
"widget-attributes": {
"layout": "block",
"default": "skip-error",
"options": [
{
"id": "skip-error",
"label": "Skip error"
},
{
"id": "send-to-error-port",
"label": "Send to error port"
},
{
"id": "fail-pipeline",
"label": "Fail pipeline"
}
]
}
}
]
}
- They should provide three options as follows:
- Support all types supported by destination. Do not compromise here.
- Support all types supported by source. Do not compromise here.