ExternalTask (Task task) { if (task == null) return null; DefaultExternalTask externalTask = new DefaultExternalTask(); externalTask.setDescription(task.getDescription()); externalTask.setGroup(task.getGroup()); externalTask.setName(task.getName()); externalTask.setQName(task.getPath()); //externalTask.setType(task.); return externalTask; }