@uipath/skills 1.207.0-preview.2139 → 1.207.0-preview.2143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CODEOWNERS +8 -0
- package/README.md +1 -0
- package/assets/skill-status.json +8 -0
- package/assets/uip-catalog-snapshot.json +13 -0
- package/package.json +1 -1
- package/skills/uipath-ontology/SKILL.md +316 -0
- package/skills/uipath-ontology/references/artifacts-guide.md +53 -0
- package/skills/uipath-ontology/references/document-guide.md +128 -0
- package/skills/uipath-ontology/references/entity-guide.md +162 -0
- package/skills/uipath-ontology/references/errors-guide.md +70 -0
- package/skills/uipath-ontology/references/mapping-yarrrml-guide.md +260 -0
- package/skills/uipath-ontology/references/owl-patterns-guide.md +377 -0
- package/skills/uipath-ontology/references/relationships-guide.md +97 -0
- package/skills/uipath-ontology/references/shacl-patterns-guide.md +220 -0
- package/skills/uipath-ontology/references/summary-context-guide.md +61 -0
- package/skills/uipath-planner/SKILL.md +2 -2
- package/skills/uipath-planner/references/shared/skill-mapping-guide.md +1 -0
- package/skills/uipath-planner/scripts/check-genome.mjs +1 -0
- package/skills/uipath-platform/SKILL.md +2 -1
- package/skills/uipath-platform/references/orchestrator/end-to-end-readiness-guide.md +68 -0
- package/skills/uipath-platform/references/orchestrator/manage-sessions.md +3 -3
- package/skills/uipath-platform/references/orchestrator/run-jobs.md +1 -1
- package/skills/uipath-platform/references/orchestrator/triggers-and-webhooks.md +1 -1
- package/skills/uipath-rpa/references/cli-reference.md +2 -0
- package/skills/uipath-solution/SKILL.md +1 -1
- package/skills/uipath-solution/references/develop-solution.md +4 -2
- package/skills/uipath-solution/references/pack-and-deploy.md +4 -0
- package/skills/uipath-solution/references/scenarios/local-entity-file-field.md +30 -0
- package/skills/uipath-solution/references/scenarios/ontology-solution.md +37 -0
- package/skills/uipath-solution/references/scenarios.md +4 -0
- package/version-manifest.json +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Entity Guide
|
|
2
|
+
|
|
3
|
+
An ontology class is backed by a **local Data Fabric entity** in the same solution. Entities, choice sets and federated entities are authored with `uip df … --local` and referenced by name: the mapping uses `table: <EntityName>`. Nothing is created on the tenant before deploy. Never look up, write or pass a Data Fabric id (`entityId`, `folderId`, a field, choice-set or connection id) or a GUID, not even inline.
|
|
4
|
+
|
|
5
|
+
Each local entity is an entity project (`<Name>/project.uiproj` and `<Name>.entity`) with its resource at `resources/solution_folder/entity/native/<Name>.json`. A federated entity's resource is `entity/federated/<Name>.json`. A choice set's is `choiceSet/<Name>.json`.
|
|
6
|
+
|
|
7
|
+
For field options beyond this table, delegate to `uipath-platform` (Data Fabric) by name. If that skill is absent, use the table and ask the user.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## xsd to Data Fabric type
|
|
12
|
+
|
|
13
|
+
| Schema range | Field type | Note |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `xsd:string` | `STRING` | `MULTILINE_TEXT` for long free text |
|
|
16
|
+
| `xsd:anyURI` | `STRING` | |
|
|
17
|
+
| `xsd:decimal`, `xsd:double`, `xsd:float` | `DECIMAL` | set `decimalPrecision` when known |
|
|
18
|
+
| `xsd:integer`, `xsd:int`, `xsd:long` | `DECIMAL` | `decimalPrecision: 0` |
|
|
19
|
+
| `xsd:boolean` | `BOOLEAN` | |
|
|
20
|
+
| `xsd:date` | `DATE` | |
|
|
21
|
+
| `xsd:dateTime` | `DATETIME_WITH_TZ` | |
|
|
22
|
+
| object property | `RELATIONSHIP` | one field on the referencing entity. See [relationships-guide.md](relationships-guide.md) |
|
|
23
|
+
| value list, one value | `CHOICE_SET_SINGLE` | single-select: one value per row; names a local choice set |
|
|
24
|
+
| value list, several values | `CHOICE_SET_MULTIPLE` | multi-select: several values per row; names a local choice set |
|
|
25
|
+
| file attachment | `FILE` | the property range is `xsd:string`. Every later upgrade reports `TypeIncompatible` on this field; `uipath-solution` finishes that upgrade by keeping the installed entity, so fields added to or changed on it in a later version are not applied. Tell the user before they confirm the field |
|
|
26
|
+
|
|
27
|
+
Never use `UUID`, `INTEGER` or `DATETIME`: the Data Fabric UI renders them broken and `--local` refuses them. Never substitute `STRING` for a relationship or a choice set.
|
|
28
|
+
|
|
29
|
+
The data property's `DataPropertyRange` stays the xsd type: an integer column is `xsd:integer` in the schema and `DECIMAL` with `decimalPrecision: 0` in the entity.
|
|
30
|
+
|
|
31
|
+
- Entity names match `^[a-zA-Z][a-zA-Z0-9_]{2,99}$` and are unique in the solution.
|
|
32
|
+
- **`Order` and `Group` are never entity names.** They are reserved SQL keywords, and the local entity create refuses them (`NAME_RESERVED`). Name the entity for the domain instead: `SalesOrder`, `PurchaseOrder`, `TeamGroup`. The class's `rdfs:label` may still say "Order".
|
|
33
|
+
- C# and VB keywords (`Case`, `Class`, `New`, …) are refused as entity, field and choice-set names. Pick a domain word (`WorkItem`, `Category`, `IsNew`).
|
|
34
|
+
- **Field names match `^[a-zA-Z][a-zA-Z0-9]{2,99}$`, with no underscores.** Write `orderDate`, not `order_date`. `RecordOwner` and `Version` are reserved field names, like the system fields below. This includes a federated entity's field names: a connector field called `version` needs an alias (`{ "source": "version", "name": "orderVersion" }`), while the ontology property may keep the name `version`.
|
|
35
|
+
- `defaultValue` is text for every type: a `DECIMAL` default is `"0"`, not `0`.
|
|
36
|
+
- **System fields are never declared:** `Id`, `CreateTime`, `UpdateTime`, `CreatedBy`, `UpdatedBy`. Use `Id` as the key in the mapping subject template and in joins.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## How a definition is treated
|
|
41
|
+
|
|
42
|
+
Record an `ENTITY_SOURCE` per entity. What the user gives is authoritative.
|
|
43
|
+
|
|
44
|
+
| ENTITY_SOURCE | Meaning | What to do |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `supplied` | The user gave a definition: a JSON body, a table, or a local entity already in the solution | Use it verbatim as the body. Never change names, types, required flags or display names. If a supplied type is not in the table above, ask which type to use |
|
|
47
|
+
| `described` | The user described fields in words | Keep every stated name, type and required flag. Fill gaps (display names, lengths) and show them |
|
|
48
|
+
| `generated` | You proposed the entity from the domain | Show it and get one confirmation |
|
|
49
|
+
|
|
50
|
+
Entity definitions already confirmed in the saved model (`input/model.md`) are used verbatim. Otherwise ask before changing anything the user stated. The schema and mapping follow the entity and field names exactly (case-sensitive). Every `$(column)` in the mapping is a field of the entity named in that mapping's `table:`, or a system field.
|
|
51
|
+
|
|
52
|
+
Preview the full schema (entities, fields, choice sets and values) before every create.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Duplicate check
|
|
57
|
+
|
|
58
|
+
Run before any create:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
uip df choice-sets list --local --output json
|
|
62
|
+
uip df entities list --local --output json
|
|
63
|
+
uip df choice-sets list-values <C> --local --output json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Entity names are unique across the solution. A matching definition is reused. A different one is shown to the user as a diff, and the user is asked before `uip df entities update <E> --local` or `uip df choice-set-values create|delete <C> … --local`. Never update silently.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Local create order
|
|
71
|
+
|
|
72
|
+
1. **Connections.** The connections of federated sources are already in the solution (Stage 3's connection import).
|
|
73
|
+
2. **Choice sets, with their values.**
|
|
74
|
+
3. **Entities with no `RELATIONSHIP` fields.**
|
|
75
|
+
4. **Entities in dependency order:** a referenced entity before any entity that references it.
|
|
76
|
+
5. **Federated entities,** after their connection and their native sources.
|
|
77
|
+
6. **The artifacts come after all of these.** The mapping uses the created entity and field names exactly, including a federated entity's external field names as `create --local` wrote them from the connector.
|
|
78
|
+
|
|
79
|
+
### Choice sets
|
|
80
|
+
|
|
81
|
+
`CHOICE_SETS` holds value names only. A value name is letters and digits and starts with a letter.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
uip df choice-sets create OrderStatus --local --display-name "Order status" --output json
|
|
85
|
+
uip df choice-set-values create <C> <VALUE> --local --output json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Run `choice-set-values create` once per value, in order (`Open`, `Shipped`, `Cancelled`).
|
|
89
|
+
|
|
90
|
+
### Native entities
|
|
91
|
+
|
|
92
|
+
The body is a Data Fabric entity body with names in place of ids. Pass it as is. The CLI resolves each name inside the solution:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
uip df entities create SalesOrder --local --body '<BODY>' --output json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"displayName": "Sales order",
|
|
101
|
+
"description": "ONE row per customer order.",
|
|
102
|
+
"fields": [
|
|
103
|
+
{ "name": "orderDate", "type": "DATETIME_WITH_TZ", "displayName": "Order date" },
|
|
104
|
+
{ "name": "totalAmount", "type": "DECIMAL", "decimalPrecision": 2, "minValue": 0, "defaultValue": "0" },
|
|
105
|
+
{ "name": "quantity", "type": "DECIMAL", "decimalPrecision": 0 },
|
|
106
|
+
{ "name": "customer", "type": "RELATIONSHIP", "displayName": "Customer", "referenceEntityName": "Customer" },
|
|
107
|
+
{ "name": "status", "type": "CHOICE_SET_SINGLE", "displayName": "Status", "choiceSetName": "OrderStatus" }
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- A `RELATIONSHIP` field carries `"referenceEntityName": "<E>"`, a native local entity in the same solution, and optionally `"referenceFieldName"` (default `Id`).
|
|
113
|
+
- A choice-set field carries `"choiceSetName": "<C>"`, a local choice set in the same solution.
|
|
114
|
+
- Other field keys: `name`, `type`, `displayName`, `description`, `isRequired`, `isUnique`, `lengthLimit`, `decimalPrecision`, `minValue`, `maxValue`, `defaultValue`.
|
|
115
|
+
- A target that is not in the solution is refused with `REFERENCE_TARGET_NOT_FOUND` or `CHOICE_SET_NOT_FOUND`, a federated target with `RELATIONSHIP_TARGET_FEDERATED`, and a field that would close a reference cycle with `RELATIONSHIP_CYCLE`. Fix the create order or the name; the codes are in the recovery table in [errors-guide.md](errors-guide.md).
|
|
116
|
+
- If the CLI does not know `referenceEntityName` or `choiceSetName` at all, or has no local choice sets or federated entities, the CLI build is too old: stop and tell the user.
|
|
117
|
+
|
|
118
|
+
Change an existing entity with `uip df entities update <E> --local --body '<CHANGE>' --output json`, where the body takes `addFields`, `updateFields` and `removeFields` plus `displayName` and `description`. A changed field type is rejected when the entity is deployed into a folder that already holds it. A federated entity cannot be updated: delete it and create it again. After any create or update, validate and fix what is reported with `uip df entities update <E> --local`.
|
|
119
|
+
|
|
120
|
+
### Federated entities
|
|
121
|
+
|
|
122
|
+
A federated entity reads from connector sources, local native entities, or both. Create it after its sources exist:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
uip df entities create <F> --local --body '<FEDERATED_BODY>' --output json
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The resource is written to `entity/federated/<F>.json`. With at least one connector source the command needs `uip login`, because the CLI reads the connection and each source object's fields from the tenant. With local native sources only it runs offline and takes the field types from those entities.
|
|
129
|
+
|
|
130
|
+
Build `<FEDERATED_BODY>` from the sources and joins the user confirmed. The sources become `externalFields`:
|
|
131
|
+
|
|
132
|
+
- A connector source keeps `connectionName` (already a connection resource in the solution), `object` and `fields`. The `connector` key is for finding the connection and is not passed.
|
|
133
|
+
- A native source keeps `entityName` (a local entity) and `fields`. Map and join only its plain columns (`STRING`, `DECIMAL`, `BOOLEAN`, `DATE`, `DATETIME_WITH_TZ`, `MULTILINE_TEXT`, `MULTILINE_MAX`). A relationship, choice-set, file or auto-number column, or an imported type such as `INT`, is refused with `UNSUPPORTED_SOURCE_COLUMN` before anything is written, even with a `type` override. Such a column may stay on the entity; leave it out of `fields` and joins.
|
|
134
|
+
- `fields` entries are plain external field names, or override objects `{ "source": "<FIELD>", "name", "type", "direction", "searchable", "sortable", "requiredForRead" }` where only `source` is required. Field types come from the connector (connector source) or the local entity (native source).
|
|
135
|
+
- Each join in `joins` keeps `source`, `relatedSource`, `sourceField`, `relatedField`, `sourceConnectionName` and `relatedConnectionName`. For a connector source the connection name goes in `sourceConnectionName` / `relatedConnectionName`; for a native source, the entity name.
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"displayName": "<DISPLAY_NAME>",
|
|
140
|
+
"description": "<DESCRIPTION>",
|
|
141
|
+
"externalFields": [
|
|
142
|
+
{
|
|
143
|
+
"connectionName": "<CONNECTION>",
|
|
144
|
+
"object": "<OBJECT>",
|
|
145
|
+
"fields": ["<FIELD>", { "source": "<FIELD>", "name": "<FIELD_ALIAS>", "type": "STRING" }]
|
|
146
|
+
},
|
|
147
|
+
{ "entityName": "<NATIVE_ENTITY>", "fields": ["<FIELD>"] }
|
|
148
|
+
],
|
|
149
|
+
"joins": [
|
|
150
|
+
{
|
|
151
|
+
"source": "<SOURCE>",
|
|
152
|
+
"relatedSource": "<RELATED_SOURCE>",
|
|
153
|
+
"sourceField": "<SOURCE_FIELD>",
|
|
154
|
+
"relatedField": "<RELATED_FIELD>",
|
|
155
|
+
"sourceConnectionName": "<CONNECTION>",
|
|
156
|
+
"relatedConnectionName": "<NATIVE_ENTITY>"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
A federated entity is never a `RELATIONSHIP` target; see [relationships-guide.md](relationships-guide.md).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Errors Guide
|
|
2
|
+
|
|
3
|
+
Act on each violation's `rule`, `file` and `suggestion` (`Rule`, `File`, `Suggestion` in a success envelope; lower case in a failure's `Data`); never re-implement a check. Per-file rules come from `artifacts check`, `files add` and `validate`; cross-file rules from `validate`. Error codes come in the `Code` of a failure envelope; `NAME_RESERVED` and the field-name rules of `uip df` come in its `Instructions`.
|
|
4
|
+
|
|
5
|
+
## Recovery table
|
|
6
|
+
|
|
7
|
+
| Signal | Source | Action |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `OFN-001`, `OFN-002`, `OFN-004`, `OFN-005`, `OFN-009` | local | Fix `{name}.ofn` per [owl-patterns-guide.md](owl-patterns-guide.md); `artifacts check`, `files add`, validate |
|
|
10
|
+
| `SHC-002`, `SHC-003`, `SHC-004`, `SHC-006`, `SHC-007`, `SHC-008`, `SHC-009`, `SHC-010` | local | Fix the constraints file per [shacl-patterns-guide.md](shacl-patterns-guide.md); same loop |
|
|
11
|
+
| `SHC-011` | local | WARNING: the `.ttl` declares no SHACL shape, so it is probably another artifact type under the wrong extension. Rename it to its real type's extension, or drop it with `uip ont files remove` (constraints are optional) |
|
|
12
|
+
| `MAP-002`, `MAP-004`, `MAP-005`, `MAP-006` | local | Fix the mapping per [mapping-yarrrml-guide.md](mapping-yarrrml-guide.md); same loop |
|
|
13
|
+
| `SUM-003` | local | The summary has a root `@context`, so it is the context file: rename it `{name}-context.json` (or `--type context`), or remove `@context` from the summary; same loop |
|
|
14
|
+
| `CTX-001`, `CTX-002`, `CTX-003`, `CTX-005`, `CTX-006`, `CTX-007`, `SUM-001`, `SUM-002` | local | Fix the context or summary per [summary-context-guide.md](summary-context-guide.md), or drop it with `uip ont files remove`; same loop |
|
|
15
|
+
| `MAP-012` | local | Remove every Data Fabric id from the mapping; keep `table: <Entity>` |
|
|
16
|
+
| `XF-001` | local | Exactly one schema, one mapping, any number of constraints (optional), at most one summary and one context; `files add` / `files remove` |
|
|
17
|
+
| `XF-002` | local | WARNING: re-run `uip ont files add` to rebuild the zip. ERROR: rebuild it with `files add` for every artifact |
|
|
18
|
+
| `XF-003`, `XF-004` | local | Use `https://ontology.uipath.com/<name>#` and `https://ontology.uipath.com/shapes#` for `shape:` |
|
|
19
|
+
| `XF-005` | local | Remove the construct outside OWL 2 QL; record the rule in `rdfs:comment` or SHACL |
|
|
20
|
+
| `XF-006`, `XF-008` | local | Declare the term in the schema, or fix the name in the mapping or constraints |
|
|
21
|
+
| `XF-007` | local | Add `rdfs:label` and `rdfs:comment` to every class and property |
|
|
22
|
+
| `XF-009` | local | Give the class a property and a mapping block over a local entity, or fold it into a comment |
|
|
23
|
+
| `XF-010` | local | Map every property; give every class a `sh:targetClass` shape |
|
|
24
|
+
| `XF-012`, `XF-013` | local | The entity is missing from the solution or the column isn't a field. Add the local entity (`cd "<SOLUTION_DIR>" && uip df entities create <E> --local --body '<BODY>' --output json`) and link it (`uip ont update <Name> --local --add-entity <E> --solution-folder "<SOLUTION_DIR>" --output json`), or fix the name; when the field is genuinely missing, after confirmation `cd "<SOLUTION_DIR>" && uip df entities update <E> --local --body '<CHANGE>' --output json` adding it, then validate |
|
|
25
|
+
| `XF-014`, `XF-015` | local | Declare the object property or add the join per [mapping-yarrrml-guide.md](mapping-yarrrml-guide.md#joins) |
|
|
26
|
+
| `XF-017` | local | A relationship cycle among the ontology's entities. After confirmation, remove one RELATIONSHIP field of the loop locally (`cd "<SOLUTION_DIR>" && uip df entities update <E> --local --body '<CHANGE>' --output json` with `removeFields`), keep the inverse in the schema ([owl-patterns-guide.md](owl-patterns-guide.md#inverse-properties)), then validate |
|
|
27
|
+
| `XF-019` | local | Copy the choice-set value names exactly into `sh:in`; add a missing value with `cd "<SOLUTION_DIR>" && uip df choice-set-values create <C> <VALUE> --local --output json`, or author a missing choice set with `cd "<SOLUTION_DIR>" && uip df choice-sets create <C> --local --output json` and its values, then validate |
|
|
28
|
+
| `ZIP-001` | local | The zip exceeds the service limits. Split large constraint files or trim summary and context, then `uip ont files add` again |
|
|
29
|
+
| `SVC-001` | service | Every service finding is `SVC-001` on the named file. Fix the syntax it names; same loop |
|
|
30
|
+
| `ENTITY_ID_IGNORED` | service | An `SVC-001` WARNING naming it; same fix as `MAP-012` |
|
|
31
|
+
| `ValidationFailed` | CLI | The ERRORs are in `Data`; fix each per the rows above, then validate |
|
|
32
|
+
| `ServiceValidationUnavailable` | CLI | Service validation needs `uip login`; ask for it, then validate again; stop if the service stays unreachable |
|
|
33
|
+
| `ServiceValidationFailed` | CLI | The service could not validate; `Instructions` carries its answer (`Not Found` when the tenant has no validate endpoint) and `Data` the local results. Stop and tell the user; never pack as validated |
|
|
34
|
+
| `ArtifactCheckFailed` | CLI | The ERRORs are in `Data.violations`; nothing was attached. Fix them, then `files add` again |
|
|
35
|
+
| `ArtifactTypeUnresolved`, `InvalidArtifactFileName` | CLI | Rename the file to the `{name}-…` convention (`{name}-summary.json`, `{name}-context.json`) or pass `--type`; never name a file `ontology.json` |
|
|
36
|
+
| `ArtifactTypeAlreadyPresent` | CLI | Re-add under the existing file name, or `files remove` the old one first |
|
|
37
|
+
| `ArtifactTypeNotSupported` | CLI | Drop the file; only the five artifact types are supported |
|
|
38
|
+
| `ArtifactNotFound` | CLI | Check `uip ont files list <Name> --local` and use the listed name |
|
|
39
|
+
| `NoParentSolution` | CLI | `--solution-folder` holds no `.uipx`; fix `SOLUTION_DIR` or init the solution (Stage 3) |
|
|
40
|
+
| `OntologyNotFound` | CLI | Create the resource (Stage 6), or fix the name from `uip ont list --local` |
|
|
41
|
+
| `OntologyNameTaken` | CLI | The name is used in the solution: ask for another, or update the existing resource |
|
|
42
|
+
| `InvalidOntologyName` | CLI | Use a name matching the `ONTOLOGY_NAME` pattern |
|
|
43
|
+
| `EntityNotFound` | CLI | Author it locally with `uip df entities create <E> --local --body '<BODY>'` (Stage 4), or fix the name |
|
|
44
|
+
| `LocalFlagRequired` | CLI | Add `--local` |
|
|
45
|
+
| `LocalAndFolderConflict`, `FolderKeyAndPathConflict`, `InvalidArguments` | CLI | Drop the flag that doesn't belong to the local flow (`files list` takes `--local` or `--package`, never both) |
|
|
46
|
+
| `InvalidFolderKey`, `InvalidFolderPath` | CLI | The local flow passes no folder key or path; drop it |
|
|
47
|
+
| `ConfirmationRequired` | CLI | `uip ont delete` needs `--yes`; ask the user first |
|
|
48
|
+
| `ResourceFileMissing`, `InvalidResourceArchive` | CLI | Rebuild the zip with `uip ont files add` for every artifact |
|
|
49
|
+
| `InvalidAttachedFile`, `FileAttachNotSupported`, `ResourceNotFound` | CLI | The attach was refused; read `Instructions`, fix the solution state, then `files add` again |
|
|
50
|
+
| `PackageNotFound`, `OntologyNotInPackage` | CLI | Pass the `PACKAGE_PATH` pack reported; if the ontology is missing, validate and pack again |
|
|
51
|
+
| `OntologyManifestNotWritten` | CLI | Re-run `uip ont files add`; if it repeats, stop and report the CLI version |
|
|
52
|
+
| `Ambiguous match`, `No remote resource found with key` | connection import | Pass `--folder-path "<CONNECTION_FOLDER>"` to the `--kind Connection` import, or `--cloud-key` from the listed candidates |
|
|
53
|
+
| `CONNECTION_NOT_FOUND`, or a federated connection missing from the solution | `uip df` | Import the connection (Stage 3), then create the federated entity again |
|
|
54
|
+
| `Not logged in` on a federated `uip df entities create … --local` | `uip df` | A connector source makes that create read the connection and the source object's fields from the tenant; ask for `uip login`, then retry. A federated entity over local native sources only never needs it |
|
|
55
|
+
| `unknown command 'ont'` | `uip` | The installed `uip` predates the ontology tool. Stop and ask the user to update `uip`, then re-run from the saved model. Never pack, refresh or import resources instead: a package without the ontology is not the result |
|
|
56
|
+
| `NAME_RESERVED` (in `Instructions`) | `uip df` | The entity is named `Order` or `Group`. Propose a domain name (`SalesOrder`), confirm it, use it in the class map, every body and the mapping, then create it |
|
|
57
|
+
| `REFERENCE_TARGET_NOT_FOUND`, `CHOICE_SET_NOT_FOUND` | `uip df` | The create order is wrong or a name is misspelled: create the target entity or choice set first, then retry |
|
|
58
|
+
| `RELATIONSHIP_CYCLE` | `uip df` | The field would close a reference cycle. Keep the relationship on one side and express the inverse with `InverseObjectProperties` ([relationships-guide.md](relationships-guide.md)) |
|
|
59
|
+
| `RELATIONSHIP_TARGET_FEDERATED` | `uip df` | A federated entity can't be a `RELATIONSHIP` target: use a plain column joined to its key column |
|
|
60
|
+
| `FEDERATED_UPDATE_NOT_SUPPORTED` | `uip df` | After confirmation, `uip df entities delete <F> --local --yes`, then create it again with the changed body |
|
|
61
|
+
| `ENTITY_IN_USE`, `CHOICE_SET_IN_USE` | `uip df` | Another entity's field still references it: after confirmation, change that field first (`uip df entities update <E> --local`) |
|
|
62
|
+
| `CHOICE_SET_NAME_TAKEN`, `CHOICE_SET_VALUE_NAME_TAKEN`, `ENTITY_NAME_TAKEN`, "Entity '<E>' already exists" | `uip df` | The duplicate check was skipped: reuse the existing choice set, value or entity (names are unique regardless of case) |
|
|
63
|
+
| `INVALID_NAME` | `uip df` | The choice-set name breaks the naming rules or is a reserved keyword: pick a domain name per [entity-guide.md](entity-guide.md) |
|
|
64
|
+
| `INVALID_FEDERATED_SOURCE`, `INVALID_JOIN`, `UNSUPPORTED_SOURCE_COLUMN` | `uip df` | Fix the federated body: each source names an `entityName` or a `connectionName` + `object`, each join side names a source of this entity, no join relates the primary source to itself, and every native source column it maps or joins on is a plain column. A relationship, choice-set, file or auto-number column, or an imported type such as `INT`, is refused even with a `type` override: leave it out of `fields` and joins ([entity-guide.md](entity-guide.md#federated-entities)) |
|
|
65
|
+
| `referenceEntityName` or `choiceSetName` unknown, or local choice sets or federated create unknown | `uip df` | The `uip` build cannot author these locally. Stop and ask for a newer CLI; never substitute `STRING` |
|
|
66
|
+
| `InstallError` "Missing in the target folder" | deploy, via `uipath-solution` | The entity, column or choice set is not in the solution. Add it locally (`cd "<SOLUTION_DIR>" && uip df entities create <E> --local --output json`, or `entities update`), validate, pack, and redeploy through `uipath-solution` |
|
|
67
|
+
| Packed listing differs from the validated set | `files list --package` | `files add` again, validate, pack |
|
|
68
|
+
| `BLOCKED_AMBIGUITY` | skill | A class-to-entity, join or identifier has no unique answer: stop and ask |
|
|
69
|
+
|
|
70
|
+
Deploy-stage rejections other than "Missing in the target folder" (`TypeIncompatible`, `EntityConflict`, an ontology rename onto a taken name) belong to `uipath-solution`.
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# YARRRML Mapping Reference
|
|
2
|
+
|
|
3
|
+
Artifact type: `mapping` | Media type: `application/yaml` | File: `{name}-mapping.yarrrml.yml`
|
|
4
|
+
|
|
5
|
+
The mapping binds each class to a local entity **by name**. The ontology service resolves `table:` to the entity in the deployment folder at install. The mapping never carries an entity or folder identifier (rule `MAP-012`). It is an `application/yaml` artifact: check it with `uip ont artifacts check <path>/{name}-mapping.yarrrml.yml`, and the CLI sends it to the service as YAML.
|
|
6
|
+
|
|
7
|
+
Write the mapping after every entity exists in the solution. It uses the entity and field names exactly as they were created.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## File structure
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
prefixes:
|
|
15
|
+
ont: https://ontology.uipath.com/<name>#
|
|
16
|
+
|
|
17
|
+
mappings:
|
|
18
|
+
<ClassName>:
|
|
19
|
+
sources:
|
|
20
|
+
- access: datafabric
|
|
21
|
+
table: <EntityName>
|
|
22
|
+
referenceFormulation: rr:SQL2008
|
|
23
|
+
s: ont:<ClassName>/$(Id)
|
|
24
|
+
po:
|
|
25
|
+
- [a, ont:<ClassName>]
|
|
26
|
+
- [ont:<ClassName>.<propName>, $(<columnName>)]
|
|
27
|
+
- [ont:<ClassName>.<numericProp>, $(<columnName>), xsd:decimal]
|
|
28
|
+
- p: ont:<objectProperty>
|
|
29
|
+
o:
|
|
30
|
+
mapping: <TargetClassName>
|
|
31
|
+
condition:
|
|
32
|
+
function: equal
|
|
33
|
+
parameters:
|
|
34
|
+
- [str1, $(<relationshipField>)]
|
|
35
|
+
- [str2, $(Id)]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Rules
|
|
41
|
+
|
|
42
|
+
### Source block
|
|
43
|
+
- `access: datafabric`: always this literal string.
|
|
44
|
+
- `table: <EntityName>`: the local entity's name in the solution, case-sensitive. A federated entity is named the same way. No identifiers of any kind.
|
|
45
|
+
- `referenceFormulation: rr:SQL2008`: always this literal.
|
|
46
|
+
|
|
47
|
+
### Source system
|
|
48
|
+
|
|
49
|
+
The viewer shows each class with the icon of the system its values come from. It reads that only from the mapping: a source block with no `system:` key is drawn as Data Fabric's own storage, even when the entity is federated over a connector. Every class backed by a federated entity over a **connector source** names the connector key on its source block:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
Invoice:
|
|
53
|
+
sources:
|
|
54
|
+
- access: datafabric
|
|
55
|
+
table: Invoices
|
|
56
|
+
referenceFormulation: rr:SQL2008
|
|
57
|
+
system: <CONNECTOR_KEY> # e.g. uipath-coupa-coupa, the connector of the entity's connectionName
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- `<CONNECTOR_KEY>` is the `connector` of the entity's source in `FEDERATED_SOURCES` (the Integration Service connector key, never a connection name or id).
|
|
61
|
+
- A native entity, or a federated entity over local native sources only, gets no `system:`: its values are Data Fabric's.
|
|
62
|
+
- A federated entity whose fields come from more than one connector keeps the main connector on `system:` and lists the departures in a `sourceSystems:` block on the same mapping, keyed by ontology property or source column:
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
sourceSystems:
|
|
66
|
+
amountDue: uipath-workday-workdayrest
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- `system:` changes no data and no query; it only tells the viewer which icon to draw. Group classes by business area with the schema's `:domain` annotation, not by system.
|
|
70
|
+
|
|
71
|
+
### Subject template (`s:`)
|
|
72
|
+
- Pattern: `ont:{ClassName}/$(Id)`. `$(Id)` is the subject key.
|
|
73
|
+
- A federated entity over a **connector source** is keyed by the connector object's primary-key field, not by `$(Id)`: `ont:Invoice/$(invoiceId)`. Use the same column its joins target as `str2`. A federated entity over local native sources only keeps `$(Id)`.
|
|
74
|
+
- Field names are case-sensitive.
|
|
75
|
+
|
|
76
|
+
### Property-object pairs (`po:`)
|
|
77
|
+
|
|
78
|
+
**Type** (required in every mapping block):
|
|
79
|
+
```yaml
|
|
80
|
+
- [a, ont:<ClassName>]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Data property** (a column to an ontology data property):
|
|
84
|
+
```yaml
|
|
85
|
+
- [ont:<ClassName>.<propName>, $(<columnName>)]
|
|
86
|
+
- [ont:SalesOrder.totalAmount, $(totalAmount), xsd:decimal]
|
|
87
|
+
- [ont:SalesOrder.orderDate, $(orderDate), xsd:dateTime]
|
|
88
|
+
```
|
|
89
|
+
The column is a field of the entity named in this block's `table:`, written exactly as it is spelled there.
|
|
90
|
+
|
|
91
|
+
**The third element is the property's range.** The ontology service reads a two-element pair as `xsd:string`. Every data property whose `DataPropertyRange` in `{name}.ofn` is not `xsd:string` carries that same xsd type as the third element (`xsd:decimal`, `xsd:integer`, `xsd:dateTime`, `xsd:date`, `xsd:boolean`, `xsd:anyURI`). Otherwise the mapped range disagrees with the schema and with the constraints' `sh:datatype`.
|
|
92
|
+
|
|
93
|
+
**System fields.** `Id`, `CreateTime`, `UpdateTime`, `CreatedBy` and `UpdatedBy` exist on every entity. `Id` is the subject key and the join target. Never map the others as domain properties; they are not in the schema.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Joins
|
|
98
|
+
|
|
99
|
+
An object property joins two mapped classes on plain columns. `ont:{objectProperty}` must exactly match an `ObjectProperty` declared in `{name}.ofn`, and `mapping: {TargetClassName}` must be the exact key of another mapping block in this file. A missing or misspelled target silently produces no join triples.
|
|
100
|
+
|
|
101
|
+
A `RELATIONSHIP` field on the referencing entity holds the target's key. The join reads the field on the current mapping's entity and the target's `Id`:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
equal(str1=$(customer), str2=$(Id))
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
<!-- skill-lint-disable-next-line CODE-FENCE-PARSE reason="valid YAML; the linter strips the nesting of a top-level fence (skill-linter _md.fences, indent 0)" -->
|
|
108
|
+
```yaml
|
|
109
|
+
- p: ont:placedBy
|
|
110
|
+
o:
|
|
111
|
+
mapping: Customer
|
|
112
|
+
condition:
|
|
113
|
+
function: equal
|
|
114
|
+
parameters:
|
|
115
|
+
- [str1, $(customer)] # RELATIONSHIP field on SalesOrder
|
|
116
|
+
- [str2, $(Id)] # system key on Customer
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
- `str1` resolves from the **current mapping's** source rows, `str2` from the **target mapping's** rows.
|
|
120
|
+
- The join goes in the mapping of the entity that holds the field. The inverse property (`InverseObjectProperties` in the schema) gets no join; it is answered from this one. See [owl-patterns-guide.md](owl-patterns-guide.md#inverse-properties).
|
|
121
|
+
- A federated target is a plain-column join too: `str2` is the federated entity's key column. That is `Id` when the entity reads from a local native entity, and the connector object's primary-key field (for example `ClinicKey`) when it reads from a connector source. Read it from the created entity; never assume `Id`.
|
|
122
|
+
- Every object property between two mapped classes needs its join (`XF-015`), and every join needs a declared object property (`XF-014`). See [relationships-guide.md](relationships-guide.md) for choosing the key.
|
|
123
|
+
|
|
124
|
+
### Junction class (many-to-many)
|
|
125
|
+
|
|
126
|
+
A junction class maps to its own entity. It holds one `RELATIONSHIP` field per side, so both joins live in the junction's block.
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
OrderLine:
|
|
130
|
+
sources:
|
|
131
|
+
- access: datafabric
|
|
132
|
+
table: OrderLine
|
|
133
|
+
referenceFormulation: rr:SQL2008
|
|
134
|
+
s: ont:OrderLine/$(Id)
|
|
135
|
+
po:
|
|
136
|
+
- [a, ont:OrderLine]
|
|
137
|
+
- p: ont:lineOfOrder
|
|
138
|
+
o:
|
|
139
|
+
mapping: SalesOrder
|
|
140
|
+
condition:
|
|
141
|
+
function: equal
|
|
142
|
+
parameters:
|
|
143
|
+
- [str1, $(order)] # RELATIONSHIP field on OrderLine
|
|
144
|
+
- [str2, $(Id)]
|
|
145
|
+
- p: ont:lineOfProduct
|
|
146
|
+
o:
|
|
147
|
+
mapping: Product
|
|
148
|
+
condition:
|
|
149
|
+
function: equal
|
|
150
|
+
parameters:
|
|
151
|
+
- [str1, $(product)] # RELATIONSHIP field on OrderLine
|
|
152
|
+
- [str2, $(Id)]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The `SalesOrder` and `Product` blocks stay unchanged. Check each side's column casing against its own entity.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Choice-set columns
|
|
160
|
+
|
|
161
|
+
A choice-set field is mapped by its **value name**, as a literal `xsd:string`. Never map a value identifier.
|
|
162
|
+
|
|
163
|
+
```yaml
|
|
164
|
+
- [ont:SalesOrder.status, $(status), xsd:string]
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
- The value names in the column are the ones the schema comment lists (and a constraints file, when written, lists with `sh:in`; see [shacl-patterns-guide.md](shacl-patterns-guide.md#value-list-from-a-choice-set)).
|
|
168
|
+
- `CHOICE_SET_MULTIPLE` column: one triple per selected value; the service splits it. Write the same single line. Do not split or join values in the mapping.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## USAGE POLICY block
|
|
173
|
+
|
|
174
|
+
Add a `# USAGE POLICY` comment block at the top of the `.yarrrml.yml` file, before the `prefixes:` key. This is the **rule** layer: imperative rules for any agent or tool that reads this file as text. It teaches *how* to use the constructs.
|
|
175
|
+
|
|
176
|
+
**Separation of concerns.** The USAGE POLICY carries rules only. Facts (what a status value means, grain, value domains) belong in `rdfs:comment` in `{name}.ofn`. Bindings (which key column joins which) belong in the `condition:` blocks. Do not restate facts from `{name}.ofn` here; reference them instead.
|
|
177
|
+
|
|
178
|
+
Keep it to 30 non-empty lines or fewer. Every rule must reference constructs that exist in the mapping or schema. For a conditional rule, state what to leave undone when the condition is false.
|
|
179
|
+
|
|
180
|
+
```yaml
|
|
181
|
+
# ============================================================================
|
|
182
|
+
# USAGE POLICY (how to use the constructs; facts live in <name>.ofn)
|
|
183
|
+
# ============================================================================
|
|
184
|
+
# JOIN GRAPH (join only what the question needs):
|
|
185
|
+
# SalesOrder → Customer via SalesOrder.customer = Customer.Id
|
|
186
|
+
# ROUTING (canonical property for ambiguous phrases):
|
|
187
|
+
# "customer name" → Customer.customerName
|
|
188
|
+
# GRAIN DISCIPLINE:
|
|
189
|
+
# SalesOrder: ONE row per order, no dedup needed
|
|
190
|
+
# OUTPUT DISCIPLINE:
|
|
191
|
+
# Return ALL matching rows for list questions; LIMIT 1 only for single-answer superlatives.
|
|
192
|
+
# No default LIMIT. No DISTINCT unless uniqueness was asked.
|
|
193
|
+
# LITERALS are case- and format-sensitive. Copy status values exactly as annotated in <name>.ofn.
|
|
194
|
+
# ============================================================================
|
|
195
|
+
|
|
196
|
+
prefixes:
|
|
197
|
+
ont: https://ontology.uipath.com/<name>#
|
|
198
|
+
...
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Fill in only the sections that apply. The join graph and routing sections matter most: include them whenever there are object properties or ambiguous column names.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Common mistakes
|
|
206
|
+
|
|
207
|
+
- **Missing range on a typed property.** `[ont:X.amount, $(amount)]` is read as `xsd:string`; add `xsd:decimal` (the schema's range) as the third element.
|
|
208
|
+
- **Wrong column name.** Names in `$()` must match field names in the entity exactly (case-sensitive), or be a system field.
|
|
209
|
+
- **Join casing mismatch.** `str1` is a field of this entity; `str2` is a field of the target entity. Check each side against its own entity.
|
|
210
|
+
- **Missing type triple.** Every block needs `[a, ont:{ClassName}]`, or the instances are untyped.
|
|
211
|
+
- **Wrong direction.** Check `ObjectPropertyDomain` and `ObjectPropertyRange` in `{name}.ofn`. The join goes in the mapping of the entity that holds the `RELATIONSHIP` field.
|
|
212
|
+
- **Object property not in the schema.** Read the IRI from `{name}.ofn` before writing the `p:` line.
|
|
213
|
+
- **Missing `mapping:` target.** Check every target against the top-level keys of this file.
|
|
214
|
+
- **Join on an inverse property.** Only the property whose entity holds the field gets a join.
|
|
215
|
+
- **Mapping out of sync with the schema.** Every `ont:` term must exist in the schema. Write the schema first, then the mapping.
|
|
216
|
+
- **Identifiers in the mapping.** Never write `entityId` or `folderId`. `table: <EntityName>` is the only link.
|
|
217
|
+
- **Verbose YARRRML.** Never use `subjects:`, `predicateobjects:`, `predicate:`, `object:`, or inline `~iri` relationships. Use the compact `s:`/`po:`/`p:`/`o:` form with `table:` and `referenceFormulation: rr:SQL2008` in every source block.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Full worked example
|
|
222
|
+
|
|
223
|
+
The Orders domain: `Customer` and `SalesOrder`. `SalesOrder.customer` is a `RELATIONSHIP` field, `SalesOrder.status` uses the choice set `OrderStatus`. It is a model to adapt, not a file to copy verbatim.
|
|
224
|
+
|
|
225
|
+
```yaml
|
|
226
|
+
prefixes:
|
|
227
|
+
ont: https://ontology.uipath.com/SalesOps#
|
|
228
|
+
|
|
229
|
+
mappings:
|
|
230
|
+
SalesOrder:
|
|
231
|
+
sources:
|
|
232
|
+
- access: datafabric
|
|
233
|
+
table: SalesOrder
|
|
234
|
+
referenceFormulation: rr:SQL2008
|
|
235
|
+
s: ont:SalesOrder/$(Id)
|
|
236
|
+
po:
|
|
237
|
+
- [a, ont:SalesOrder]
|
|
238
|
+
- [ont:SalesOrder.orderId, $(orderId)]
|
|
239
|
+
- [ont:SalesOrder.totalAmount, $(totalAmount), xsd:decimal]
|
|
240
|
+
- [ont:SalesOrder.status, $(status), xsd:string]
|
|
241
|
+
- p: ont:placedBy
|
|
242
|
+
o:
|
|
243
|
+
mapping: Customer
|
|
244
|
+
condition:
|
|
245
|
+
function: equal
|
|
246
|
+
parameters:
|
|
247
|
+
- [str1, $(customer)]
|
|
248
|
+
- [str2, $(Id)]
|
|
249
|
+
Customer:
|
|
250
|
+
sources:
|
|
251
|
+
- access: datafabric
|
|
252
|
+
table: Customer
|
|
253
|
+
referenceFormulation: rr:SQL2008
|
|
254
|
+
s: ont:Customer/$(Id)
|
|
255
|
+
po:
|
|
256
|
+
- [a, ont:Customer]
|
|
257
|
+
- [ont:Customer.customerName, $(name)]
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
`places` (the inverse of `placedBy`) has no block entry: the schema declares it with `InverseObjectProperties`.
|