Merge branch 'NIFI-1676'

This commit is contained in:
Mark Payne 2016-03-23 12:14:35 -04:00
commit e4b7e47836
1 changed files with 3 additions and 2 deletions

View File

@ -1117,8 +1117,9 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable
@Override
public void verifyCanStart(final Set<ControllerServiceNode> ignoredReferences) {
if (this.getScheduledState() == ScheduledState.RUNNING) {
throw new IllegalStateException(this + " cannot be started because it is already running");
final ScheduledState currentState = getPhysicalScheduledState();
if (currentState != ScheduledState.STOPPED && currentState != ScheduledState.DISABLED) {
throw new IllegalStateException(this + " cannot be started because it is not stopped. Current state is " + currentState.name());
}
verifyNoActiveThreads();