code: public Task task(String name, PrimaryWorkitem primaryWorkitem, Map<String, Object> attributes) {
          Task task = new Task(instance);
  
          task.setName(name);
          task.setParent(primaryWorkitem);
          addAttributes(task, attributes);
          task.save();
          return task;
      }
docs: Create a new Task with a name. Assign it to the given primary workitem.
  
  @param name            The initial name of the task.
  @param primaryWorkitem The PrimaryWorkitem this Task will belong to.
  @param attributes      additional attributes for the Task.
  @return A newly minted Task that exists in the VersionOne system.