Class Trigger

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

Một trình kích hoạt chạy các thao tác 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ành 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ã nhận dạng 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ã nhận dạng quy tắc hành động cho điều kiện kích hoạt.

Thông số

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

Cầu thủ trả bóng

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