Inline edits(内联编辑)¶
Action-backed inline edits are validated and submitted differently than standard actions. For standard actions, multiple parameters need to be set in order for the action to be valid. However, for action-backed inline edits, every parameter is optional and defaults to the existing value of the object, so a user can make individual changes to properties one at a time.
This documentation discusses how to avoid unexpected results when using inline edits. Inline edits are available in both Workshop and Object Explorer. The configuration of the inline edit action depends on where the action is used.
Object Explorer inline edits¶
Inline edits allow users to quickly edit values of an object in the Object Explorer results view or native Object View widgets, like the property or metric cards widget.
Configuration¶

To set up an inline edit action, navigate to the Properties tab of your object type and then to the Interaction tab in Ontology Manager. Select a property and navigate to Inline edit in the sidebar. In the dropdown menu, select one of the available action types or create a new one. Creating a new one will trigger the action type creation workflow. Each property can have only one inline edit action type.
You can use the same action type as an inline edit for multiple properties, or you can have separate action types for different properties.
Action type requirements for inline edits¶
Not all action types can be used as inline edit action types. To be accepted, the action type must meet the following requirements:
- May only modify a single object of a single object type.
- Default values must be enabled.
- Default values must come from the object reference parameter on which the inline action is defined. As a result, properties that are being changed in the action cannot be mapped to static values or special values like "Current User" or "Current Time".
- Visibility status and overrides can be set; however, they will be ignored if the inline edit is used in Object Explorer and Object Views.
- Side effect webhooks or side effect notifications cannot be enabled.
Workshop inline edits¶
No additional configuration is required to use an action type as an inline edit in Workshop, but not all actions are suitable for cell-level editing. For information on how to configure inline edits, see the Workshop documentation.
Background¶
When running a single action, edits are validated and submitted one at a time (sequentially). Inline edits differ in that they are validated and submitted in bulk. Because of this, not all actions are suitable for inline edits. Actions that may fail or have unexpected results due to inline edits include:
- Any action that attempts to read data to which another action could have written, or
- Two actions that try to write to the same object.
:::callout{theme="neutral"} When inline edits are applied to a Scenario, the submitted actions are applied sequentially (in a non-deterministic order) rather than simultaneously (as is normally the case with inline edits). As a result, inline edit actions that ordinarily fail due to multiple actions trying to write to the same object may succeed when applied to a scenario, though we do not recommend building applications that depend upon this difference in behavior. :::
Valid inline Actions¶
Actions must submit non-conflicting edits to be effective as Action-backed inline edits. In practice, this means multiple Actions configured in the same table edit widget must not:
- Write to the same object,
- Create the same link, or
- Attempt to keep aggregate values consistent.
Invalid inline Actions¶
Actions will return an error if an inline edit attempts to edit the same object twice. Also, adding or deleting join table links is not supported by inline edits and will result in a user-facing error message.
As users apply inline edits, submission criteria will be applied to each edit, but the edits will be submitted in bulk. Both parameter and global submission criteria will be evaluated for each edited object, but submission criteria that reference shared or linked objects are not compatible with inline edits. This is because when applying inline edits, cumulative submission criteria compare the edited value to the unedited values for the column. At final submission, the edits will be submitted all at once and will succeed if they all pass parameter and global submission criteria for the corresponding object.
Submission criteria on objects shared between multiple Action types or linked objects are therefore evaluated once per edit, before any edits are made.
:::callout{theme="warning"} Submission criteria that reference shared Action types or linked objects are not compatible with inline edits, and bulk updating objects could violate submission criteria rules that work as expected when applied sequentially (one at a time). :::
Example: Invalid inline Actions¶
Imagine a Delay Flight Action that can delay a single flight by a maximum of 20 minutes at an airport that can delay all flights by a maximum of 50 minutes.
- Both submission criteria – the 20 minute requirement and the 50 minute total – will be evaluated each time a cell is updated.
- Because no edits are yet submitted, the 50 minute total will compare the new delays to the sum of unedited delays in the column (the delays from before inline editing began).
- The second submission criteria (that all the delays at the airport sum to less than 50 minutes) relies on an aggregated value and is shared by all the objects in the column.
- Since inline edits are submitted in bulk, this second submission criteria will not be effective in limiting the total duration of flight delays at a given airport; the resulting edits could sum to greater than the 50 allowed by the second submission criteria.
- This Action would not be suitable for table editing as it would cause inconsistent results compared to running the Action individually for each cell.
中文翻译¶
内联编辑¶
基于操作的内联编辑(Action-backed inline edits)的验证和提交方式与标准操作不同。对于标准操作,需要设置多个参数才能使操作生效。然而,对于基于操作的内联编辑,每个参数都是可选的,默认使用对象的现有值,因此用户可以一次对属性进行单独的更改。
本文档讨论如何在使用内联编辑时避免意外结果。内联编辑在 Workshop 和 Object Explorer 中均可使用。内联编辑操作的配置取决于操作的使用位置。
Object Explorer 内联编辑¶
内联编辑允许用户在 Object Explorer 结果视图或原生对象视图(Object View)小部件(如属性或指标卡片小部件)中快速编辑对象的值。
配置¶

要设置内联编辑操作,请导航到对象类型的 属性(Properties) 选项卡,然后进入 Ontology Manager 中的 交互(Interaction) 选项卡。选择一个属性,然后在侧边栏中导航到 内联编辑(Inline edit)。在下拉菜单中,选择一个可用的操作类型或创建一个新的操作类型。创建新操作类型将触发操作类型创建工作流。每个属性只能有一个内联编辑操作类型。
您可以将同一个操作类型用作多个属性的内联编辑,也可以为不同属性设置不同的操作类型。
内联编辑的操作类型要求¶
并非所有操作类型都可以用作内联编辑操作类型。要符合要求,操作类型必须满足以下条件:
- 只能修改单个对象类型的单个对象。
- 必须启用默认值。
- 默认值必须来自定义内联操作的对象引用参数(object reference parameter)。因此,操作中正在更改的属性不能映射到静态值或特殊值(如"当前用户"或"当前时间")。
- 可以设置可见性状态和覆盖规则;但是,如果内联编辑在 Object Explorer 和 Object Views 中使用,这些设置将被忽略。
- 不能启用副作用 Webhook或副作用通知。
Workshop 内联编辑¶
在 Workshop 中将操作类型用作内联编辑无需额外配置,但并非所有操作都适合进行单元格级编辑。有关如何配置内联编辑的信息,请参阅 Workshop 文档。
背景¶
当运行单个操作时,编辑内容会逐个(顺序地)进行验证和提交。内联编辑的不同之处在于,它们是批量验证和提交的。因此,并非所有操作都适合内联编辑。可能因内联编辑而失败或产生意外结果的操作包括:
- 任何尝试读取其他操作可能已写入的数据的操作,或
- 两个尝试写入同一对象的操作。
:::callout{theme="neutral"} 当内联编辑应用于场景(Scenario)时,提交的操作会顺序执行(以非确定性顺序),而不是同时执行(内联编辑通常如此)。因此,通常因多个操作尝试写入同一对象而失败的内联编辑操作,在应用于场景时可能会成功,但我们不建议构建依赖于此行为差异的应用程序。 :::
有效的内联操作¶
操作必须提交不冲突的编辑内容,才能作为基于操作的内联编辑生效。实际上,这意味着在同一表格编辑小部件中配置的多个操作不得:
- 写入同一对象,
- 创建相同的链接,或
- 尝试保持聚合值一致。
无效的内联操作¶
如果内联编辑尝试两次编辑同一对象,操作将返回错误。 此外,内联编辑不支持添加或删除连接表链接,这将导致向用户显示错误消息。
当用户应用内联编辑时,提交条件(submission criteria)将应用于每个编辑内容,但编辑内容将批量提交。每个编辑对象都会评估参数提交条件和全局提交条件,但引用共享对象或链接对象的提交条件与内联编辑不兼容。这是因为在应用内联编辑时,累积提交条件会将编辑后的值与列中未编辑的值进行比较。在最终提交时,编辑内容将一次性提交,如果它们都通过了相应对象的参数提交条件和全局提交条件,则提交成功。
因此,在多个操作类型或链接对象之间共享的对象上的提交条件,会在任何编辑进行之前,对每个编辑内容评估一次。
:::callout{theme="warning"} 引用共享操作类型或链接对象的提交条件与内联编辑不兼容,批量更新对象可能会违反在顺序应用(逐个)时正常工作的提交条件规则。 :::
示例:无效的内联操作¶
假设有一个"延误航班(Delay Flight)"操作,该操作可以在一个机场将单个航班最多延误 20 分钟,而该机场可以将所有航班最多延误 50 分钟。
- 两个提交条件——20 分钟要求和 50 分钟总时限——将在每次单元格更新时进行评估。
- 由于尚未提交任何编辑内容,50 分钟总时限会将新的延误时间与列中未编辑的延误时间总和(内联编辑开始前的延误时间)进行比较。
- 第二个提交条件(机场所有延误时间总和少于 50 分钟)依赖于一个聚合值,并且由列中的所有对象共享。
- 由于内联编辑是批量提交的,第二个提交条件在限制给定机场航班延误总时长方面将无效;最终的编辑内容总和可能超过第二个提交条件允许的 50 分钟。
- 此操作不适合表格编辑,因为与对每个单元格单独运行操作相比,它会导致不一致的结果。