postAutoFlowsByIdRun method

Future<FlowRun?> postAutoFlowsByIdRun(
  1. String id
)

Starts one durable run of a flow now.

Starts one durable run of a flow now. It runs the flow's published version if one is pinned, else its latest, and answers the run record it created. The run is bounded by the org's per-minute run-start budget and its in-flight concurrency ceiling; over either, or with the engine not ready, no run is started and no run id is burned.

Parameters:

  • String id (required): ID is the flow to act on, from the path.

Implementation

Future<FlowRun?> postAutoFlowsByIdRun(String id,) async {
  final response = await postAutoFlowsByIdRunWithHttpInfo(id,);
  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), 'FlowRun',) as FlowRun;

  }
  return null;
}