Skip to Content
0
Jun 05, 2008 at 07:25 AM

Global variable not filling at runtime through UDF

32 Views

hi

In my Message mapping ,

i had source MT :

Name

Lastname

Empcode

Target MT :

Name

Lastname

Empcode

Checklength

i had to do length validation ( in UDF ...a.length>50) like this..

and want to populate the check field if the field do'nt satisfy the validation

i used -> Edit Java Sections

Global Variable : String Check ;

Initialization Section : Check ="Y";

cleanup Section : nothing.

the code in UDF ->

 if(a.trim().length()>10)
                    {
                  Check = "length not Validated";
                    }   
 else{
            Check =  "";
        }

in test message mapping UDf is working as axpected,

and Check field populates if any 3 field failed to satisfy the length validation .

BUT at runtime Check field do'nt populate

and at display queue it also not having any entry..

but i can see the check field value at target MT in test mapping..

Regards

Ashutosh