Package com.commander4j.messages

Examples of com.commander4j.messages.OutgoingDespatchPreAdvice


              oet.submit(txn);
            }

            if (getLocationDBTo().isDespatchPreAdviceMessageRequired())
            {
              opa = new OutgoingDespatchPreAdvice(getHostID(), getSessionID());
              opa.submit(txn);
            }
          }
          setErrorMessage("");
          result = true;
View Full Code Here


              odc = null;
            }

            if (transactionType.equals("Despatch Pre Advice"))
            {
              OutgoingDespatchPreAdvice opa = new OutgoingDespatchPreAdvice(Common.selectedHostID, Common.sessionID);
              opa.submit(Long.valueOf(messageRef));
              errorMessage.setText(opa.getErrorMessage());
              opa = null;
            }

            if (transactionType.equals("Equipment Tracking"))
            {
View Full Code Here

      JeMail mail = new JeMail(getHostID(), getSessionID());
      JDBInterfaceRequest ir = new JDBInterfaceRequest(getHostID(), getSessionID());
      JDBInterface inter = new JDBInterface(getHostID(), getSessionID());
      OutgoingProductionDeclarationConfirmation opdc = new OutgoingProductionDeclarationConfirmation(getHostID(), getSessionID());
      OutgoingDespatchConfirmation odc = new OutgoingDespatchConfirmation(getHostID(), getSessionID());
      OutgoingDespatchPreAdvice opa = new OutgoingDespatchPreAdvice(getHostID(), getSessionID());
      OutgoingEquipmentTracking oet = new OutgoingEquipmentTracking(getHostID(), getSessionID());
      OutgoingPalletStatusChange psc = new OutgoingPalletStatusChange(getHostID(), getSessionID());
      OutgoingPalletSplit ops = new OutgoingPalletSplit(getHostID(), getSessionID());
      OutgoingPalletDelete opd = new OutgoingPalletDelete(getHostID(), getSessionID());
      OutgoingLabelData old = new OutgoingLabelData(getHostID(), getSessionID());
      LinkedList<Long> irqList = new LinkedList<Long>();
      int noOfMessages = 0;

      while (true)
      {

        JWait.milliSec(500);

        if (allDone)
        {
          if (dbconnected)
          {
            Common.hostList.getHost(hostID).disconnect(getSessionID());
          }
          return;
        }

        irqList.clear();
        irqList = ir.getInterfaceRequestIDs();
        noOfMessages = irqList.size();

        if (noOfMessages > 0)
        {
          for (int x = 0; x < noOfMessages; x++)
          {
            JWait.milliSec(100);
            ir.setInterfaceRequestID(irqList.get(x));
            ir.getInterfaceRequestProperties();

            if (ir.getMode().equals("Inbound File Re-Submit"))
            {
              if (inter.getInterfaceProperties(ir.getInterfaceType(), "Input") == true)
              {
                String sourceFile = Common.base_dir + java.io.File.separator + "xml" + java.io.File.separator + "interface" + java.io.File.separator + "error" + java.io.File.separator + ir.getInterfaceType() + java.io.File.separator
                    + ir.getFilename();

                destinationFile = inter.getRealPath() + java.io.File.separator + ir.getFilename();
                renamedDestinationFile = inter.getRealPath() + java.io.File.separator + ir.getFilename().replaceAll(".xml", ".lmx");

                mover.move_File(sourceFile, renamedDestinationFile);
                mover.move_File(renamedDestinationFile, destinationFile);
                ir.delete();

              }
            }

            if (ir.getMode().equals("Normal"))
            {

              errorMessage = "Unknown Outbound Interface Type :" + ir.getInterfaceType();
              messageProcessedOK = false;

              if (ir.getInterfaceType().equals("Production Declaration"))
              {
                messageProcessedOK = opdc.processMessage(ir.getTransactionRef());
                errorMessage = opdc.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Production Declaration", messageProcessedOK.toString());
              }

              if (ir.getInterfaceType().equals("Pallet Status Change"))
              {
                messageProcessedOK = psc.processMessage(ir.getTransactionRef());
                errorMessage = psc.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Pallet Status Change", messageProcessedOK.toString());
              }             

              if (ir.getInterfaceType().equals("Pallet Split"))
              {
                messageProcessedOK = ops.processMessage(ir.getTransactionRef());
                errorMessage = ops.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Pallet Split", messageProcessedOK.toString());
             
             
              if (ir.getInterfaceType().equals("Pallet Delete"))
              {
                messageProcessedOK = opd.processMessage(ir.getTransactionRef());
                errorMessage = opd.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Pallet Delete", messageProcessedOK.toString());
             
             
              if (ir.getInterfaceType().equals("Despatch Confirmation"))
              {
                messageProcessedOK = odc.processMessage(ir.getTransactionRef());
                errorMessage = odc.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Despatch Confirmation", messageProcessedOK.toString());
              }

              if (ir.getInterfaceType().equals("Despatch Pre Advice"))
              {
                messageProcessedOK = opa.processMessage(ir.getTransactionRef());
                errorMessage = opa.getErrorMessage();
                GenericMessageHeader.updateStats("Output","Despatch Pre Advice", messageProcessedOK.toString());
              }

              if (ir.getInterfaceType().equals("Equipment Tracking"))
              {
View Full Code Here

              odc = null;
            }

            if (transactionType.equals("Despatch Pre Advice"))
            {
              OutgoingDespatchPreAdvice opa = new OutgoingDespatchPreAdvice(Common.selectedHostID, Common.sessionID);
              opa.submit(Long.valueOf(messageRef));
              errorMessage.setText(opa.getErrorMessage());
              opa = null;
            }

            if (transactionType.equals("Equipment Tracking"))
            {
View Full Code Here

    {
      Long txn = desp.getTransactionRef();
      LinkedList<String> assignedList = new LinkedList<String>();
      JDBPallet pal = new JDBPallet(getHost(),getSession());
      OutgoingDespatchConfirmation odc;
      OutgoingDespatchPreAdvice opa;
      OutgoingEquipmentTracking oet;
     
      assignedList.clear();
      assignedList.addAll(desp.getAssignedSSCCs());
     
      for (int j = 0; j < assignedList.size(); j++)
      {
        if (pal.getPalletProperties(assignedList.get(j)))
        {
          logger.debug("Background confirmation processing SSCC="+assignedList.get(j));
          pal.writePalletHistory(txn, "DESPATCH", "FROM");
          pal.setLocationID(desp.getLocationIDTo());
          pal.updateLocationID();
          pal.writePalletHistory(txn, "DESPATCH", "TO");
        }
      }
     
      pal = null;

      if (desp.getLocationDBTo().isDespatchConfirmationMessageRequired())
      {
        logger.debug("Background confirmation requesting Despatch Confirmation.");
        odc = new OutgoingDespatchConfirmation(getHost(),getSession());
        odc.submit(txn);
        odc = null;
      }

      if (desp.getLocationDBTo().isDespatchEquipmentTrackingMessageRequired())
      {
        logger.debug("Background confirmation requesting Equipment Tracking.");
        oet = new OutgoingEquipmentTracking(getHost(),getSession());
        oet.submit(txn);
        oet = null;
      }

      if (desp.getLocationDBTo().isDespatchPreAdviceMessageRequired())
      {
        logger.debug("Background confirmation requesting Pre Advice.");
        opa = new OutgoingDespatchPreAdvice(getHost(),getSession());
        opa.submit(txn);
        opa = null;
      }
     
    }
    logger.debug("Background confirmation finished.");
View Full Code Here

              }

              if (getLocationDBTo().isDespatchPreAdviceMessageRequired())
              {
                logger.debug("Requesting outbound pre-advice message");
                opa = new OutgoingDespatchPreAdvice(getHostID(), getSessionID());
                opa.submit(txn);
              }

              result = true;
View Full Code Here

TOP

Related Classes of com.commander4j.messages.OutgoingDespatchPreAdvice

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.