}
public Map<String, Object> execute(Environment environment) throws Exception {
Map<String, Object> variables = new HashMap<String, Object>();
DbSession dbSession = environment.get(DbSession.class);
TaskImpl task = dbSession.get(TaskImpl.class, Long.parseLong(taskId));
for (String variableName : variableNames) {
Object value = task.getVariable(variableName);
variables.put(variableName, value);
}