cancel
Showing results for 
Search instead for 
Did you mean: 

Fixed Value Function not working

Former Member
0 Kudos

Hi Experts,

I am testing a XML to XML scenerio.

In the message mapping, one of the input field is an input to the Fixed Value Function*.

The output will based on the value of the input field.

On the test tab, the desired result of the Fixed value function is working.

This has been updated and activated.

However, when I test with an xml file in the source directory, the output is exactly the same as the input xml file

which shows the Fixed value function is not working.

What could be the problem ?

Regards

Freddy Ng

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

The default if lookup failed is set as Nisha.

If the input is other that 1,2 or 3 the result output will b Nisha.

It is working when I do a test on the test tab.

After copying from the payload from the smxb_moni, may I know which test tab should I paste to ?

I have pasted on the test tab on the operation mapping, but got an runtime exception which I think

i might not doing it correctly.

Former Member
0 Kudos

> After copying from the payload from the smxb_moni, may I know which test tab should I paste to ?

operation mapping

> I have pasted on the test tab on the operation mapping, but got an runtime exception which I think

> i might not doing it correctly.

you are doing everything correctly but it seems there is problem in your test data. So first you have to ensure the data which your are using is correct. May be you can do the testing other way around... I mean take the xml test message from your operation mapping test tab and then use that in your end-to-end testing.

former_member200962
Active Contributor
0 Kudos
I have pasted on the test tab on the operation mapping, but got an runtime exception which I think 
i might not doing it correctly.

Did you remove the hyphens present in the data copied from SXMB_MONI.....copy the data from SXMB_MONI and then switch to Grid View and see if the node(s) are in red.

If you manually type the data, as in SXMB_MONI, do you get the required output? If not then the data itself is not proper.

Regards,

Abhishek.

former_member187339
Active Contributor
0 Kudos

Hi Freddy,

>>when I test with an xml file in the source directory, the output is exactly the same as the input xml file

which shows the Fixed value function is not working.

How did you test the mapping? by manually entering values of each field in Test tab? Try to copy the payload from SXMB_MONI and paste it in Test tab and see whether you are getting any error with the source structure (if it is there then you will see red nodes)

Regards

Suraj

Former Member
0 Kudos

Hi

I have set the fixed value as such if input 1 output Gary

input 2 output Mark

input 3 output Riz

I have cleared the cache after I have activated, but it still not working from the target file

former_member10771
Active Participant
0 Kudos

Hi,

Not very sure but once u have entered these values in the fix mapping entries there is one more entry at the top for default value. Have you entered any thing over there . Is it that it is taking the values as default from that entry. Just a guess not sure though.

balaji_pichaimuthu
Active Participant
0 Kudos

Hi,

What option u selected for "Behaviour if lookup fails" ?

Regards,

Balaji

former_member183908
Active Contributor
0 Kudos

Hi Freddy,

-->Check the Values which were in the payload the values which you had maintained in the FIXED VALUES in the mapping are same.

--> I am not sure but check with case sensitivity also............ )

Thanks

former_member10771
Active Participant
0 Kudos

Hi,

Just try to change and save the mapping of your fised value and activate it and try refreshing the cache. Also try with some different arbitary value in Fixed mapping if it is able to take this value .

Former Member
0 Kudos

Hi

Give the payload in the test tab , go to design and click the field , check the display queue. Now you will get the values so u can check it . Again check if there is any "space" or upper case , lowercase difference .

It should work.

Else just make any change in the description and save it and activate . Clear the SLD cache...

May be cache problem

Regards,

B.Jude