Skip to content

Commit d6cf4ce

Browse files
committed
chore(docs): add collection flow observablity
1 parent acf352d commit d6cf4ce

File tree

3 files changed

+108
-0
lines changed

3 files changed

+108
-0
lines changed

websites/docs/.astro/types.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,13 @@ declare module 'astro:content' {
234234
collection: 'docs';
235235
data: InferEntrySchema<'docs'>;
236236
} & { render(): Render['.md'] };
237+
'en/collection-flow/collection-flow-observability.mdx': {
238+
id: 'en/collection-flow/collection-flow-observability.mdx';
239+
slug: 'en/collection-flow/collection-flow-observability';
240+
body: string;
241+
collection: 'docs';
242+
data: InferEntrySchema<'docs'>;
243+
} & { render(): Render['.mdx'] };
237244
'en/collection-flow/iframe.mdx': {
238245
id: 'en/collection-flow/iframe.mdx';
239246
slug: 'en/collection-flow/iframe';

websites/docs/astro.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ export default defineConfig({
113113
label: 'Implementing in an iFrame',
114114
link: '/en/collection-flow/iframe',
115115
},
116+
{
117+
label: 'Observability',
118+
link: '/en/collection-flow/collection-flow-observability',
119+
},
116120
],
117121
},
118122
{
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: Collection Flow Observability
3+
description: Understanding and monitoring the state of your collection flow
4+
---
5+
6+
import CodeBlock from '../../../../components/CodeBlock/CodeBlock.astro';
7+
8+
## Overview
9+
10+
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.
11+
12+
## Workflow Context Structure
13+
14+
The workflow context contains several key components that provide insights into the collection flow:
15+
16+
### Configuration (config)
17+
18+
The configuration section defines the basic setup of your collection flow:
19+
20+
<CodeBlock lang="json" code={`{
21+
"config": {
22+
"apiUrl": "https://api.example.com",
23+
"steps": [
24+
{
25+
"stateName": "personal_info",
26+
"orderNumber": 1
27+
},
28+
{
29+
"stateName": "company_details",
30+
"orderNumber": 2
31+
}
32+
]
33+
}
34+
}`}/>
35+
36+
### State Management
37+
38+
The state section tracks the current progress and status of the collection flow:
39+
40+
<CodeBlock lang="json" code={`{
41+
"state": {
42+
"currentStep": "company_details",
43+
"status": "inprogress",
44+
"progressBreakdown": {
45+
"personal_info": true,
46+
"company_details": false
47+
}
48+
}
49+
}`}/>
50+
51+
#### Status Values
52+
53+
The collection flow can have the following status values:
54+
55+
- `pending`: Initial state, awaiting user data entry
56+
- `inprogress`: Active user engagement with form submission ongoing
57+
- `completed`: All steps finished, awaiting plugin processing and review
58+
- `approved`: Application approved by Backoffice
59+
- `revision`: Returned to client for corrections
60+
- `rejected`: Application rejected by Backoffice
61+
- `failed`: Plugin execution failure
62+
63+
### Additional Information
64+
65+
The context can include supplementary data used by plugins:
66+
67+
<CodeBlock lang="json" code={`{
68+
"additionalInformation": {
69+
"customField": "value",
70+
"pluginSpecificData": {
71+
// Plugin-specific information
72+
}
73+
}
74+
}`}/>
75+
76+
## Monitoring and Debugging
77+
78+
You can inspect the workflow context to:
79+
80+
1. Track progress through the collection flow
81+
2. Debug issues with form submissions
82+
3. Understand the current state of plugin processing
83+
4. Verify configuration settings
84+
5. Monitor user progression through steps
85+
86+
To access the workflow context, you can use the workflow runtime API or inspect it through the Backoffice interface.
87+
88+
## Real-time Updates
89+
90+
The context maintains bidirectional updates, meaning changes can occur from:
91+
92+
- Frontend user interactions
93+
- Backend plugin processing
94+
- Administrative actions in the Backoffice
95+
- System automated processes
96+
97+
This ensures you always have an accurate view of the collection flow's current state.

0 commit comments

Comments
 (0)