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.
...
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.
...
Parameter | Description |
---|---|
| The UDR to clear errors from |
Returns | Nothing |
udrClone
Anchor | ||||
---|---|---|---|---|
|
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.
...
Parameter | Description |
---|---|
| The UDR to clone |
Returns | A clone of |
udrContainsError
Returns true
if an error description has been added to the UDR.
...
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.
...
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.
...
Info | ||
---|---|---|
| ||
A list must be created, not only declared, previously used by
|
udrEncode
Encodes a UDR.
Code Block |
---|
bytearray udrEncode ( string encoderName , drudr myUDR ) |
...
Parameter | Description |
---|---|
| The name of a defined encoder |
| The UDR to encode |
Returns | A bytearray |
udrForceDecode
By default, a Decoder only evaluates record sizes and field termination marks. It does not read the field values to evaluate for validity. This is done for each field when it is actually accessed, either from a agent utilizing APL code, or from an Encoder.
...
Parameter | Description |
---|---|
| The UDR to fully decode |
| An optional argument. If not stated, |
Returns | If decoding succeeds, |
udrGetErrorCodes
Returns a list of strings containing all error codes added to the UDR.
...
Parameter | Description |
---|---|
| The UDR |
Returns | A list of strings with all error codes added to the UDR |
udrGetErrorMessages
Returns a list of strings containing all error messages added to the UDR.
...
Parameter | Description |
---|---|
| The UDR |
Returns | A list of strings with all error messages added to the UDR |
udrGetErrorsAsString
Returns a string containing all error information that has been added to the UDR.
...
Parameter | Descripton |
---|---|
| The UDR |
Returns | A string with all error information added to the UDR |
udrGetFields
Returns a list of the field names and field information in a UDR.
...
Field | Description |
---|---|
fieldName (string) | The name of the field |
fieldType (string) | The field type, e g string, int, double etc. |
isOptional (boolean) | This indicates if the field is optional or not. |
isReadOnly (boolean) | This indicates if the field is read-only or not. |
udrGetValue
Anchor | ||||
---|---|---|---|---|
|
Returns the value of fieldName
in the myUDR
.
...
Parameter | Description |
---|---|
| The UDR containing the field of interest |
| A string, exactly matching the name of an existing field. If the field is OPTIONAL and is not present, the function returns Constructed field names, that is subUDR.subField are allowed. If a field in the path is not present, |
Returns | Any, depending on the field type |
udrIsPresent
Anchor | ||||
---|---|---|---|---|
|
Returns true if the UDR field is present.
...
Info | ||
---|---|---|
| ||
The function is recursive. If the optional field
|
udrMass Functions
The udrMass functions enable you to manage a decoder which purpose is to process large amounts of collected UDRs, while maintaining control over UDRs tailing bytes in between calls to consume .
...
udrMassCreateDecoder
- udrMassClearBuffer
udrMassDecode
udrMassEOFCheck
udrMassGetDataTail
udrMassCreateDecoder
Creates a decoder object.
...
Info | ||
---|---|---|
| ||
|
udrMassClearBuffer
The udrMassClearBuffer
function clears the remaining buffer in the decoder.
...
Parameter | Description |
---|---|
theDecoder | The decoder object that udrMassCreateDecoder generates |
Returns: | Nothing |
udrMassDecode
Anchor | ||||
---|---|---|---|---|
|
The udrMassDecode
function Decodes the bytearray input data by using the decoder, and generates it as a list.
...
Parameter | Description |
---|---|
| The decoder object that |
| The product of the encoding process is saved as a list of UDRs. |
| The input data that is to be encoded into UDRs |
| Use |
Returns: | If decoding fails, an error message is returned. Otherwise, returns |
udrMassEOFCheck
The udrMassEOFCheck function attempts to decode any remaining bytes that are left behind and stored in the decoder. If the function executes and decoding is successful, the procedure sends endBatch
to the decoder, the returned string is empty, and the myList
parameter contains the UDRs. Otherwise, an error message is generated.
...
Parameter | Description |
---|---|
| The decoder object that |
| The data that |
| Use |
Returns: | If decoding fails, an error message is returned. Otherwise, returns |
udrMassGetDataTail
The udrMassGetDataTail function makes the decoder generate the remaining bytes that it holds. The bytes are still stored in the decoder.
...
Parameter | Description |
---|---|
| The decoder object that |
Returns: | The raw bytearray data that the decoder in |
udrRoute
The udrRoute
function sends a UDR to a workflow route.
...
Parameter | Description |
---|---|
| The UDR to send on |
| The route on which to send the UDR |
| The UDR is cloned before routing on the output/outputs. |
Returns | Nothing |
udrSetValue
Anchor | ||||
---|---|---|---|---|
|
Sets the field named fieldName
in the UDR myUDR
to value
.
...
Parameter | Description |
---|---|
| The UDR, for which to set the field value |
| A string, exactly matching an existing field. Constructed field names in the form of subUDR.subField are allowed. Trying to set a non-existing field will cause runtime error. |
| A value depending on the field type |
Returns | Nothing |
udrUnsetPresent
In the output files the Encoder maps by default, null fields as present but empty. This can be avoided by clearing a flag, Is Present, using the udrUnsetPresent
function.
...