Class Trigger

Aktywator

Wywoływacz, który uruchamia działania zdarzeń widżetu weryfikacji wyrażeń CEL zgodnie z identyfikatorem reguły działania.

Dostępne tylko w przypadku dodatków do Google Workspace, które rozszerzają Google Workspace Studio.

// Define Triggers for each Condition respectively
const trigger_success = CardService.newTrigger()
  .setActionRuleId("CEL_TEXTINPUT_SUCCESS_RULE_ID");

const trigger_failure = CardService.newTrigger()
  .setActionRuleId("CEL_TEXTINPUT_FAILURE_RULE_ID");

const eventAction = CardService.newEventAction()
  .setActionRuleId("CEL_TEXTINPUT_EVALUATION_RULE_ID")
  .setExpressionDataAction(expressionDataAction)
  .addPostEventTrigger(trigger_success)
  .addPostEventTrigger(trigger_failure);

Metody

MetodaZwracany typKrótki opis
setActionRuleId(actionRuleId)TriggerUstawia identyfikator reguły działania dla aktywatora.

Szczegółowa dokumentacja

setActionRuleId(actionRuleId)

Ustawia identyfikator reguły działania dla aktywatora.

Parametry

NazwaTypOpis
actionRuleIdStringIdentyfikator UUID, który jednoznacznie identyfikuje działanie.

Powrót

Trigger – ten obiekt do łączenia.