cancel
Showing results for 
Search instead for 
Did you mean: 

Global variable not filling at runtime through UDF

former_member192079
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member192892
Active Contributor
0 Kudos

did you try doing test message using payload from moni???

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello ,

1. Download the soruce xml from the SXI_MONITOR...and then test the message mapping in IR using this message ....

and execute it from there...

2.And also check the communication channel for the the sender/receiver communication channel..

former_member192079
Participant
0 Kudos

Hi

I had tested Mapping , from the SXMB_MONI payload also....

the check field get populated at target MT..

but in -> Display queue for Check field it is empty..

let me clarfy again..

For the first 3 field i had 3 UDF , which assign some value to check ( if validation failed ). But return the source value

as return a ;

the 4th UDF

the Code is

no input parameter..


return Check;
 

mapped to target Check..

below is the image for Edit Java section..

[http://www.screenshots.cc/show.php/2419_java.JPG.html|http://www.screenshots.cc/show.php/2419_java.JPG.html]