I have a custom template for a service task that takes several inputs (sender, recipient, subject, body etc), with the subject and body using camunda’s built-in velocity template. The problem is when a user only inputs a token ${token} in one of the velocity fields with no other text and a process variable with that name does not exist, the workflow crashes with a ProcessEngineException, but if the input is preceded by other text, for example “text ${token}” as opposed to “${token}” the workflow runs fine and will simply send an email saying “text ${token}”.
Here is a snippet of the json for the custom template:
Here is the a snippet of the stack trace for the ProcessEngineException in camunda: