Search (Documents)
Every message that X1 processes represents a business document or transaction, such as an invoice, a rate request, or an order. X1 treats these messages as documents according to the Document Message pattern from the Enterprise Integration Patterns. Each document has a type that determines how it is processed.
X1 can process messages it receives in any data format, such as JSON, XML, EDI, CSV, PDF, or text. Upon receipt of the "raw" message in its original format, X1 converts it into a representation that can be stored and processed. This representation is typically a map of key-value pairs similar to JSON, but it can also be string or binary data. This representation is known as the document and is used to represent the message throughout the system.
The Documents page is where you can search for and view documents.
On the Documents page, view the list of documents.
Search for a document
On the Documents page, you can search for a specific document using the default search fields.
In the Search Type drop-down list, select a search type. Your search and query options will vary depending on which search type you select.
See the "Document Search Type Steps" below for more information about searching for a document.
Document Search Type Steps
Search Type | Steps |
---|---|
Text Search |
NoteIn the Query field, you can optionally enter a MongoDB Query Language query to search for documents. This query is executed against the documents in the database and will return all documents that match the query. In the top right corner of the page, select Query Guide for more information. |
MQL Search |
NoteYou can select NoteIn the Query field, you can optionally enter a MongoDB Query Language query to search for documents. This query is executed against the documents in the database and will return all documents that match the query. In the top right corner of the page, select Query Guide for more information. |
Natural Language Query |
|
You can view documents and their envelopes sorted according to specific search criteria.
When X1 receives a document message, it wraps it in an envelope. In addition to the document, an envelope contains metadata about the message, such as the sender and receiver. It's used to route the message to the correct destination and optionally includes a header.
The search results display various envelope properties for the document.
See the "View Envelope Field Descriptions" below for more information about the envelope fields.
View Envelope Field Descriptions
Field | Description |
---|---|
ID | A unique identifier for the document assigned by the system for internal reference. |
Sender | The sending trading partner. |
Receiver | The receiving trading partner. |
Correlation ID | A unique identifier for the message flow that correlates all documents and events that occur in the flow. |
Timestamp | The time the document was received by the system. |
View envelope details for a document
In the Search Documents table, next to a document, select
. The envelope details information displays.
See the "View Envelope Details Field Descriptions" below for more information about the envelope details fields.
View Envelope Details Field Descriptions
Field | Description |
---|---|
Document tab | Displays the message payload, which, depending on the original message payload, is represented as a map, string, or array of bytes. |
Header tab | Displays an optional header that contains additional metadata about the message and can be in any shape. |
Lineage tab | Displays the lineage of transformations the document has gone through. |
Note
You can select Download to download the envelope details to a file.
The file is saved in your default location for file downloads.
Named queries are predefined queries that can be used to search for documents. They're defined in the document type configuration and can be used to search for documents that match specific criteria.
Note
The list of named queries is comprised of the query templates you created for document types.
In the Search Type drop-down list, select MQL Search.
In the Document Type drop-down list, select a document type.
In the top right corner of the page, select Add Named Query.
In the Add Named Query dialog box, in the Query Name drop-down list, select a query name.
In the Add Named Query dialog box, in the Query Value filed, enter the value for the query.
Select Add Queries. The named query is added to the Query field, above the Documents table.