Seems like the issue is that content variable is not set. When you look at the exception:
freemarker.core.InvalidReferenceException: Expression reason is undefined on line
it refers to the reason expression that should be inside content variable and content should be set as variable when self evaluation user task is created (with onEntry-script). Could you take a look at server log if there are any exceptions when process enters self evaluation user task?