cancel
Showing results for 
Search instead for 
Did you mean: 

Condition for Target

Former Member
0 Kudos

Hi,

I am having a scenario SAP --> PI --> WebMethods.

Depending on the occurence of a node in the source structure my interface should be executed.

Eg:

<SRC>
     <Node1>
        </Name>
     </Node1>
     <Node2>
        </Addrs>
     </Node2>
</SRC>

Now if Node1 is present in the message then only the message should be forwarded to target else nothing should happen. Where should I put the condition....condition cannot be given in receiver determination as no message is visible in the condition selector (where we select the XPATH).

Please provide pointers on how to achieve this.

Thanks,

Abhishek.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Try making use of createif Function In mapping

Former Member
0 Kudos

If you would like to apply sudhir's suggession but not execute receiver if it match the condition, there is new concept in pi 7.1 routining at interface determination - that you could try -

if you need further details, you can even look at blog on this

There are few other alternatives - but i think this may meet your req - let me know

Ravi Appala

Edited by: ravi appala on Sep 24, 2009 6:41 AM

former_member200962
Active Contributor
0 Kudos

Hi,

I was (still on) on PI7.1 itself....it was due to the selected Interface Pattern...

Good to see that you actually searched a post which I myself had forgotten

Thanks,

Abhishek.

former_member200962
Active Contributor
0 Kudos

Hi,

Thanks for the replies:)

@Prateek -- In the condition editor of Rx Determination I was not able to see the message (after selecting the Xpath option) itself....hence was confused as how to proceed

@ Reyaz, Rajesh -- the method you suggested (in mapping) will cause the scenario to execute....however if the node is not present I want to cancel the process there itself and not allow any further processing....

@Sudhir -- Will apply this method....

If there are any more suggestions then please let me know..

Thanks,

Abhishek.

Former Member
0 Kudos

Hi,

You have to use xpath w/o value help. Just go through this thread to know why...

Regards,

Sarvesh

Former Member
0 Kudos

May be What can do is

1. Generate the Flag and message in target based on the node exists or not.

i.e if node1 exists then map message to target message and set flag as true/exists

Use conditional receiver determination

Rajesh

SudhirT
Active Contributor
0 Kudos

If the node is not visible in condition editor, you can mannualy write the XPATH and put the condition like

Segment/Fields/ [Subfield] EX

.

Thanks!

Edited by: Sudhir Tiwari on Jan 30, 2009 1:04 PM

Former Member
0 Kudos

Hi Abhishek,

You can try one thing. You can create your target node using create if Node1 is not null. or You can use exists function. If your Node1 is there, then only your target node will be generated. else it will not be generated.

Regards,

Reyaz

prateek
Active Contributor
0 Kudos

In the condition editor in receiver determination, you may select the node for which the condition has to be placed an use the xpath funtion Exist (EX).

Regards,

Prateek