📎Save data from workflows
This is an overview of how to create a data object in the Cloneable platform, and implement it into your workflow.
Overview
Data objects store data both locally at the edge and sync up with the cloud. In Cloneable, you define data objects and their schemas for the types of data they can save. We call these object templates. Object templates are added to workflows to save new data and work with existing data. Objects are synced to the devices as they are needed so that they can be used offline.
Create an Object Template
Access the template manager by navigating to the Object Manager tab in the dashboard. Create a new object template and begin adding fields.
Adding fields
Fields are what hold the data in the data object. You can add as many fields as you want to your template. Set the name of the field and the data type. Objects support storing most data types that Cloneable supports.
💼Data Types
Files
You can store files in objects. If a file is created on the device during a workflow and saved to the object, the file will be synced with cloud based file storage when internet is available.
Selecting file storage service
Cloneable allows you to sync files to your own cloud file storage. We provide storage as part of your license in Cloudflare R2 file storage (similar to AWS s3)
One way sync
Enable this if you will not need this file when running other workflows on the edge. For example if you are generating a PDF report on the device to send to a user, you likely will not need this synced on all of your edge devices where this data object is synced.
Implement into your workflow
Once your template has been built, it's easy to work with data objects in your workflows.
The template will appear under Objects
in the workflow builder on the left of the screen. Simply drag and drop the object template into the builder area.
Set the action type
There are 4 action types which hare explained in Data Objects. For now, leave this set to Single Object. This will create a single new data object from this template each time we run our workflow.
Save data to the data object
Simply drag outputs from other components to the data object fields. This will update the field to the latest data input. If you drag a file type, the file will sync after the workflow is complete.
Offline First
Data within objects needs to be used offline in your workflow. The platform will intelligently sync the objects that you need based on rules that you set in the components that interface with objects in the workflow builder.
Last updated