fix bug 451629 and created unit test for cancel status to output error
on document object


Signed-off-by: sguan <sguan@actuate.com>
Merge pull request #34 from sguan-actuate/master

fix bug 451629 and created unit test for cancel status to output error