Publishing step by step
When the editor publishes a node the cache refreshed event is triggered and the Enterspeed Umbraco integration listens to this event, to send the updated content to Enterspeed. When this event is triggered these steps are executed synchronously:
- A new EnterspeedJob is added to a database for processing.
- The newly added job is requested to be processed immediately.
- The published content from Umbraco is fetched from the cache.
- Each property on the IPublishedContent is converted to an IEnterspeedProperty with an IEnterspeedPropertyValueConverter.
- A UmbracoContentEntity is created.
- The content entity is sent to the Enterspeed Ingest API.
- If the response is successful nothing happens, if it is not:
- The EnterspeedJob is re-inserted in the database as failed.
- The failed jobs can be viewed on the content dashboard.
If you wish you can check out the sequence diagram for the process here:
title Umbraco - publishing
actor "Editor" as EDITOR
boundary "Umbraco" as UMBRACO
participant "Cache refreshed" as CACHE_REFRESHED
database "Jobs" as JOBS
participant "Job service" as JOBS_SERVICE
participant "Enterspeed Property Service " as PROPERTY_SERVICE
participant "IEnterspeedPropertyValueConverter\nimplementation" as PROPERTY_VALUE_CONVERTER
boundary "Enterspeed Ingest" as INGEST
EDITOR -> UMBRACO: Publish content
UMBRACO -> CACHE_REFRESHED: Content has been updated
CACHE_REFRESHED -> JOBS: Insert EnterspeedJobs to process
CACHE_REFRESHED -> JOBS_SERVICE: Process jobs synchronously
JOBS_SERVICE -> JOBS: Fetch jobs for process
JOBS -> JOBS_SERVICE: return EnterspeedJob
JOBS_SERVICE -> PROPERTY_SERVICE: Get properties
loop Foreach property in properties
PROPERTY_SERVICE -> PROPERTY_VALUE_CONVERTER: Create IEnterspeedProperty object
PROPERTY_VALUE_CONVERTER --> PROPERTY_SERVICE: return IEnterspeedProperty
PROPERTY_SERVICE -> JOBS_SERVICE: return Dictionary<string, IEnterspeedProperty>
JOBS_SERVICE -> JOBS_SERVICE: Create IEnterspeedEntity
JOBS_SERVICE -> INGEST: Send IEnterspeedEntity to Enterspeed
INGEST -> JOBS_SERVICE: Response
alt Response is not successful
JOBS_SERVICE -> JOBS: Insert failed job