LetsFlow
Search…
Asset
An asset can be any type of structured data relevant to the process.

Scenario asset

Items in the assets property of the scenario aren't asset objects, but JSON schemas defining the properties available for the asset once instantiated in the process.
Assets don't have any required properties, but it's common for an asset to have a title property. If this property exist, it's copied from the JSON schema.
YAML
JSON
1
assets:
2
contract:
3
properties:
4
id:
5
type: string
6
format: uri
7
name:
8
type: string
9
book:
10
properties:
11
id:
12
type: string
13
format: uri
14
title:
15
type: string
16
isbn:
17
type: string
18
pattern: "^\\d{13}quot;
Copied!
1
{
2
"assets": {
3
"request": {
4
"type": "object",
5
"properties": {
6
"description": {
7
"type": "string"
8
},
9
"urgency": {
10
"type": "string",
11
"enum": [
12
"normal",
13
"high",
14
"critical"
15
]
16
}
17
}
18
},
19
"quotation": {
20
"type": "object",
21
"properties": {
22
"title": {
23
"type": "string"
24
},
25
"url": {
26
"type": "string"
27
}
28
}
29
}
30
}
31
}
Copied!
Properties that aren't defined don't exist and can't be set, unless additionalProperties is set in the actor definition.

Scenario definition

The definitions property contains a set of immutable assets. Unlike the assets property, the items aren't JSON schemas but (instantiated) asset objects. These are simply copied to the process.
YAML
JSON
1
definitions:
2
request_form:
3
title: Quotation request form
4
definition:
5
- fields:
6
- type: external-select
7
label: Supplier
8
name: supplier
9
url: https://jsonplaceholder.typicode.com/users
10
optionText: name
11
optionValue: "{ name, email, phone }"
12
required: true
13
- type: textarea
14
label: Description
15
name: description
16
helptip: Which service would you like a quotation for?
17
- type: select
18
label: Urgency
19
name: urgency
20
options:
21
- value: normal
22
label: Normal
23
- value: high
24
label: High
25
- value: critical
26
label: Critical
Copied!
1
{
2
"definitions": {
3
"request_form": {
4
"title": "Quotation request form",
5
"definition": [
6
{
7
"fields": [
8
{
9
"type": "external-select",
10
"label": "Supplier",
11
"name": "supplier",
12
"url": "https://jsonplaceholder.typicode.com/users",
13
"optionText": "name",
14
"optionValue": "{ name, email, phone }",
15
"required": true
16
},
17
{
18
"type": "textarea",
19
"label": "Description",
20
"name": "description",
21
"helptip": "Which service would you like a quotation for?"
22
},
23
{
24
"type": "select",
25
"label": "Urgency",
26
"name": "urgency",
27
"options": [
28
{
29
"value": "normal",
30
"label": "Normal"
31
},
32
{
33
"value": "high",
34
"label": "High"
35
},
36
{
37
"value": "critical",
38
"label": "Critical"
39
}
40
]
41
}
42
]
43
}
44
]
45
}
46
}
47
}
Copied!
Definitions CAN NEVER be modified. If you want an asset that has default values when the process is created, but where the values may still change during the process, define it under assets and use the default property.
Last modified 2yr ago