Data Veracity Forwarding Example(3.0)

This section contains one example for the Data Veracity Forwarding agent.


Example Workflow and Test Data:

MZ10_DV_Forwarding_Example.zip

Note: Unzip this file to find the configs zip for System Import.


 

Data Veracity Forwarding workflow example


The workflow will collect an input file, decode it and then send it forward into the Analysis_1 agent. The Data Veracity Forwarding agent then receives the erroneous UDR (TT UDR in the example) from the Analysis agent. The Analysis agent contains the following code:

Analysis_1
int i = 0;

consume {
    i = i +1;
    if (i < 20){
        udrAddError(input, "my_error_code", "error occured");    
    }else{
        udrAddError(input, "my_second_error_code", "error occured");    
	}
    udrRoute(input);
}

Analysis agent

Should there be any existing error code associated to a particular UDR, any new error code added to the UDR will be included along with the existing code. However, the first error code associated with the UDR will be the one to be displayed on the Data Veracity Search result. To clear any existing error code, you can use the udrClearErrors plugin.  For more information, refer UDR Functions


With this code, the Analysis agent will:

  • Send 20 UDRs to Data Veracity with the error code my_error_code while using the APL plugin, udrAddError.
  • Subsequent UDRs will be sent to Data Veracity with the error code my_second_error_code