Introduction to Cross-Runtime Support
Overview
Cross-Runtime Support (CRS) enables Creators to easily adopt Unqork's new Vega runtime into their existing and future applications. With CRS, Creators can create mixed applications that seamlessly switch between Centauri and Vega modules and components. In this article, you'll learn the benefits of CRS, when to use it, how submission data is affected, and its limitations.
Discover how to use Cross-Runtime Support by viewing our How to: Use Cross-Runtime Support article.
Benefits of Cross-Runtime Support
Cross-Runtime Support provides the benefit of using the Vega runtime in your Centauri applications. With CRS, you gain these additional benefits:
-
Implement as Needed: Retain your existing Centauri applications and add Vega features over time.
-
Cross Compatibility: A portion of Centauri functions in Vega. For the parts that do not, the Real-Time Configuration Analysis Tool gives recommended actions to make it compatible.
-
Constant Data Sync: Vega runtime data constantly syncs with the Centauri runtime, any updates to Vega components or logic is reflected instantly in Centauri runtime submission data.
-
No Migration Required: The Vega runtime is optional for your applications.
When to Use Cross-Runtime Support
Use CRS when you want to take advantage of new Vega runtime features in your existing modules.
Examples include the following:
-
You want to take advantage of an existing Vega Table component's advanced features in a Centauri module. You can import the Vega table using CRS and a dynamically refreshing Panel component.
-
You want to build with Vega components in your existing Centauri module. You can drag and drop Vega components into a Vega-enabled Panel component.
-
You have an Centauri module that's ready to be used in Vega. You can switch runtimes in the Module Builder using the Runtime drop-down.
-
You want to take advantage of Vega in specific parts of your application. You can seamlessly switch between Centauri and Vega modules regardless of the navigation method.
Understanding How Cross-Runtime Support Submission Data Works
While Vega and Centauri runtimes save submission data in the same way, there are differences when using CRS to bring Vega submission data into a Centauri module. Vega component data inside a CRS-enabled Panel component copies the Centauri submission data inside a JSON object into the Panel component's key. This object can then be used for inputs and watchers in Centauri.
Learn how to trigger, or send values between runtimes, view our How to: Configure Triggers and Values Using Cross-Runtime Support article.
When using CRS, you can modify submission data in the following ways:
Promoting Vega Data to the Same Level as Centauri Data
Vega data brought into a Centauri module using CRS is initially stored in the Panel component's key. Creators can bring this data up a level by using the Promote Data to Top Level setting.
For example, in the sample code below, the vegaTextfield and vegaNumber Vega data is contained in the panel object.
{
centauriTextfield: 'centauri',
centauriNumber: '111',
panel: {
vegaTextfield: 'vega'
vegaNumber: '222'
}
}
In the Panel component's settings, setting Promote Data to Top Level to (ON) copies the Vega data contained in the panel key to the same level as the Centauri data:
{
centauriTextfield: 'centauri',
centauriNumber: '111',
vegaTextfield: 'vega'
vegaNumber: '222'
panel: {
vegaTextfield: 'vega'
vegaNumber: '222'
}
}
When using the Promote Data to Top Level setting, Vega data also remains in the panel key.
Persisting or Clearing Vega Data in a Centauri Module
CRS enables you to retain or remove submission data imported from a Vega module:
-
Retain data from imported Vega components by setting each component's Store Data In Database setting to (ON). This data persists if the Panel component is dynamically refreshed.
-
To prevent imported Vega data from being retained, in the Panel component's Data to Clear on Refresh field, enter the Property ID of components containing data to clear on dynamic refresh.
Limitations
-
Vega logic components, like the
Initializer and
Decisions components, cannot target Centauri components. However, Centauri components can subscribe to Vega events at the runtime and component level when using the Panel component's Event Mapping setting. Centauri components trigger when Vega events fire.
-
The runtime inside of a CRS-enabled Panel component does not support logic components using the Page output type.
Best Practices
-
Centauri modules can contain more than one CRS-enabled Panel component.
Resources
-
How to: Configure Triggers and Values Using Cross-Runtime Support.
- Learn about the Vega Table component.