Display Message
Allows to display a message in the app.product-live.com Actions panel.
Examples
json
{
"name": "notification-display-message",
"taskReferenceName": "display_message",
"description": "Send emails",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"request": "${file_transformation_html.output.file}",
"requestLocal": {
"eng": "${file_eng.output.file}",
"fra": "${file_fra.output.file}",
"deu": "${file_deu.output.file}",
"spa": "${file_spa.output.file}"
},
"height": 300
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Definition
| Property | Type | Required | Description |
|---|---|---|---|
| The name (or type) of the task | |||
| The unique name of the task in your job. It is used to reference this task in the workflow. | |||
| The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW. | |||
| : | true: the job continues if there is an error on this task. false: the job fails. | ||
| Input parameters of the task. See below |
Inputs
| Property | Type | Required | Description |
|---|---|---|---|
| A valid input in HTML format. | |||
| An object where keys are ISO languages and values must be a valid | |||
| A valid input in HTML format. | |||
| A valid input in HTML format. | |||
| A valid input in HTML format. | |||
| A valid input in HTML format. | |||
| The display height in px. | |||
| : | Default: falseWhen set to true, the report generation is skipped and thus the report is not available in the output parameters. | ||
| : | Default: info It defines the log level to be recorded in the report. error < warning < info < debug |
Important
- It must be a valid HTML file. See examples.
- You cannot use javascript for security reasons.
Input request
Example
html
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
margin: 0;
padding: 0;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana;
}
.table-display-message {
border-collapse: collapse;
}
.table-display-message th {
border: 1px solid #d9d9d9;
padding: 5px;
}
.table-display-message td {
border: 1px solid #d9d9d9;
padding: 5px;
}
</style>
</head>
<body>
Dans l'export il y a <b>65</b> produits
<table class="table-display-message">
<thead>
<tr>
<th>Total</th>
<th>Statut</th>
<th>Lien</th>
</tr>
</thead>
<tbody>
<tr>
<td>30</td>
<td>Valides</td>
<td><a href="https://app.product-live.com/search">Lien</a></td>
</tr>
<tr>
<td>35</td>
<td>Non valides</td>
<td><a href="https://app.product-live.com/search">Lien</a></td>
</tr>
</tbody>
</table>
</body>
</html>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Outputs
| Property | Type | Description |
|---|---|---|
| The message to display in the Actions panel. | ||
An XML file containing a set of logs related to the execution of the task. This output is not available if the input skipReportGeneration=true. |
The message only shows if the job exposes it
Producing the message is not enough to display it: the task's message output must be exposed as a job result, through the job's outputParameters. A job that never exposes it runs fine and displays nothing. A single job may expose several display messages.
Falling back between languages
request is the message the interface shows by default, and requestLocal only adds variants on top of it. When there is no entry for the viewer's language, the request message is displayed - so always provide a usable request, even when you localise.
The HTML you provide is sanitized
The document is passed through a sanitizer before being displayed, and anything outside the following allowlist is stripped silently - the message still displays, without it.
Allowed elements:
html, head, meta, base, style, body, div, span, p, br, hr, h3, h4, h5, h6, blockquote, pre, code, b, i, strong, em, strike, a, ul, ol, li, table, caption, thead, tbody, tr, th, td
Allowed attributes:
href, target, rel, lang, charset, name, content, class
Two consequences worth knowing before you design a message:
- Images are not possible. Neither
imgnor thesrcattribute is allowed - which is consistent with the limits above (no assets, no public urls). h1andh2are not allowed either; start your headings ath3. Inlinestyleattributes are stripped too, although a<style>element is accepted, so put your CSS there and target it withclass.
Limits and additional notes
- You cannot reference assets in assets folder.
- You cannot reference assets on public urls.
- You cannot use javascript within your HTML document.