code: @Override
      public void create(TaskRecord taskRecord) throws Exception {
          Task task = new Task(taskRecord);
          EntityManager em = getPersistenceServiceUnit().createEntityManager();
          try {
              em.persist(task);
              em.flush();
              taskRecord.setId(task.ID);
          } finally {
              em.close();
          }
      }
docs: Create an entry in the persistent store for a new task.
  
  @param taskRecord information about the persistent task
  @throws Exception if an error occurs when attempting to update the persistent task store.