Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Each Dataset Request stores the details and outcomes of a dataset import or export.
The Dataset Request is an operational record which stores the details and outcomes of an incoming dataset import or a scheduled dataset export.
An Dataset export can create many Dataset Requests depending on the dataset query and batch size.
A Dataset import is created when an incoming Dataset message containing an attachment with data is received.
A Transaction is an instance of a Message occurence. It contains and tracks the processing of a Message using Stages and HTTP Requests.
A Transaction is a vehicle used in the flow of Messages on a bonded ticket. It is essentially a container for a Request/Receipt pair. The Transaction record contains the necessary fields to facilitate and track both the movement and the processing of the pair of Messages.
A Transaction’s primary functions are:
To contain the Request/Receipt pair of Messages.
Handling the queueing of Requests and Receipts.
Tracking the state of the Transaction from two perspectives:
Transaction state
The condition of the Transaction from a movement (transactional) perspective (i.e. the condition of the transport of the data).
Process state
The condition of the Transaction from a process perspective (i.e. its relation to the business logic that’s in place).
Example:
System A sends a Request to system B to update the value of the urgency
field on a ticket without having ‘ownership’ of that ticket. The Request is properly formed and authenticated and is received in system B.
System B sends a response acknowledging the Request and then subsequently processes the Request asynchronously. If, on processing the Request from system A, system B discovers that system A did not have the authority to change the value of the urgency
field, they would send a Receipt Message stating the error. That Receipt is also properly formed and authenticated and is received in system A without any problems.
The Transaction state in this case would be set to ‘Complete’ as both the Request and the Receipt were transported successfully. However, the Process state would be set to ‘Rejected’ as system A did not have the authority to update the value of the urgency
field.
One of the many defining features of Unifi is its ability to track the state of the Transaction from both a transport (What’s happening with the movement of the message?) and a process (How does the content of the message align with business logic?) perspective.
Having the combination of these two states is extremely useful and gives a far more precise understanding of the condition of the Transaction and opens up more options. This means, for example, that an analyst can see and has the opportunity to fix issues based on a process error without the need for technical support (Unifi won’t break an Integration for a process error). For transactional errors Unifi can throw events which can be correlated to send notifications, or trigger the system’s Incident process as appropriate.
*Timed Out
This is configured on the integration by the value in the 'Async timeout' field.
**Ignored
This can be used when a Transaction does not complete (i.e. when it is in an ‘Error’ or ‘Timed Out’ state), or at any time when a Transaction is in progress or ‘Queued’ (e.g. when a system error occurs outside our control).
The following table gives a description of the fields that are visible on the Transaction record:
*External/Message ID
These are used in Unifi to match the related Requests and Receipts (i.e. the Message ID of one system will be used as the External message ID of the other system and vice versa).
**Direction
The direction of the initiating (or first) Message in the Request/Receipt pair will determine the direction of the Transaction.
***Process error
The value in this field can be rolled up to the bonded ticket, giving the analyst insight and the opportunity to resolve process errors.
You can view the transaction logs from the Transaction record by navigating to the 'Unifi Activity Logs' related list, or from the Unifi Operations Manager portal. This hugely significant feature offers considerably more detail than is available with the OOTB ServiceNow system logs and puts that information right where you need it - saving an inordinate amount of time hunting through the [sys_log]
table.
Activity Logs will be populated if logging is enabled when debugging. They are particularly helpful to ShareLogic when debugging Unifi itself.
Clicking the 'View Logs' icon will open a list view of the logs in a new window.
Once the initial Transaction has completed, Unifi checks if there are any other transactions queued and processes them.
Here Unifi is processing the outbound HTTP Request and sending it to the integrated system.
Unifi is picking up the generated Stage data and generating an outbound HTTP Request.
A payload has been received from the external system and Unifi is processing that data and updating the target record within ServiceNow.
An inbound request has been received and generated an inbound HTTP Request.
The logs that can be viewed from the Transaction are for the Transaction itself and the Requests that relate to that Transaction.
Each of the logs relate to a specific part of the process flow, so depending on the direction of the Transaction the logs will occur in a different sequence. From a process perspective, the logs would occur as follows:
Inbound request: RestHelper (relates to the inbound HTTP Request), Transaction receive message (relates to the inbound Transaction).
Corresponding outbound receipt: Transaction sending (relates to the outbound Transaction Receipt), Request sending (relates to the outbound Request).
When Transaction completes: Transaction process next queued.
Outbound: Unifi Business Rule (relates to the logs defined in the Trigger on the process table being integrated), Transaction sending (relates to the outbound Transaction), Request sending
(relates to the outbound Request).
For a synchronous integration that would be it. For an asynchronous integration Unifi would also expect the following:
Corresponding inbound receipt: RestHelper (relates to the inbound Transaction Receipt), Transaction receive message (relates to the Receipt processing).
You can click the Replay button on the Transaction record to replay that transaction.
This will be used when testing/debugging. For example, if there is a transactional error, after you have investigated the cause & made any required changes you will want to replay the Transaction to check if the error clears.
Each Poll Request stores the details and outcomes of a scheduled poll.
The Poll Request is an operational record which stores the details and outcomes of a scheduled poll. It represents a single instance of a being run (a Poll Request record is created each time a Poller is run).
Every request is handled and tracked by a HTTP Request record.
HTTP Request records are created every time an HTTP Request is generated for sending to or receiving from an external system. They contain all the low-level data about the individual request; the headers, the payload, the URL, timings, etc.
These records are extremely useful for developing and debugging integrations because of the immediate availability and contextual relevance to the integration you are developing. You will often find that it is easier to debug an integration from within Unifi than it is from any external system.
The Request will be inserted in a ‘Ready’ state. Unifi will then asynchronously pick it up and process it. The following table defines the state
field value choices:
Label | Sequence | Description |
---|
*Pending
(After a failure the HTTP Request is created straight away, but remains in a ‘Pending’ state until the timer has finished.)
**Ready
Inbound HTTP Requests are currently processed synchronously and therefore will only ever be ‘OK’ or ‘Error’.
The following table gives a description of the fields that are visible on the HTTP Request record:
Field | Type | Description |
---|
The following table gives a description of the Request fields that are visible on the HTTP Request record:
It is often far quicker and easier to tell what has been sent from the integrated system by looking at the values in the Response fields in Unifi than it is to get the same information from the system that has sent it.
The following table gives a description of the Response fields that are visible on the HTTP Request record:
Unifi logs can be viewed by navigating to the 'Unifi Activity Logs' related list.
The logs that relate to the HTTP Request are as follows:
An inbound request has been received and generated an inbound HTTP Request.
Here Unifi is processing the outbound HTTP Request and sending it to the integrated system.
The logs that can be viewed from the HTTP Request record relate to the HTTP Request only.
You can click the Replay Request button on the HTTP Request record to replay that request.
This will be used when testing/debugging. For example, if the Request errors you may want to edit the payload & then replay the Request to check if the error clears.
Label | Sequence | Description |
---|---|---|
Label | Sequence | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|
Field | Type | Description |
---|
Sending
0
An outbound Message is being sent to the integrated system.
Received
1
An inbound Message has been received from the integrated system (but not processed).
Awaiting Receipt
2
An outbound Message has been sent to the integrated system and we are awaiting an asynchronous Receipt.
Sending Receipt
3
We are sending an asynchronous receipt in response to receiving and processing an inbound Message from the integrated system.
Received Receipt
4
An inbound asynchronous Receipt has been received from the integrated system.
Complete
5
The Message exchange was completed.
Queued
6
The Message exchange has been temporarily delayed because of incomplete transactions.
Timed Out*
7
An outbound Message has been sent to the integrated system, but we have not received the asynchronous Receipt in the expected timeframe.
Error
8
There was a transactional error with the Message exchange (e.g. invalid message format, unknown endpoint, code error etc.).
Ignored**
9
Transactions can be ignored manually to allow the integration to proceed.
Pending
0
The Message is being processed and is awaiting a decision as to whether it falls within or outside of the scope of the business logic.
Accepted
1
The Message has been processed and accepted as within the scope of the business logic.
Rejected
2
The Message has been processed and rejected as outside the scope of the business logic.
Message ID*
String
The unique internal message identifier.
External message ID*
String
The external system’s unique message identifier.
Table
Table name
The target table this record applies to.
Document
Reference
The integrated ServiceNow ticket.
Integration
Reference
The integration this record belongs to.
Bond
Reference
The bond this record belongs to.
Message
Reference
The message used to process this record.
Direction**
Choice
The direction this record is travelling in.
Transaction state
Choice
The state of communication for this transaction.
Process state
Choice
The business logic process state.
Created
Glide date time
The date and time the transaction was created.
Receipt due by
Glide date time
The date a receipt must be received before this transaction times out. Only applies to asynchronous transactions.
Error
String
The internal communication error.
Process error***
String
The business logic error in processing this transaction.
Pending* | 0 | The HTTP Request is waiting to be processed asynchronously, but in a retry scenario it is waiting for the synchronous timeout specified on the Integration. |
Ready** | 1 | The HTTP Request is ready to be processed outbound. |
OK | 1 | There are no errors with the HTTP Request. |
Error | 3 | There was an error with the HTTP Request. |
Cancelled | 4 | The HTTP Request was cancelled. |
Number | String | The unique HTTP Request identifier. |
Integration | Reference | The integration this record belongs to. |
Connection | Reference | The connection this request will use. |
Transaction | Reference | The transaction this record belongs to. |
Message | Reference | The message used to process this record. |
Response Action | Reference | The Response Action that handled this request. |
Direction | Choice | The direction this record is travelling in. |
Request state | Choice | The state of the request. |
Attempt number | Integer | The number of HTTP Request attempts. Failed requests are retried up to the maximum attempts number as configured on the Integration. |
Source type | String | The Source type that created this request. |
Endpoint URL | URL | The external system’s access URL. |
Action method | String | The SOAP Action or the REST Method to use for this request. |
Request headers | String | A JSON object containing the headers sent with this request. |
Request payload | String | The payload of the request being sent or received. |
Time | Glide date time | The time this request was processed. |
Size (bytes) | Integer | The size in bytes of the request payload. |
Mid server | Reference | The MID server used to send this request. |
Status code | String | The response status code. |
Time to send | Integer | The time taken in milliseconds to receive a response. |
Status text | String | The HTTP status text. |
Response headers | String | A JSON object containing the headers sent in response to this request. |
Response payload | String | The payload of the response being sent or received. |
Whenever there is an update to a bonded record, Unifi will take a snapshot of it and capture it in a Snapshot record. The Snapshot is the key to facilitating automated Integration testing.
A Snapshot is a representation of the bonded record and data from the relevant message that created/updated it.
A snapshot is created in one of two scenarios:
A process record is updated and one or more integrations are interested in it (outbound).
A process record is updated by an integration (inbound).
In the Unifi Transport Data Flow process (see the diagram here), the Snapshot record sits between the Stage and the source/target record. In order for it to be an accurate representation of the source/target record, the Snapshot is taken the same side of the relevant Message Script.
A snapshot is taken of the source record prior to running the Source to Stage Message Script (before transforming any data).
A snapshot is taken of the target record after running the Stage to Target Message Script (after transforming any data).
Snapshots can be viewed by navigating to Unifi > Transport > Snapshots.
The top of the Snapshot record looks like this:
The bottom of the Snapshot record looks like this:
The following table gives a description of the fields that are visible on the Snapshot record.
The Stage is the root staging table for all data mapping. Stages are created dynamically at the time of data being sent/received. The Staged Data fields will vary dependent on the data being sent.
Stages are a snapshot of the data either at the time of being sent or received. The Stage stores the snapshot of data, which is what facilitates the asynchronous exchange of Messages. Having that data called out into separate fields provides a clean & clear view of the data being sent/received, which in turn can provide a clearer picture of the cause of any potential discrepancies in the mapping of data that is being translated*/transformed**.
*Translated: a movement of data
**Transformed: a movement and a change of data
The data being sent for each Message is mapped using the Field records. For more information, see the 'Fields' & 'Field Maps' pages.
The following table gives a description of the fields that are visible on the Stage record:
Field | Type | Description |
---|---|---|
The following is an example of a Stage record:
Field | Type | Description |
---|---|---|
Number
String
The system generated unique identifier for this record.
Direction
Choice
The direction of the Snapshot. Choices: None, Inbound, Outbound
Table
Table Name
The source/target table of the bonded record.
Document
Document ID
The source/target bonded record.
Messages
String
Object containing details of the Message that initiated the Transaction and its Integration.
Previous
String
The JSON representation of the bonded record before any update was made.
Current
String
The JSON representation of the bonded record at the time Unifi was invoked. Fields may differ to previous values here through form updates, business rules, etc.
After
String
The JSON representation of the bonded record after Unifi processing is complete.
Number
String
The unique Stage identifier.
Internal reference
String
The ServiceNow ticket reference.
External reference
String
The external system’s ticket reference.
Direction
Choice
The direction this record is travelling in.
Integration
Reference
The integration this record belongs to.
Transaction
Reference
The transaction this record belongs to.
Message
Reference
The message used to process this record.
Domain
Reference
The domain this record belongs to.
Staged Data fields
String/Object
The fields that correlate to the data being sent/received. They are uniquely and dynamically configured per Message.