Class Starter

java.lang.Object
org.openwms.tms.impl.state.Starter
All Implemented Interfaces:
Startable

@TxService class Starter extends Object implements Startable
A Starter.
Author:
Heiko Scherrer
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • repository

      private final TransportOrderRepository repository
    • locationApi

      private final org.openwms.common.location.api.LocationApi locationApi
    • locationGroupApi

      private final org.openwms.common.location.api.LocationGroupApi locationGroupApi
    • ctx

      private final org.springframework.context.ApplicationContext ctx
    • externalStarter

      @Lazy @Autowired(required=false) private ExternalStarter externalStarter
    • stateManager

      private final StateManager stateManager
  • Constructor Details

    • Starter

      Starter(TransportOrderRepository repository, org.openwms.common.location.api.LocationApi locationApi, org.openwms.common.location.api.LocationGroupApi locationGroupApi, org.springframework.context.ApplicationContext ctx, StateManager stateManager)
  • Method Details

    • start

      @Measured @Transactional(propagation=REQUIRED, noRollbackFor=StateChangeException.class) public void start(String pKey)
      Start the TransportOrder with the given id.
      Specified by:
      start in interface Startable
      Parameters:
      pKey - The persistent key of the TransportOrder to start
    • startNext

      @Measured @Transactional(propagation=REQUIRED, noRollbackFor=StateChangeException.class) public void startNext(String transportUnitBK)
      Start the next TransportOrder for the TransportUnit.
      Specified by:
      startNext in interface Startable
      Parameters:
      transportUnitBK - The business key of the TransportUnit to start
    • triggerStart

      @Measured @Transactional(propagation=REQUIRED, noRollbackFor=StateChangeException.class) public void triggerStart(TransportOrder to)
      Trigger a start of the given TransportOrder.
      Specified by:
      triggerStart in interface Startable
      Parameters:
      to - The TransportOrder instance to start
    • startInternal

      private void startInternal(TransportOrder to)
      Call to start the TransportOrder identified by the information of to.
      Parameters:
      to - At last one of the targets must be present as well as the referring TransportUnitID
      Throws:
      org.ameba.exception.NotFoundException - If input parameters are not valid
      StateChangeException - If it is not allowed to change the TransportOrders state