src/org/worklang/execution/Computation.java
/* Returns the instruction that would be executed before the method parameter.
	 * Use this to determine if outputs of the previous instructions match inputs 
	 * for the next instruction.
	 */
Returns the instruction that would be executed before the method parameter.
Use this to determine if outputs of the previous instructions match inputs
for the next instruction.
Returns the instruction that would be executed before the method parameter . Use this to determine if outputs of the previous instructions match inputs for the next instruction .
public ExecutionInstruction executionContext(ExecutionInstruction instruction){
		logger.info("looking for {}", instruction.getId());
		Iterator<ExecutionInstruction> it = executionStack.iterator();
		logger.info("Iterating through the stack");
		while (it.hasNext()) {
			ExecutionInstruction curr = it.next();
			logger.info("Instruction -> {}", curr);
			if (curr.getId().equals(instruction.getId())) {
				if (it.hasNext()) {
					return it.next();
				}else {
					logger.error("Stack is empty, context not found!");
				}
			}
		}
		logger.error("Could not find insturction in execution stack!");
		return null;
	}
public ExecutionInstruction executionContext ( ExecutionInstruction instruction ) { logger . info ( "looking for {}" , instruction . getId ( ) ) ; Iterator < ExecutionInstruction > it = executionStack . iterator ( ) ; logger . info ( "Iterating through the stack" ) ; while ( it . hasNext ( ) ) { ExecutionInstruction curr = it . next ( ) ; logger . info ( "Instruction -> {}" , curr ) ; if ( curr . getId ( ) . equals ( instruction . getId ( ) ) ) { if ( it . hasNext ( ) ) { return it . next ( ) ; } else { logger . error ( "Stack is empty, context not found!" ) ; } } } logger . error ( "Could not find insturction in execution stack!" ) ; return null ; }
Returns the instruction that would be executed before the method parameter.
Returns the instruction that would be executed before the method parameter .
//SimpleEntry<UUID,ExecutionInstruction> last = null; //If we found the instruction //Return the instruction to be executed before it //return last; //last = curr;