/
UDR Functions(3.0)

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 )
ParameterDescription

myUDR

The UDR to add error message to

errorCode

An Error Code as defined from the Data Veracity Error Code web interface or ECS Error Code .

myString

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 )
ParameterDescription

myUDR

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  )
ParameterDescription

myUDR

The UDR to clone

Returns

A clone of myUDR


udrContainsError

Returns true if an error description has been added to the UDR.

boolean udrContainsError( drudr  myUDR  )
ParameterDescription

myUDR

The UDR to evaluate for error descriptions

Returns

true or false


udrCreate

Creates a new UDR of the specified type. All fields are included, except for the optional.

drudr udrCreate( type  UDRType  )
ParameterDescription

UDRType

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
ParameterDescription

decoderName

The name of a defined decoder

UDRlist

The list in which the resulting, decoded UDRs will be saved

indata

The input data to decode

fullDecode

States if Full Decode will be applied. By default, this parameter is set to true. For further information, see 10.1.0 Ultra Format.

Returns

A string containing nothing (null) if the operation succeeded, and an error message if it failed

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