It depends. If you use userTask, you have to register the handler with name "Human Task", for example:
session.getWorkItemManager().registerWorkItemHandler("Human Task",new CommandBasedWSHumanTaskHandler(session));
If you will make your custom task, you have to specify the name in the bmpn and when registering.
Demian