Well the following code fixed the problem for me.
engine.getTaskService().setVariables(taskId, variables);
engine.getTaskService().completeTask(taskId);
I just had to create the variables then set them and complete the task afterwards.
best regards,
Rudolf Michael