public boolean isFlowRunning ( String flowName , String flowGroup ) { List < FlowStatus > flowStatusList = getLatestFlowStatus ( flowName , flowGroup , 1 ) ; if ( flowStatusList == null || flowStatusList . isEmpty ( ) ) { return false ; } else { FlowStatus flowStatus = flowStatusList . get ( 0 ) ; Iterator < JobStatus > jobStatusIterator = flowStatus . getJobStatusIterator ( ) ; while ( jobStatusIterator . hasNext ( ) ) { JobStatus jobStatus = jobStatusIterator . next ( ) ; if ( isJobRunning ( jobStatus ) ) { return true ; } } return false ; } }
Return true if another instance of a flow is running . A flow is determined to be in the RUNNING state if any of the jobs in the flow are in the RUNNING state .