Offline remote data handling
What happens to data when you are offline?
How to configure the queue
Property
description
actions:
- children:
- type: action.execute-entity
options:
title: Update Customer
provider: DATA_PROVIDER_REST
entity: customers
method: update
# Use replace to ensure you only have one update on the queue related
# to a record. Not adding the replace will not break the solution but
# will help to avoid chattiness and scenarios where backends have
# rate limits.
queueOperation: replace
function: rest-update-customer
# Parameters to update in the remote server.
parameters:
# id is a required property for the replace queue
id: [email protected]
firstName: [email protected]
lastName: [email protected]
companyName: [email protected]
address: [email protected]
city: [email protected]
email: =$lowercase(@ctx.components.email.state.value)
# Data records to update in the local SQLite table.
data:
id: [email protected]
firstName: [email protected]
lastName: [email protected]
companyName: [email protected]
address: [email protected]
city: [email protected]
email: =$lowercase(@ctx.components.email.state.value)How to clear the queue
Queue handling for delete methods
Handling TempIds
Examples and code snippets
Execute-entity with queueOperation (replace)

Execute-entity with queueOperation (add)
Execute-entity (delete) with queueOperation (replace)
Execute-entity with queueOperations when no id is returned
Clear all commands in the queue for record
Testing and debugging queues
Last updated
Was this helpful?