Class Trigger

Điều kiện kích hoạt

Điều kiện kích hoạt chạy các hành động của sự kiện tiện ích xác thực biểu thức CEL theo mã quy tắc hành động.

Chỉ dùng được cho các tiện ích bổ sung của Google Workspace mở rộng 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);

Phương thức

Phương thứcKiểu dữ liệu trả vềMô tả ngắn
setActionRuleId(actionRuleId)TriggerĐặt mã quy tắc hành động cho điều kiện kích hoạt.

Tài liệu chi tiết

setActionRuleId(actionRuleId)

Đặt mã quy tắc hành động cho điều kiện kích hoạt.

Tham số

TênLoạiMô tả
actionRuleIdStringUUID xác định duy nhất một hành động.

Cầu thủ trả bóng

Trigger – Đối tượng này dùng để liên kết.