Skip to Content
avatar image
Former Member

Condition for Target

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Jan 30, 2009 at 11:50 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 30, 2009 at 11:51 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 30, 2009 at 11:54 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 30, 2009 at 12:00 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 30, 2009 at 01:33 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 30, 2009 at 01:44 PM

    Try making use of createif Function In mapping

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.