How to add new states to a task lifecycle

Hi a default task will support Complete as one of the action. Any configuration with outcomes essentially mean that task is being complete with certain outcome.

My question is to add new state to a process such as onHold. Or a action to a task such as Send mail. Basiaccly a custom action on a task instance which would be available on a task instance

Is this provision a built in feature or needs to be added by customizing flowable code?. Need a way to acheive this