Actually the object passed to the task is the task ouput, so you should write (Long taskOutput, worlflowContext, taskContextData) and avoid the call to output(taskContextData, Long.class);`
@mcruzdev please make sure the usage docs CLEARLY reflec this
Originally posted by @fjtirado in #1213 (comment)