invoke method
Invokes the RunnableSequence on the given input
.
input
- the input to invoke the RunnableSequence on.options
- the options to use when invoking the RunnableSequence.
Implementation
@override
Future<RunOutput> invoke(
final RunInput input, {
final RunnableOptions? options,
}) async {
Object? nextStepInput = input;
for (final step in [first, ...middle]) {
nextStepInput = await step.invoke(
nextStepInput,
options: step.getCompatibleOptions(options),
);
}
return last.invoke(
nextStepInput,
options: last.getCompatibleOptions(options),
);
}