Skip to content

Instantly share code, notes, and snippets.

@pezholio
Created October 1, 2024 13:02
Show Gist options
  • Save pezholio/3b698953ec84b569a90df331e0b7c559 to your computer and use it in GitHub Desktop.
Save pezholio/3b698953ec84b569a90df331e0b7c559 to your computer and use it in GitHub Desktop.
flowchart LR
 subgraph whitehall["Whitehall"]
    subgraph whitehall_title[" "]
        send_content["Send minister to publish"]
    end
  end
 subgraph publish["Publish command"]
       subgraph publish_title[" "]
        send_downstream["Send edition downstream"]
        publish_edition["Publish edition"]
      end
  end
 subgraph downstream_draft_worker["Downstream Draft Worker"]
    subgraph downstream_draft_worker_title[" "]
        should_update_draft_dependencies{"Should dependencies be updated?"}
        update_draft_content_store["Update draft content store"]
        update_draft_expanded_links["Update expanded links"]
        construct_draft_payload["Construct payload"]
        end_draft(["End"])
    end
  end
 subgraph downstream_live_worker["Downstream Live Worker"]
     subgraph downstream_live_worker_title[" "]
        update_live_content_store["Update live content store"]
        update_expanded_links["Update expanded links"]
        construct_payload["Construct payload"]
        should_update_live_dependencies{"Should dependencies be updated?"}
        end_live(["End"])
    end
  end
 subgraph for_each_dependency["For each dependency"]
        send_dependency_downstream["Send dependency downstream"]
  end
 subgraph dependency_resolution_worker["Dependency Resolution Worker"]
      subgraph dependency_resolution_worker_title[" "]
        for_each_dependency
    end
  end
 subgraph publishing_api["Publishing API"]
      subgraph publishing_api_title[" "]
        publish
        downstream_draft_worker
        downstream_live_worker
        dependency_resolution_worker
    end
  end
    send_content --> publish_edition
    publish_edition --> send_downstream
    send_downstream -.-> construct_draft_payload & construct_payload
    construct_draft_payload --> update_draft_expanded_links
    update_draft_expanded_links --> update_draft_content_store
    update_draft_content_store --> should_update_draft_dependencies
    construct_payload --> update_expanded_links
    update_expanded_links --> update_live_content_store
    update_live_content_store --> should_update_live_dependencies
    should_update_live_dependencies -- Yes --> for_each_dependency
    should_update_draft_dependencies -- Yes --> for_each_dependency
    should_update_draft_dependencies -- No --> end_draft
    should_update_live_dependencies -- No --> end_live
    send_dependency_downstream -.-> construct_draft_payload & construct_payload

    style for_each_dependency stroke:#757575,stroke-dasharray: 5 5
    classDef title fill:none,stroke:none;
    class whitehall_title,publish_title,downstream_draft_worker_title,downstream_live_worker_title,dependency_resolution_worker_title,publishing_api_title title

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment