Friday, 17 June 2016

How to check multiple IF condition to single tag in TIBCO


How to check multiple IF condition to single tag in TIBCO?

  1. Create schema which is being used in your project.
    Eg: I created EmpDetails schema which has empDetails_New and empDetails_Old tags
     
    Schems XSD:
     

2) In mapper, I want to configure ChangedField tag with different condition checks.


3) Without configuring 1st IF condition tag, if we try to create duplicate of that (ChangedField tag) it’ll shows error.

Means before creating duplicate/copy of any particular tag make sure that tag has to be configure properly without any error like below screenshot.

  1.  Two ways we’ll create copy of ChangedField tag

  1. Keep your mouse on ChangedField, then copy and paste how many duplicates you want to create.
  2. Create duplicate as like below screenshot
     
4) Finally we are able to check multiple conditions under single tag
  1. Test Results:
    Input:
    <?xml version = "1.0" encoding = "UTF-8"?>
    <EmpDetails xmlns = "http://www.tibco.com/schemas/FunctionsTest/Schema.xsd">
                    <empDetails_New>
                                    <Id>1234</Id>
                                    <Name>Hari</Name>
                                    <Address>Bangalore</Address>
                                    <Salory>20000</Salory>
                    </empDetails_New>
                    <empDetails_Old>
                                    <Id>1235</Id>
                                    <Name>Hari</Name>
                                    <Address>Kolkata</Address>
                                    <Salory>15000</Salory>
                    </empDetails_Old>
    </EmpDetails>
     
    Mapper  Output:
     
    <?xml version = "1.0" encoding = "UTF-8"?>
    <ChangedFields>
                    <ChangedField>Emp_ID</ChangedField>
                    <ChangedField>Emp_Address</ChangedField>
                    <ChangedField>Emp_salory</ChangedField>
    </ChangedFields>
     
     

 

No comments:

Post a Comment