From d6cf4cea761b051ca5a5132d8b287221c8620b19 Mon Sep 17 00:00:00 2001 From: Alon Peretz <8467965+alonp99@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:56:38 +0200 Subject: [PATCH] chore(docs): add collection flow observablity --- websites/docs/.astro/types.d.ts | 7 ++ websites/docs/astro.config.mjs | 4 + .../collection-flow-observability.mdx | 97 +++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 websites/docs/src/content/docs/en/collection-flow/collection-flow-observability.mdx diff --git a/websites/docs/.astro/types.d.ts b/websites/docs/.astro/types.d.ts index 5662b03427..b87ee40c51 100644 --- a/websites/docs/.astro/types.d.ts +++ b/websites/docs/.astro/types.d.ts @@ -234,6 +234,13 @@ declare module 'astro:content' { collection: 'docs'; data: InferEntrySchema<'docs'>; } & { render(): Render['.md'] }; + 'en/collection-flow/collection-flow-observability.mdx': { + id: 'en/collection-flow/collection-flow-observability.mdx'; + slug: 'en/collection-flow/collection-flow-observability'; + body: string; + collection: 'docs'; + data: InferEntrySchema<'docs'>; + } & { render(): Render['.mdx'] }; 'en/collection-flow/iframe.mdx': { id: 'en/collection-flow/iframe.mdx'; slug: 'en/collection-flow/iframe'; diff --git a/websites/docs/astro.config.mjs b/websites/docs/astro.config.mjs index b3476b4553..d5f9c6b1a8 100644 --- a/websites/docs/astro.config.mjs +++ b/websites/docs/astro.config.mjs @@ -113,6 +113,10 @@ export default defineConfig({ label: 'Implementing in an iFrame', link: '/en/collection-flow/iframe', }, + { + label: 'Observability', + link: '/en/collection-flow/collection-flow-observability', + }, ], }, { diff --git a/websites/docs/src/content/docs/en/collection-flow/collection-flow-observability.mdx b/websites/docs/src/content/docs/en/collection-flow/collection-flow-observability.mdx new file mode 100644 index 0000000000..28c257e3e1 --- /dev/null +++ b/websites/docs/src/content/docs/en/collection-flow/collection-flow-observability.mdx @@ -0,0 +1,97 @@ +--- +title: Collection Flow Observability +description: Understanding and monitoring the state of your collection flow +--- + +import CodeBlock from '../../../../components/CodeBlock/CodeBlock.astro'; + +## Overview + +The Collection Flow provides comprehensive observability into its internal state through the workflow context. This allows you to monitor and understand the current state of the collection flow, its configuration, and progress in real-time. + +## Workflow Context Structure + +The workflow context contains several key components that provide insights into the collection flow: + +### Configuration (config) + +The configuration section defines the basic setup of your collection flow: + + + +### State Management + +The state section tracks the current progress and status of the collection flow: + + + +#### Status Values + +The collection flow can have the following status values: + +- `pending`: Initial state, awaiting user data entry +- `inprogress`: Active user engagement with form submission ongoing +- `completed`: All steps finished, awaiting plugin processing and review +- `approved`: Application approved by Backoffice +- `revision`: Returned to client for corrections +- `rejected`: Application rejected by Backoffice +- `failed`: Plugin execution failure + +### Additional Information + +The context can include supplementary data used by plugins: + + + +## Monitoring and Debugging + +You can inspect the workflow context to: + +1. Track progress through the collection flow +2. Debug issues with form submissions +3. Understand the current state of plugin processing +4. Verify configuration settings +5. Monitor user progression through steps + +To access the workflow context, you can use the workflow runtime API or inspect it through the Backoffice interface. + +## Real-time Updates + +The context maintains bidirectional updates, meaning changes can occur from: + +- Frontend user interactions +- Backend plugin processing +- Administrative actions in the Backoffice +- System automated processes + +This ensures you always have an accurate view of the collection flow's current state.