跳转至

Configure rule Actions(配置规则操作(Rule Actions))

:::callout{theme="warning"} Prior to July 2022, Foundry Rules (previously known as Taurus) used Foundry Actions as rule outputs. This section is only relevant if you deployed Foundry Rules prior to July 2022. :::

Rule Actions are a means within Foundry Rules to enforce an output schema on a rule's output. This is accomplished by using Foundry Actions as the mechanism for specifying the column names and types. A rule Action is a Foundry Action that will be used in Foundry Rules.

Configuring a Foundry Action for use in Foundry Rules

The Action in the screenshot above is only used within the transform and will not be run on its own. It is convenient to have no Action rules configured for the Action (1 in the screenshot above) so if the Action were to be run, it would have no effect.

The parameters of the Action will be presented to end users in the Foundry Rules Workshop application and made available to map to columns output by the rule logic (2 in the screenshot above).

  • The parameter types will be used to enforce the correct column types. For example, if a date type parameter is used, then only date and timestamp type columns will be available to map to this parameter. Furthermore, if the parameter ID matches a column name or an object property ID from your rule, it will be used to pre-fill the parameter with this column/property.
  • Any parameters that are marked as required will also be required in the Foundry Rules Workshop application. Similarly, optional parameters may be left blank with no column mapped to them, which is equivalent to providing the null value to the parameter.
  • The parameter names will be used as labels in the Foundry Rules Workshop application, and the parameter IDs will be used as the column names in the resulting dataset in the transform.
  • In addition to the parameter IDs, the output dataset will also contain a taurus_rule_id column to indicate the rule ID of the rule the row originated from.

Defining Submission Criteria (3) is a requirement for saving an Action. The most common submission criterion for rule actions is checking that the Current User belongs to a user group with permissions to edit the Foundry Rules workflow. This validation will be applied when editing a rule in the Foundry Rules App.


中文翻译


配置规则操作(Rule Actions)

:::callout{theme="warning"} 在2022年7月之前,Foundry Rules(原名Taurus)使用Foundry Actions作为规则输出。本节内容仅适用于在2022年7月之前部署了Foundry Rules的情况。 :::

规则操作(Rule Actions)是Foundry Rules中的一种机制,用于对规则的输出强制执行输出模式。这是通过使用Foundry Actions来指定列名和列类型来实现的。规则操作(Rule Action)是一种将在Foundry Rules中使用的Foundry Action。

配置用于Foundry Rules的Foundry Action

上述截图中的Action仅在转换(transform)中使用,不会独立运行。建议不为该Action配置任何Action规则(上图中标注1的位置),这样即使该Action被触发,也不会产生任何效果。

该Action的参数将展示给Foundry Rules Workshop应用程序中的最终用户,并可用于映射规则逻辑输出的列(上图中标注2的位置)。

  • 参数类型将用于强制确保正确的列类型。例如,如果使用了日期类型参数,则只有日期和时间戳类型的列可以映射到此参数。此外,如果参数ID与规则中的列名或对象属性ID匹配,则会自动预填充该参数对应的列/属性。
  • 任何标记为必填的参数在Foundry Rules Workshop应用程序中也将是必填项。同样,可选参数可以留空,不映射任何列,这相当于向参数提供null值。
  • 参数名称将用作Foundry Rules Workshop应用程序中的标签,而参数ID将用作转换(transform)中生成的数据集的列名。
  • 除参数ID外,输出数据集还将包含一个taurus_rule_id列,用于指示该行数据来源的规则ID。

定义提交条件(Submission Criteria)3)是保存Action的必要条件。规则操作最常见的提交条件是检查当前用户(Current User)是否属于具有编辑Foundry Rules工作流权限的用户组。在Foundry Rules应用程序中编辑规则时,将应用此验证。