Ejemplo n.º 1
0
  public Object executeTask(Object object) throws Exception {
    Map incomingRequest = (Map) object;
    Object ret = null;
    Vendor vendor = (Vendor) incomingRequest.get("vendor");
    if (vendor == null) {
      //	this.setStatus(Status.FAILED);
      //	throw new TsaException("Vendor Entity could not be found!");
    } else {
      this.setStatus(Status.SUCCEEDED);
      ret = vendor.getCurrencyCode();
    }

    return ret;
  }
  public Object executeTask(Object object) throws Exception {
    Map incomingRequest = (Map) object;
    Object result = null;

    try {
      String vendorId = "";

      Vendor vendor = (Vendor) incomingRequest.get("vendor");
      if (vendor != null) {
        vendorId = vendor.getVendorId();
      } else {
        vendorId = HiltonUtility.ckNull((String) incomingRequest.get("Vendor_vendorId"));
      }

      incomingRequest.put("Contact_contactType", "INSURANCE");
      incomingRequest.put("Contact_vendorId", vendorId);

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