- logger.trace("Waiting for the status is over, returning it");
- // Return the known status, could also be null if didn't return
- return retStatus;
+ if (didFinish) {
+ logger.trace("Waiting for the status is over, returning it");
+ // Return the known status, could also be null if didn't return
+ return retStatus;
+ } else {
+ // No need to bark here as long as this routine could indeed
+ // timeout
+ logger.trace("Timing out, the workStatus for order {} has not come back in time!", this.order);
+ return new Status(StatusCode.TIMEOUT);
+ }