postFlowRuns method
Run executes one of the caller's workflows synchronously: the graph runs in the flow service and the response carries the run's session and outputs.
Run executes one of the caller's workflows synchronously: the graph runs in the flow service and the response carries the run's session and outputs. A graph whose components fail reports the product's own error. Runs are bounded by the product's five-minute sync ceiling.
Parameters:
- FlowRun flowRun (required):
Implementation
Future<Object?> postFlowRuns(FlowRun flowRun,) async {
final response = await postFlowRunsWithHttpInfo(flowRun,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object;
}
return null;
}