This tutorial will walk you through the steps involved in creating custom workflow component.
You will need the following:
A working instance of AEM with Form Add-on package installed
Write your custom java code by implementing WorkflowProcess interface