Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/support-4.8' into s…
Browse files Browse the repository at this point in the history
…upport-4.8
  • Loading branch information
skublik committed Feb 21, 2024
2 parents 1c7b2ad + 0823aed commit bd6ac88
Show file tree
Hide file tree
Showing 121 changed files with 2,638 additions and 695 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 53 additions & 26 deletions docs/concepts/query/midpoint-query-language/errors/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,38 @@ a| * Verify, that the attribute is present in the object type you are searching.
* Verify, that the view is displaying the object type you want to search. You can see its name at the end of the error message.
|====

=== Path is not present in type - dereferencing

image::err-path-is-not-present-deref.png[Error path is not present - dereferencing]

Another kind of the "path is not present in type" error can occur while searching in referenced objects.


[cols="15h,50" width=85%]
|====
| Request
| Find all users with assigned role identified by value "III" of identifier attribute.

| Query
| `assignment/targetRef/@ matches (identifier="III")`

| Error message
| Path identifier is not present in type {http://midpoint.evolveum.com/xml/ns/public/common/common-3}AssignmentHolderType

| Reason
a| While using dereferencing, midPoint has to know type of the referenced object to correctly process the query. +
In this query, midPoint can't identify the type of the referenced object and incorrectly assumes it is of AssignmentHolderType.

| Correct query
| `assignment/targetRef/@ matches (. type RoleType and identifier="III")`

| Troubleshooting hints
a| * In this case you need to redefine the type of the referenced object. The code `. type RoleType` tells midPoint that type of the referenced object is RoleType. MidPoint then can find `identifier` attribute correctly.
* When the type is explicitly defined, midPoint knows the actual schema of the object. It means, that you can search extension attributes as well. +
E.g. the `assignment/targetRef/@ matches (. type RoleType and extension/sapType="SAP555")` is valid query when the sapType extension attribute was defined in extension schema.
|====


=== Definition is not property

image:err-definition-is-not-property.png[Error definition is not property]
Expand Down Expand Up @@ -81,62 +113,57 @@ a| * Verify, that the attribute is present in the object type you are searching.
|====


=== Cannot find enum value for string
=== Additional unsupported filter specified

image:err-cannot-find-enum-value.png[Error cannot find enum value foe string]
image:err-add-unsupported-filter.png[Error additional unsupported filter specified]

[cols="15h,50" width=85%]
|====
| Request
| Find all users with normal lockout status.
| Find all assignments of a role.

| Query
| `activation/lockoutStatus = "Normal"`
| `assignment/targetRef matches (name="ABC:Admin")`

| Error message
| Cannot find enum value for string *'Normal'* in class com.evolveum.midpoint.xml.ns._public.common.common_3.*LockoutStatusType*
| Additional unsupported filter specified: name="ABC:Admin"

| Reason
a| The schema defines enumerated value for this attribute. In this case the allowed values are "normal" and "locked". All lowercase.
a| Query should be searching in referenced objects but the dereferencing operator `@` is missing.

| Correct query
a| `activation/lockoutStatus = "normal"`
a| `assignment/targetRef/@ matches (name="ABC:Admin")`

| Troubleshooting hints
a| * Search for allowed values in schema definition. Schemas are described in
xref:../../../../schema/schemadoc.adoc[SchemaDoc].
Select version according your midPoint version. +
In this case search in schema "common/common-3" for "LockoutStatusType"

// Alternatively, you can search midPoint schema files #on github# for verification.
// TODO - for this case - linka na github na schema file.
a|
|====


=== Cannot find enum value for string

//=== Unknown type for conversion
// in audit search
image:err-cannot-find-enum-value.png[Error cannot find enum value for string]

////
[cols="15h,50" width=85%]
|====
| Request
|
| Find all users with normal lockout status.

| Query
|
| `activation/lockoutStatus = "Normal"`

| Error
|
| Error message
| Cannot find enum value for string *'Normal'* in class com.evolveum.midpoint.xml.ns._public.common.common_3.*LockoutStatusType*

| Reason
a|
a| The schema defines enumerated value for this attribute. In this case the allowed values are "normal" and "locked". All lowercase.

| Correct query
|
| `activation/lockoutStatus = "normal"`

| Troubleshooting hints
a|
|====
////
a| * Search for allowed values in schema definition. Schemas are described in
xref:../../../../schema/schemadoc.adoc[SchemaDoc].
Select version according your midPoint version. +
In this case search in schema "common/common-3" for "LockoutStatusType"

|====

0 comments on commit bd6ac88

Please sign in to comment.