I've the same opinion as you and I'm facing a problem in invoking the assignment handler through taskinstance.end(). Its that while token.signal() invokes the assignment handler class taskinstance .end does not.
can any one explain me.
Why should ending a task activate an assignmenthandler? The task is finished and noone has to act upon it. Ending a task does not automatically mean that the tasknode is completed. It could be that there are more tasks in the same tasknode. Depending on the configuration of the tasknode (should it wait for all tasks to finish, or continue if one is finished) the tasknode is completed (token internally signalled) and progressed to the next node. (it is all in the javadoc on the code...)
That next node can have an assignmenthandler which will be called then.
So ending a task, signalling a specific token and signalling the processInstance (which signals the token of the current node according to the comments, but it signals the rootToken) all do different things.
afaik, the docs are clear on this, but if they aren't, please point us to the ommissions.