Skip to content

ActionInvocation

Record in Oadm.Sdk.Actions · Oadm.Sdk.dll

One run of an action on one target (a device, or none for actions without IActionPlugin.NeedsDevice). Settings are the action’s settings with password fields decrypted and the fields of a chosen recipient merged in under their own keys.

public sealed record ActionInvocation(Guid RuleId, string RuleName, ActionEdge Edge, JsonElement Settings, IDeviceInfo? Device, ActionTrigger Trigger)

Guide: Event rules

Parameters

  • RuleId: The rule.
  • RuleName: Its name.
  • Edge: Why the action runs.
  • Settings: The settings of the action, passwords decrypted, a chosen recipient’s fields merged in.
  • Device: The target device; null for actions without devices.
  • Trigger: What happened.
IDeviceInfo? Device { get; init; }

The target device; null for actions without devices.

ActionEdge Edge { get; init; }

Why the action runs.

IReadOnlyDictionary<string, Guid> RecipientIds { get; init; }

The chosen recipients of this run, field key to recipient id (SDK 0.11.0); empty for an action without recipient fields and for the Test of a recipient, which runs on the values of its form.

Guid RuleId { get; init; }

The rule.

string RuleName { get; init; }

Its name.

JsonElement Settings { get; init; }

The settings of the action, passwords decrypted, a chosen recipient’s fields merged in.

ActionTrigger Trigger { get; init; }

What happened.

string? Get(string key)

A setting as text (null when missing or null).

bool GetBool(string key)

A check box setting.

int GetInt(string key, int fallback)

A number setting; fallback when missing or not a number.

IReadOnlyList<KeyValuePair<string, string>> GetPairs(string key)

The rows of a ActionFieldType.KeyValues setting, in order; rows without a name are left out.