public static void validateStatusAtInstanceRestart ( long jobInstanceId , Properties restartJobParameters ) throws JobRestartException , JobExecutionAlreadyCompleteException { IPersistenceManagerService iPers = ServicesManagerStaticAnchor . getServicesManager ( ) . getPersistenceManagerService ( ) ; WSJobInstance jobInstance = iPers . getJobInstance ( jobInstanceId ) ; Helper helper = new Helper ( jobInstance , restartJobParameters ) ; if ( ! StringUtils . isEmpty ( jobInstance . getJobXml ( ) ) ) { helper . validateRestartableFalseJobsDoNotRestart ( ) ; } helper . validateJobInstanceFailedOrStopped ( ) ; }
validates job is restart - able validates the jobInstance is in failed or stopped