Skip to content
Weik.ioUniversity
Try Weik.io

Polling and change detection

Patterns 1 · 3:47

Because the ERP reports no changes, every poll fetches all customers. Weik.io's entity store detects the new and changed ones and lets only those reach the CRM. Watch this video once you know the Camel integrations track.

Download the mp4Recorded on 2026.2

What it covers

  • A timed poll and a send route as two route files in one folder
  • The send route that waits on the store for created or updated records
  • The entity type customer from weikio entitystore policy set, and one entity per customer
  • A first poll that creates twenty customers and a second that sends nothing
  • One changed phone number reaching the CRM as one update
  • Reading revisions back with the weikio CLI and on the admin UI's Entity store page

Commands in this video

Terminal
$ weikio entitystore policy set sandbox/customer --env devtest
$ weikio run ./customer-sync
$ weikio entities list sandbox/customer
$ weikio entities get sandbox/customer C-1007 --revisions
Transcript
  1. 0:01A source system that reports no changes forces every read to take everything.
  2. 0:07This video shows an integration that sends only the changes.
  3. 0:15An integration in devtest copies customers from an ERP service to a CRM.
  4. 0:21It asks the ERP, and gets all twenty back.
  5. 0:25The entity store keeps the newest copy of every customer.
  6. 0:29Whatever comes back out of the store goes on to the CRM.
  7. 0:36The customer-sync folder holds two route files, starting with the poll route.
  8. 0:41Each run calls the ERP's customers address on a timer, once a minute.
  9. 0:46Each of the twenty goes into the store as the type customer.
  10. 0:50The second file holds the send route to the CRM.
  11. 0:53It waits on the store instead of the ERP,
  12. 0:56for customers whose record was created or updated.
  13. 1:02First,
  14. 1:03declare the type with weikio entitystore policy set sandbox/customer for devtest.
  15. 1:11The declaration creates the type's store inside the environment's budget.
  16. 1:15Then weikio run, the customer-sync folder.
  17. 1:19The files go up, the version builds, then the deployment starts.
  18. 1:24Your Weik.io installation keeps the integration at version 0.1.0.
  19. 1:33The deployment runs as a Java process on agent dev.
  20. 1:37The first poll reads all twenty and puts each into the store.
  21. 1:41All twenty are new, so all come back out as created, to the CRM.
  22. 1:49A minute later the poll reads all twenty again.
  23. 1:53The store takes every copy and skips the ones that change nothing,
  24. 1:57so no send line prints.
  25. 2:02The ERP gives one customer a new phone number.
  26. 2:08The next poll reads and puts all twenty again.
  27. 2:11This time the store finds one real change,
  28. 2:14and the send route posts that one customer as an update.
  29. 2:20Control C stops the following, the integration stays deployed and keeps running.
  30. 2:29In the Weik.io CLI, weikio entities list sandbox/customer prints what the store holds,
  31. 2:37one row later than the rest.
  32. 2:41weikio entities get reads that customer back with its revisions.
  33. 2:46The update prints above the creation.
  34. 2:48The store keeps two revisions of each record.
  35. 2:56The admin UI's Entity store page lists the declared types.
  36. 3:01The type's page lists all twenty customers in devtest.
  37. 3:05The Changes section marks the one update among the puts.
  38. 3:10Opening the changed customer shows its newest data and the revisions behind it.
  39. 3:18The integration is two routes: one reads everything,
  40. 3:22the other answers with the changes.
  41. 3:24The entity store between them keeps each customer's newest
  42. 3:28copy and lets only real changes through.
  43. 3:31The source needs no change detection, since the timer reads all of it.
  44. 3:36The destination receives only the customers that changed.

Next in this track

Patterns 2 · 3:05 Sending data to several destinations Watched

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo