"I could send a final sendmal command but then i need a deployment username variable." yes that was my first thought but without the username of the deployment user, i can´t get to work.
i consider to check the taskid and the corresponding deployment user with a sql query.