UDR Functions(3.0)
udrAddError
Adds an error description message to the UDR, which will be visible when searching using the Data Veracity web interface or ECS Inspector, Error Code column. A UDR can have several error descriptions.
void udrAddError ( drudr myUDR, string errorCode, string myString )
Parameter | Description |
---|---|
| The UDR to add error message to |
| An Error Code as defined from the Data Veracity Error Code web interface or ECS Error Code . |
| Any string to associate with the Error Code of the UDR. Optional. |
Returns | Nothing |
udrClearErrors
Removes all error descriptions, added to a UDR in Data Veracity or ECS. For ECS, this is useful when collecting UDRs for a new validation which may send them back to the ECS for another round of processing. Adding a new error description, if one already exists, will make it impossible to auto-assign the UDR to a reprocessing group when it arrives to the ECS.
void udrClearErrors( drudr myUDR )
Parameter | Description |
---|---|
| The UDR to clear errors from |
Returns | Nothing |
udrClone
Clones a UDR. It is used when having multiple routes leaving the agent, where any of the routes changes the content of a UDR. For complex UDR structures, this can be a heavy operation, and must be used with care.
drudr udrClone( drudr myUDR )
Parameter | Description |
---|---|
| The UDR to clone |
Returns | A clone of |
udrContainsError
Returns true
if an error description has been added to the UDR.
boolean udrContainsError( drudr myUDR )
Parameter | Description |
---|---|
| The UDR to evaluate for error descriptions |
Returns |
|
udrCreate
Creates a new UDR of the specified type. All fields are included, except for the optional.
drudr udrCreate( type UDRType )
Parameter | Description |
---|---|
| A defined UDR type |
Returns: | A UDR of the specified type |
udrDecode
Decodes a bytearray into a list of UDRs, and returns an error message if the operation fails. To route the UDRs to a subsequent agent, loop through the resulting list routing each element individually.
string udrDecode ( string decoderName , list<drudr> UDRlist , bytearray indata , boolean fullDecode ) //Optional
Parameter | Description |
---|---|
| The name of a defined decoder |
| The list in which the resulting, decoded UDRs will be saved |
| The input data to decode |
| States if Full Decode will be applied. By default, this parameter is set to |
Returns | A string containing nothing ( |
Example - Using udrDecode
A list must be created, not only declared, previously used by udrDecode
:
list<drudr> myList = listCreate(drudr); if (udrDecode("myFolder.myFormat.myDecoder", myList, input) == null) { // Do something } else { // Error handling }
udrEncode
Encodes a UDR.
bytearray udrEncode ( string encoderName , drudr myUDR )
Parameter |
---|