Custom handlers types
The settings fragment should derive from FormComponentBase and implement LoadData and StoreData.
The handler XML node is passed as 'this->node' to the FormComponentBase
You should use a 'managedtask' for processing form results wherever possible, as this reduces the chances for form submissions to fail due to errors in your task handling. Managedtasks are also easier to restart/debug than online processing.
To link up a form handler to a managed task, add a handlertask attribute to its <formhandler> node in the formdef.xsd, set up a managedtask in the moduledefinition, and make sure your implementation derives from FormHandlerTaskBase (not ManagedTaskBase or FormHandlerBase)
Last but not least, you may need to add a <formhandler> to your form's apply rule (or to a <to type="all"> rule)