org.syrup
Interface Result

All Known Subinterfaces:
Workflow
All Known Implementing Classes:
ResultImpl, WorkflowImpl

public interface Result

The execution result returned by the Task's Function. Each Result has an associated execution Context from where the Function was executed.
At each execution step, a Function may consume none, one or two inputs. Independently, the function can produce none, one or two outputs.
When a Result is committed to a WorkSpace, the outgoing Links of the Context will be filled with the outputs. Accordingly, the ingoing Links will be consumed.

Author:
Robbert van Dalen
See Also:
Function.execute(org.syrup.Context)

Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 Context context()
          Returns the Context from which the Result is computed.
 boolean in_1_consumed()
          Returns true if the first input has been consumed.
 boolean in_2_consumed()
          Returns true if the second input has been consumed.
 Data out_1_result()
          Returns the first resulting output.
 Data out_2_result()
          Return the second resulting output.
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

context

public Context context()
Returns the Context from which the Result is computed.

Returns:
The Context from which the Result is computed.

in_1_consumed

public boolean in_1_consumed()
Returns true if the first input has been consumed.

Returns:
true if the first input has been consumed.

in_2_consumed

public boolean in_2_consumed()
Returns true if the second input has been consumed.

Returns:
true if the second input has been consumed.

out_1_result

public Data out_1_result()
Returns the first resulting output.

Returns:
The first resulting output.

out_2_result

public Data out_2_result()
Return the second resulting output.

Returns:
The second resulting output.