You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide explains how to implement workflow queries that return preformatted data for enhanced rendering in Cadence Web UI. This feature allows workflow authors to return structured data in various formats (Markdown, CSV, images, etc.) that can be rendered directly in the Cadence Web interface, providing richer visualization and better user experience.
9
+
This guide explains how to implement workflow queries that return preformatted data for enhanced rendering in Cadence Web UI. This feature allows workflow authors to return structured data in Markdown format that can be rendered directly in the Cadence Web interface, providing richer visualization and better user experience.
13
10
14
11
The formatted data feature enables workflows to respond to queries with data that includes rendering instructions, allowing the UI to display content beyond simple text responses.
15
12
16
-
</details>
13
+
---
17
14
18
-
<details>
19
-
<summary><h2>Overview</h2></summary>
15
+
## Overview
20
16
21
17
### The Goal
22
18
23
19
Support rendering preformatted data on cadence-web in places such as the Query API. Examples of data that can be preformatted include:
24
20
25
21
-**Markdown** - Rich text with formatting, links, and structure
26
-
-**CSV** - Tabular data for easy viewing
27
-
-**JPEG/PNG images** - Visual content and charts
28
-
-**SVG** - Scalable vector graphics
29
22
30
23
The reason for prerendering is that workflow authors have access to workflow data that they may wish to render on the Cadence UI, and such rendering entirely client-side is difficult given the current Cadence workflow API.
31
24
@@ -37,10 +30,9 @@ When a workflow query responds with data in a specific shape, Cadence Web can re
37
30
2. A MIME type format specifier
38
31
3. The actual formatted data
39
32
40
-
</details>
33
+
---
41
34
42
-
<details>
43
-
<summary><h2>Response Format</h2></summary>
35
+
## Response Format
44
36
45
37
### Basic Structure
46
38
@@ -54,21 +46,15 @@ To enable formatted rendering, your workflow query must respond with data in the
54
46
}
55
47
```
56
48
57
-
### Supported MIME Types
49
+
### Supported MIME Type
58
50
59
-
The `format` field should contain well-known MIME type identifiers:
51
+
The `format` field should contain the supported MIME type identifier:
Taking input from a workflow and rendering it as HTML without sanitization is a potential XSS (Cross-Site Scripting) vector. An attacker could inject malicious HTML tags including:
213
+
Taking input from a workflow and rendering it as Markdown without sanitization is a potential XSS (Cross-Site Scripting) vector. An attacker could inject malicious content including:
264
214
265
-
-`<script>`tags for JavaScript execution
266
-
-`<img>` tags that make unauthorized HTTP requests
267
-
-Other tags that could exfiltrate data or leak secure tokens
215
+
-Raw HTML tags that might be processed by the Markdown renderer
216
+
-JavaScript in HTML tags embedded within Markdown
217
+
-Malicious links or images that could exfiltrate data
268
218
269
219
### Mitigation Strategies
270
220
271
221
1.**Server-Side Sanitization**: All content must be sanitized before rendering
-[Cadence Community Slack](https://join.slack.com/t/cadenceworkflow/shared_invite/enQtNDczNTgxMjYyNzlmLTJmZDlkMjNhZjRmNjhkYjdlN2I0NGQ0YzgwZGUxM2JmNWFlZTI0OTM0NDgzZTZjNTk4YWYyOGQ3YjgzNzUwNjQ)
description="🎯 Get production-ready monitoring for your Cadence workflows! Our comprehensive guide covers ServiceMonitor setup, automated metrics scraping, and pre-built dashboards. Perfect for Kubernetes deployments."
29
-
linkUrl="/docs/concepts/grafana-helm-setup"
30
-
linkText="🚀 Explore the Guide"
26
+
featureId="workflow_queries_formatted_data_2025"
27
+
title="🎨 Workflow Queries with Formatted Data "
28
+
description="Transform your workflow queries with rich formatting! Return Markdown directly in Cadence Web UI. Create interactive status reports, data tables for better workflow monitoring."
0 commit comments