Skip to main content

Service and OData metadata refresh

What it does. Two jobs fill the catalogs that Lattice keeps of what the environment offers. The service metadata refresh records every service group, service and operation, with sample request and response payloads. The OData metadata refresh records every public data entity with its fields and methods. Runs: when you start it from an explorer or a menu item, or schedule it as a batch job; run it after each deployment. Nothing starts it automatically. Who looks after it: Integration administrator (the Integration developer can run both refreshes too).

Purpose​

Several Lattice pages and processes read these catalogs instead of asking the platform each time. Until a refresh has run, and after a deployment until it runs again, they show nothing or show the previous release:

CatalogRead by
Service metadataService metadata explorer and its JSON, XML, Postman and OpenAPI downloads, the Service test console (it cannot run an operation that is not in the catalog), file ingestion records routed through the service-invoke target, the operation lookup in the new file ingestion connection wizard, the service lookup on Service operation logging configuration, and the APIM configurator's Validate, Generate bundle and bulk export
OData metadataOData entity metadata explorer and its Postman and OpenAPI downloads, the entity lookup of the Data entity template, and the OData API of an APIM bundle

When it runs​

  • Only when someone starts it. No background process, startup step or deployment step runs either refresh.
  • Run both after every deployment of Lattice or of a Finance and Operations update, and whenever an explorer looks out of date (for example after another solution added services or entities).
  • Each refresh covers the whole environment, every package and not only Lattice, so one run serves every legal entity.

Configuration and scheduling​

Neither refresh has settings or dialog fields of its own.

RefreshWhere to start it
Service metadataSystem administration > Inquiries > Lattice > Services > Service metadata explorer, Refresh metadata
OData metadataSystem administration > Inquiries > Lattice > OData > OData entity metadata explorer, Refresh OData metadata (also System administration > Periodic tasks > Lattice > Refresh OData metadata)
  1. Open the page and select the button.
  2. To run it now, leave Batch processing at No and select OK. The page waits until the refresh has finished and then shows the new catalog.
  3. To run it in the background, expand Run in the background, set Batch processing to Yes, enter a Task description and select OK. Open the explorer again after the batch job has ended to see the result.

You can give either job a Recurrence, but the catalogs change only when the code deployed in the environment changes, so a run after each deployment is what matters. Avoid running the service refresh while file ingestion records are being processed (see Effect on the rest of Lattice).

How it works​

Service metadata refresh

  1. Logs "Service metadata refresh started." and notes the service groups the catalog held.
  2. Deletes the whole service catalog (groups, services and operations) in one transaction.
  3. Discovers every service group in the environment, then each service and operation in it, with the operation's request and response contracts and generated sample payloads in JSON and XML. A group, service or operation that fails is logged as an error and skipped; the others are still recorded.
  4. Logs a change summary ("Change summary: %1 service groups before, %2 after. Added: %3, Removed: %4. Total operations: %5." or "No service group changes detected. %1 groups refreshed, %2 total operations.") and "Service metadata refresh completed."
  5. Reports "Service metadata: %1 service groups, %2 services and %3 operations discovered." and "Service metadata refresh completed successfully."

OData metadata refresh

  1. Empties the OData refresh log, so it holds only the current run, and logs "OData entity metadata refresh started (delta mode). %1 entities currently stored."
  2. Lists every data entity in every package and keeps the public ones.
  3. Compares each entity with the stored copy and writes only what changed: new entities are added, changed ones rewritten, removed ones deleted, and unchanged ones left alone. Each entity is written in its own transaction, so one that fails is logged and skipped.
  4. Logs a change summary ("Change summary: %1 entities before, %2 after. Processed: %3, Unchanged: %4, Added: %5, Changed: %6, Removed: %7, Failed: %8." or "No entity changes detected. %1 entities unchanged (%2 failed).").
  5. Reports "OData metadata: %1 entities, %2 methods discovered." and "OData entity metadata refresh completed."

The service catalog is rebuilt from nothing on every run; the OData catalog is updated in place. That is why the service catalog is briefly empty during its refresh and the OData catalog never is.

Before it can run​

  • The deployment has finished, and for a batch run, the batch service is running.
  • The Integration administrator or Integration developer role: the operator and read-only roles do not see the refresh buttons.
  • The license does not stop a scheduled run. Started from a button or menu item while the license blocks Lattice, each refresh shows a license warning and does nothing.

Inputs and outputs​

RefreshReadsWrites
Service metadataThe service groups, services and operations deployed in the environmentThe service catalog behind Service metadata explorer and the LatticeServiceOperations entity; rows on Service metadata refresh log
OData metadataThe data entities deployed in the environmentThe entity, field and method catalog behind OData entity metadata explorer; the OData refresh log

Neither refresh changes business data.

Monitoring and logs​

  • Service metadata explorer > Service metadata refresh log: the information, warnings and errors each service refresh wrote, by service group, service and operation.
  • LatticeServiceOperations (read-only OData entity): one row per operation the last service refresh found. An empty set means the service refresh has not run; RefreshedDateTime is when it last ran.
  • OData entity metadata explorer: the Catalog status line reads "Not yet refreshed" until a refresh has run, then "Last refresh: %1 entities, %2 methods". The OData refresh log itself has no page.
  • The messages of a run started now are shown when it ends. A batch run's messages are in its history on System administration > Inquiries > Batch jobs.

When it fails​

A failure on one element is logged and skipped, and the refresh goes on. A failure of the run itself is logged and reported, and the batch job ends with an error.

SymptomCauseFix
The Service test console or a file ingestion record says "No metadata found for operation %1.%2. Run the service metadata refresh first."The service refresh has not run since the deployment, or was running at that momentRun the service metadata refresh; replay the parked file ingestion records afterwards
"The service metadata refresh failed during step: %1. See the Error entries of the service metadata refresh log for the element and step that failed."The run stopped at the named stepRead the Error entries on Service metadata refresh log, fix the cause and run it again. The catalog may be incomplete until then
An operation or service is missing after a successful runIts discovery failed and was skipped (for example "Service %1 failed during step: %2.")Read the Error entries for it on Service metadata refresh log
"OData metadata refresh batch failed during step: %1. Check the other messages of this run and the batch job history for details."The OData run stopped at the named stepRead the messages shown with it (or in the batch job's history) and run it again. Unchanged entities stay as they were
Catalog status still reads "Not yet refreshed"The OData refresh has never completed, or is still running as a batch jobRun it, then open the explorer again
The explorers show services or entities of the previous releaseNo refresh since the deploymentRun both refreshes

Effect on the rest of Lattice​

  • While the service refresh runs, its catalog is empty or partly filled. File ingestion records sent through the service-invoke target in that time fail with "No metadata found for operation ...". Each is due again 30 seconds after its first failure and 60 seconds after its second, so a long refresh can make records use up their three attempts and be parked as dead letters. Run it when files are quiet and check the dead-letter queue afterwards.
  • An APIM bundle generated or exported before a refresh describes the catalog as it was then.
  • Nothing posts or changes business data, so a refresh is safe to run again at any time.