Staged writes are in the beta phase of development and may not be available on your enrollment. Functionality may change during active development. Contact Palantir Support to request access.
Staged writes provide an improved execution model for AIP Logic functions that edit objects in the Ontology. Staged writes will soon be enabled by default for newly created Logic functions.
Compared to legacy Ontology edit behavior, staged-write Logic functions:
For a full description of staged-write semantics, refer to the staged writes documentation.
There are several notable differences between staged-write Logic functions and legacy Ontology edit behavior.
With staged writes enabled, your Logic function can call other staged-write functions (such as other Logic functions or TypeScript v2 functions) or other functions that make Ontology edits directly, or apply actions backed by other functions that perform Ontology edits. Previously, calling an action backed by another Logic function that also makes Ontology edits from within a Logic function was not supported.
Edits made by nested calls are visible to subsequent reads within the same Logic execution. All edits are staged to temporary storage and applied to the Ontology when the execution completes.
For example, a Logic function that processes a support email can create a Support Ticket object, then apply a triage action backed by a separate Logic function. That triage function can assign the ticket and edit related objects. All edits are staged together, and a later block in your Logic function can query the results of both.
In legacy mode, once your Logic function has made an edit, certain object set filter boards are no longer supported for the remainder of the execution:
With staged writes enabled, all object set filters are now supported throughout the AIP Logic execution.
Legacy Logic functions that edit the Ontology return a list of Ontology edits as their output. Staged-write Logic functions instead stage their edits to temporary storage and apply them to the Ontology when the execution completes. As a result, the function no longer returns Ontology edits and can return other types of values.
Because staged-write Logic functions do not return Ontology edits, they cannot be selected in the Logic effect in Automate. To call a staged-write Logic function from Automate, wrap it with an action type and use an action effect. See Automate staged-write Logic functions below.
Staged writes will soon be enabled by default for new Logic functions. You can turn staged writes on or off for a Logic function using the Enable staged write mode toggle under Execution mode settings in AIP Logic.
Disabling staged writes reverts the function to the legacy behavior, where the function returns a list of Ontology edits as its output. You may want to disable staged writes if your workflow depends on calling the Logic function directly from the Logic effect in Automate.
We recommend keeping staged writes enabled and calling your function through an action type. Legacy behavior does not support Ontology edits in nested action calls, does not support keyword and relative time range filters after the function has made an edit, and will be deprecated in the future.
The versioning impact of toggling staged writes depends on the function's output type:
Staged-write Logic functions must be called through an action type to be used in Automate. The action provides the execution context in which edits are staged and applied.
AIP Logic provides a Create action button for staged-write Logic functions that generates an action type calling your function:
You can then use this action in an action effect in Automate, or apply it anywhere else actions are supported, such as Workshop.
Creating an action type does not enable or disable staged writes on the function; the execution mode is controlled only by the Enable staged write mode toggle.
Alternatively, you can configure an existing action type to be backed by your Logic function in Ontology Manager. Creating a new action type with Create action is usually the simpler path.
For staged-write Logic functions, once you have created the action type, navigate to Automate and create an action effect.
In Automate, configure the action parameters from the objects or values that trigger the automation, as with any other action effect. All Automate capabilities available to action effects — including staging actions as proposals for human review, retry strategies, and fallback effects — work with actions that call staged-write Logic functions.
If you enable staged writes on a Logic function that is already used directly in an automation through the Logic effect:
To migrate an existing automation to staged writes: