runFormulaAsync method

Future<Operation> runFormulaAsync(
  1. String id, {
  2. required String formula,
  3. required FormulaAction action,
  4. String? version,
})

Dispatches a formula action, returning a handle instead of an answer.

The work is the same; only who waits for it changes. Follow it with operation, or on the event stream.

Implementation

Future<Operation> runFormulaAsync(
  String id, {
  required String formula,
  required FormulaAction action,
  String? version,
}) async => Operation.fromJson(
  await _object(
    await post('/nodes/$id/formula', {
      'formula': formula,
      'action': action.name,
      'version': ?version,
      'async': true,
    }),
  ),
);