Mutation : Absolute Identifier / External Identifier / Temporary Identifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2021 09:58 AM - edited ‎06-12-2021 11:32 AM
With GraphQL you are able to make query or mutation on object of the repository. When syncing with an external tool you may want to use the identifier of the other tool to create or connect object.
GraphQL provide 3 types of identifier :
- Absolute Identifier: this is the ID generated by HOPEX when a new object is created. The value cannot be set by the API. IT can be used when doing query to get the HOPEX unique identifier global.
- This field cannot be blank or null.
- This field is composed of 12 characters composed of letter and digit and special characters.
- This field is invariant overtime.
- External Identifier: this is an ID that can be given when a new object is created. The uniqueness is limited to the MetaClass for which you are creating an object. This ID is used when importing data from another system to be able to retrieve, at a later stage, the object created from this system.
- This field can be blank or null
- This field as a maximum length of 1024 characters
- This field is not invariant overtime
- Temporary Identifier: this is the same principal as the External Identifier. The main difference is that the validity of this ID is limited to the mutation you are doing. The information will not be store in the database and cannot be reused at a later stage.
Doing Query
Query can only be done on the Absolute Identifier shortly called "id" or the External Identifier shortly called "externalId". As the Temporary identifier is not physically stored it cannot be queried.
These 2 identifiers can be used to :
- Filter query
- Ensure that the retrieve object is the expected one
Sample query
- Example with a result that contains the identifiers
- Example with a query that contains a filter on the external identifier
Query 1 | Result 1 |
|
|
Query 2 | Result 2 |
|
|
Doing Mutation
Creation without an Identifier
The default behavior is to let the system give an absolute identifier to an object. The identifier is unique to the whole database of HOPEX. If you create several objects, even with the same characteristics, the identifier will be unique each time.
Query | Result |
|
|
Creation with an External Identifier
The only way to control the identifier is to use the External Identifier. When the object is created you can specify the value. This value is unique but limited to the MetaClass object you are creating. Moreover this external identifier is not invariant so you can modify it after the object was created.
CAUTION: the profile you use must be granted to right to read and write this MetaAttribute. This is not always the default right in standard HOPEX profile in V3 or V4.
Query | Result |
|
|
Should you want to update the External Identifier you need to first query the object with the Absolute Identifier.
Query | Result |
|
|
If you do several mutation in a row you can use this External Identifier as a mean to connect object together.
For Example: In the mutation below we do the follwing
- Create a New Application
- Create a new Busines Process
- Connect the 2 newly created objects
Query | Result |
|
|
Creation with an Temporary Identifier
The temporary Identifier works as the external identifier. The only difference is that the value of this identifier will not be stored in the database.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2022 04:07 PM
Hello,
Current update don't support HexaIdAbs as Identifier
You can use updateMany that can take a filter to select the object to edit. In this filter you can filter the object on "hexaIdAs". As it is unique you will always update the object you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2022 04:02 PM
Hi
Is it possible to do a mutation with identifier as HexIdAbs? We are for our interface to snow, the hexidabs as a identifier. This works perfect, because the generated website in hopex is also working with the hexid.
Thank you
Kind regards
