src/org/worklang/execution/ExecutionInstructionState.java
/**
	 *  Inspect instruction and determine its state
	 */
Inspect instruction and determine its state
Inspect instruction and determine its state
public void update() {
		clear();
		instruction.getInputs().forEach(state->{
			if (state.getInstance() == null) {
				unresolvedInputs.add(state);
			}
		});
		if (unresolvedInputs.size() > 0) {
			isInputResolved = false;
		}else {
			isInputResolved = true;
		}
		instruction.getOutputs().forEach(state->{
			if(state.getInstance() == null) {
				unresolvedOutputs.add(state);
			}
		});
		if (unresolvedOutputs.size() > 0) {
			isOutputResolved = false;
		}else {
			isOutputResolved = true;
		}
		instruction.getTransitions().forEach(transition->{
			if (transition.getInstance() ==  null) {
				unresolvedTransitions.add(transition);
			}
		});
		if (unresolvedTransitions.size() > 0) {
			areTransitionsResolved = false;
		}else {
			areTransitionsResolved = true;
		}
	}
public void update ( ) { clear ( ) ; instruction . getInputs ( ) . forEach ( state -> { if ( state . getInstance ( ) == null ) { unresolvedInputs . add ( state ) ; } } ) ; if ( unresolvedInputs . size ( ) > 0 ) { isInputResolved = false ; } else { isInputResolved = true ; } instruction . getOutputs ( ) . forEach ( state -> { if ( state . getInstance ( ) == null ) { unresolvedOutputs . add ( state ) ; } } ) ; if ( unresolvedOutputs . size ( ) > 0 ) { isOutputResolved = false ; } else { isOutputResolved = true ; } instruction . getTransitions ( ) . forEach ( transition -> { if ( transition . getInstance ( ) == null ) { unresolvedTransitions . add ( transition ) ; } } ) ; if ( unresolvedTransitions . size ( ) > 0 ) { areTransitionsResolved = false ; } else { areTransitionsResolved = true ; } }
Inspect instruction and determine its state
Inspect instruction and determine its state
//Inspect inputs and update flag //Inspect outputs //Inspect transitions