cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error

rasjoshi
Active Contributor
0 Kudos


Hi team,

Below is my requirement -

If event =! 26, my communication channel is going in error state. Is there any way to stop this error.

Like, if event = 26, it should generate file

If event =! 26, it should ignore the file.

Regards,

Rashmi

Accepted Solutions (1)

Accepted Solutions (1)

suman_saha
Contributor
0 Kudos

What is this Compound field and why are you assigning the value to record?

I hope record is the parent node.

If not, use the logic in the header and use createif instead of ifwithoutelse.

Suman

rasjoshi
Active Contributor
0 Kudos

Yes records is parent node,

my requirement is if EVENT Field = 26 then only create the file.....

If I use "createif" how will I pass my source parent node to records?

-rashmi

former_member191435
Contributor
0 Kudos

u just create record if event is exists.... Try with the mapping provided by me..... remaing fields mapping do as it per your mapping logic .... Just per root node use this mapping...

Thanks,

Sreenivas

suman_saha
Contributor
0 Kudos

Hi,

Recode won't carry any value,so need not pass any value.

You may remember when you create a header node, you don't define the type, its because the nodes don't carry any value, the fields having value.

So just replace ifwithoutelse with createif and it will work.

Suman

azharshaikh
Active Contributor
0 Kudos

Hi Rashmi,

Is EVENT repeating or has only 1 value in entire payload?

If its repeating with different values then how do you want to handle it?

Should it generate the Record Node only for EVENT  = 26 and Ignore other EVENT values?

>> If yes then you can achieve this in MM using the Node functions as suggested abv

If you want to Ignore the entire file when EVENT != 26 then you can do this in RD level using conditions instead of passing it to MM...

If your Record is with Occurrence 1..unbounded then the file will fail in PI MM, inorder to avoid this you can handle it in RD condition

Can you share your MM and input/output display queue screenshot

Regards,
Azhar

rasjoshi
Active Contributor
0 Kudos

Hi Azhar,

You are right, event carries many values, i need to generate file only if event = 26 and not to create it it event =! 26,

Please suggest how to achieve this

- rashmi

azharshaikh
Active Contributor
0 Kudos

Hi Rashmi,

Did you try to test with the mapping as suggested abv by Sreenivas?

It will do the needful...just make sure that the Context of the EVENT field is set at parent level

Regards,

Azhar

rasjoshi
Active Contributor
0 Kudos

Hi Azhar,

I can not use createif function here.... If i use createif then how will I pass my root resource to root target?

See the screen shot with problem -

This wont work for me... Compund is my source root node...

- rashmi

former_member191435
Contributor
0 Kudos

dont use collapse context.....

this creatif will create only if event is 26 exiats in your source root node... otherwise target wont create...

Suppose you are getting event value 26 as 3 times in the source.... if you map our mapping without collpase context it will create target root as 3 times....

let me know if you require anything...

thanks,

Sreenivas

azharshaikh
Active Contributor
0 Kudos

Hi Rashmi,

Assuming that EVENT field is coming for each Occurrence of your Source Root Node Compound...

Using the mapping screenshot as given by Sreenivas you will be able to pass the required Compound value context to the Target Node Record..

Please check if it helps.

Can you give the screenshot of your Source / Target Structure , MM and payloads for further inputs...

Regards,

Azhar

rasjoshi
Active Contributor
0 Kudos

I used mm given by srinivas,

Its generating blank file.....even if i m not using collapsecontext it is generating blank file.

It should not generate file this is my requirement.

Pleaseee suggest.

-rashmi

former_member191435
Contributor
0 Kudos

can you please share the display queue of event field.....

Thanks,

Sreenivas

rasjoshi
Active Contributor
0 Kudos

FYI

rasjoshi
Active Contributor
0 Kudos

Test MM -

former_member191435
Contributor
0 Kudos

Hi,

Please check below mapping...

if you do the root level mapping like this...

If you are not getting any value in the payload i.e. 26 it wont create root node.

If you get value 26 in the payload it will create the root node like this..

let me know still if you face the issue..

Thanks,

Sreenivas.

former_member191435
Contributor
0 Kudos

dont use collapse context and map wid default...

and check if your payload as value 26 or not...

rasjoshi
Active Contributor
0 Kudos

I have used same mapping but still at target side it is generating file with 0bytes.

If I wont use mapwithdefault getting below error, this is the reason I am using mapWithDefault -

Please suggest how to avoid this.

-Rashmi

rasjoshi
Active Contributor
0 Kudos

Generated file with 0bytes.... It shouldnt have generated a file as Event field was not having 26

azharshaikh
Active Contributor
0 Kudos

Hi Rashmi,

In this case I believe the Node EVENT is not present in the Input payload...

To stop the file from MM, you can use Receiver Determination Xpath condition for checking if this EVENT node exists in the payload..If yes, then forward to MM else not...

Please refer following and add the Xpath condn as given in the blog and test:

Xpath Condition in Receiver Determination - Process Integration - SCN Wiki

Node Not Exits :

If I want to send some files if node is not exits .How to use Xpath?

Below one will help to send the file to receiver.

Regards,

Azhar

rasjoshi
Active Contributor
0 Kudos

I think I need to go for extended receiver determination

-Rashmi

azharshaikh
Active Contributor
0 Kudos

I believe the Normal Condition based RD will suffice...pls configure n test

rasjoshi
Active Contributor
0 Kudos

Yeah but we are generating 10 files for same target system based on value in event field.....

- Rashmi

azharshaikh
Active Contributor
0 Kudos

You mean, there is already some RD conditions being used in your Receiver Determination?

You can add the Exists condition check and AND it with those already present..

Can you give Screenshot

former_member191435
Contributor
rasjoshi
Active Contributor
0 Kudos

Thank you Srinivas and Azhar for all your help.

-Rashmi

Answers (2)

Answers (2)

suman_saha
Contributor
0 Kudos

Hi,

You may try using createif instead of ifwithoutelse.

Regards,

Suman

former_member191435
Contributor
0 Kudos

use create function u will get desired result...

try like this and let me know if it works or not...

Thanks,

Sreenivas