Fixes workflow permission checks on doTransition.
Fixed TaskService: createNotification and createMail both contained wrong message invocation.