Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...

Rerunning a failed Transaction

7min

Note: This feature requires Litmus Production Record Database V 1.4.0.0 or higher.

Use Cases

Litmus Production Record Database is processing incoming data for Tags, Production Events and Digital Twin through asynchronous processing. If such a process fails, this transaction is stored in the table PROREC_AT_ServiceBroker_Failed_Transaction. They will be kept there for the same amount of time as log data (by default = 24hours).

In the case a Transaction failed, users can investigate the transaction using log tables like the tables PROREC_ERROR_Log, PROREC_Misc_Log, PROREC_ProRec_Log and PROREC_Tag_Log. Once the root cause has been identified, users can fix the issue and rerun the transaction.

Method

Execute Stored Procedure PROREC_Misc_Rerun_AT_Transactions

Input Variables

Variable name

Datatype

Description

Example

@Action

INTEGER

A numeric representation of a specific action which can be performed.



Possible Values:

  • 1 = Show all Entries in the table PROREC_AT_ServiceBroker_Failed_Transaction
  • 2 = Show the entry for a specific Entry ID from the table PROREC_AT_ServiceBroker_Failed_Transaction
  • 3 = Breakdown of the XML object of an entry in the table PROREC_AT_ServiceBroker_Failed_Transaction. This provides a tabled representation of the XML data
  • 4 = Fix / update a value for any of the keys "arrived_at","device_id","register_id","tag_name","datatype","value","success" in the XML object for a specific record_uuid
  • 5 = Rerun a specific transaction

Mandatory!

Can not be NULL or Empty

1





@ID

BIGINT

The Entry ID of a row in table PROREC_AT_ServiceBroker_Failed_Transaction.



Can not be null for the actions 2,3,4 or 5

NULL

@recorduuid

CHAR(36)

The record_uuid of a specific entry of the XML object.

Can not be null for action 4.

NULL

@columntochange

VARCHAR(50)

The XML key to change.

Allowed are:

  • "arrived_at"
  • "device_id"
  • "register_id"
  • "tag_name"
  • "datatype"
  • "value"
  • "success"

Can not be null for action 4.

NULL

@newvalue

VARCHAR(max)

The new value for the XML key defined by columntochange

Can not be null for action 4.

NULL

How to use

To Investigate, Fix and/or rerun a failed transaction logged in the table PROREC_AT_ServiceBroker_Failed_Transaction, call the stored procedure PROREC_Misc_Rerun_AT_Transactions using the T-SQL EXEC or EXECUTE keyword and provide the Input variables. Below is an example using T-SQL in SQL Server Management Studio:

Read out all entries from the table PROREC_AT_ServiceBroker_Failed_Transaction.

EXECUTE [LE_ProductionRecord].[dbo].[PROREC_Misc_Rerun_AT_Transactions] @Action = 1;

Result

Document image


View a specific entry from the table PROREC_AT_ServiceBroker_Failed_Transaction.

EXECUTE [LE_ProductionRecord].[dbo].[PROREC_Misc_Rerun_AT_Transactions] @Action = 2, @ID = 12;

Result

Document image


View a break down of the XML object for the entry.

EXECUTE [LE_ProductionRecord].[dbo].[PROREC_Misc_Rerun_AT_Transactions] @Action = 3, @ID = 12;

Result

Document image


Modify a value for an item in the XML object.

Document image

EXECUTE [LE_ProductionRecord].[dbo].[PROREC_Misc_Rerun_AT_Transactions] @Action = 4, @ID = 12, @recorduuid = 'e26cccac-513b-4e85-9990-26650f273bda', @columntochange = 'value', @newvalue = '18.3704';

Result

Document image


Rerun a specific entry.

EXECUTE [LE_ProductionRecord].[dbo].[PROREC_Misc_Rerun_AT_Transactions] @Action = 5, @Identifier = 12;

Result

Document image