I found the problem, there was a typo when calling the event from the task. I corrected it and it worked.


View solution in original post