code: @Override
      public TaskRecord getTrigger(long taskId) throws Exception {
          String find = "SELECT t.OWNR,t.STATES,t.TRIG FROM Task t WHERE t.ID=:i";
  
          final boolean trace = TraceComponent.isAnyTracingEnabled();
          if (trace && tc.isEntryEnabled())
              Tr.entry(this, tc, "getTrigger", taskId, find);
  
          List<Object[]> resultList;
          EntityManager em = getPersistenceServiceUnit().createEntityManager();
          try {
              TypedQuery<Object[]> query = em.createQuery(find.toString(), Object[].class);
              query.setParameter("i", taskId);
              resultList = query.getResultList();
          } finally {
              em.close();
          }
  
          TaskRecord taskRecord;
          if (resultList.isEmpty())
              taskRecord = null;
          else {
              Object[] result = resultList.get(0);
              taskRecord = new TaskRecord(false);
              taskRecord.setIdentifierOfOwner((String) result[0]);
              taskRecord.setState((Short) result[1]);
              taskRecord.setTrigger((byte[]) result[2]);
          }
  
          if (trace && tc.isEntryEnabled())
              Tr.exit(this, tc, "getTrigger", taskRecord);
          return taskRecord;
      }
docs: {@inheritDoc}