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).
- System A sends a Request to system B to update the value of the
urgencyfield 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
urgencyfield, 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
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.
The following table gives a description of the fields that are visible on the Transaction record:
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
Activity Logs will be populated if logging is enabled when debugging. They are particularly helpful to ShareLogic when debugging Unifi itself.
Unifi Operations Manager
Navigate to the 'Unifi Activity Logs' related list:
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.
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).
- 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.