/**
   * Method executeTask.
   *
   * @author EDSAC inserts values generated only by the system
   * @param object
   *     <p>incomingRequest
   */
  public Object executeTask(Object object) throws Exception {
    Object ret = null;
    try {
      Map incomingRequest = (Map) object;

      ReceiptLine recLine = (ReceiptLine) incomingRequest.get("receiptLine");

      incomingRequest.put("InspectionHeader_icRecLine", recLine.getIcRecLine().toString());
      incomingRequest.put("InspectionHeader_location", recLine.getInspLocation());
      incomingRequest.put("InspectionHeader_area", recLine.getInspArea());
      incomingRequest.put("InspectionHeader_storage", recLine.getInspStorage());

      this.setStatus(Status.SUCCEEDED);
    } catch (Exception e) {
      Log.error(this, e.toString());
      this.setStatus(Status.FAILED);
    }
    return ret;
  }
  /* (non-Javadoc)
   * @see com.tsagate.puridiom.process.ITask#executeTask(java.lang.Object)
   */
  public Object executeTask(Object object) throws Exception {

    Map incomingRequest = (Map) object;

    try {
      String assignTo = (String) incomingRequest.get("assignToEngine");
      String userTimeZone = (String) incomingRequest.get("userTimeZone");

      incomingRequest.put("ReceiptLine_engineerAssigned", assignTo);
      incomingRequest.put("ReceiptLine_receiptDate", Dates.today("", userTimeZone)); // check
      incomingRequest.put("historyStatus", HistoryStatus.ENGINEER_ASSIGNMENT);
      ReceiptLine receiptLine = (ReceiptLine) incomingRequest.get("receiptLine");
      if (receiptLine != null) {
        incomingRequest.put(
            "ReceiptHeader_icRecHeader", String.valueOf(receiptLine.getIcRecHeader()));
      }

      this.setStatus(Status.SUCCEEDED);
    } catch (Exception e) {
      this.setStatus(Status.FAILED);
      throw e;
    }
    return null;
  }