IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  I have a problem in filtering

    Posted 06/13/23 08:17 AM

    Hi,

    I have a problem with a document list that contains document lists in each index. Each document has a value structured like this:

    <RandomRec>
    <RandomInfo>
    <Code></Code>
    <IntegrationType></IntegrationType>
    <StmtBankCode></StmtBankCode>
    <Website></Website>
    <Email></Email>
    <Phone></Phone>
    </RandomInfo>
    <RandomName>
    <EnShortName></EnShortName>
    <ArShortName></ArShortName>
    <EnName></EnName>
    <ArName></ArName>
    </RandomName>
    <RandomCategory>
    <EnShortName></EnShortName>
    <ArShortName></ArShortName>
    <EnName></EnName>
    <ArName></ArName>
    </RandomCategory>
    <RandomServices>
    <RandomService>
    <ServiceInfo>
    <Code></Code>
    <Type></Type>
    <EnShortDesc></EnShortDesc>
    <ArShortDesc></ArShortDesc>
    <EnDesc></EnDesc>
    <ArDesc></ArDesc>
    <PaymentType>prepaid</PaymentType>
    </ServiceInfo>
    <BillingInfo>
    <EnShortDesc></EnShortDesc>
    <ArShortDesc></ArShortDesc>
    <EnDesc></EnDesc>
    <ArDesc></ArDesc>
    </BillingInfo>
    </RandomService>
    <RandomService>
    <ServiceInfo>
    <Code></Code>
    <Type></Type>
    <EnShortDesc></EnShortDesc>
    <ArShortDesc></ArShortDesc>
    <EnDesc></EnDesc>
    <ArDesc></ArDesc>
    <PaymentType>Postpaid</PaymentType>
    </ServiceInfo>
    <BillingInfo>
    <EnShortDesc></EnShortDesc>
    <ArShortDesc></ArShortDesc>
    <EnDesc></EnDesc>
    <ArDesc></ArDesc>
    </BillingInfo>
    </RandomService>
    </RandomServices>
    </RandomRec>
    

    In this structure, the RandomRec is the parent document, and it has children such as RandomInfo, RandomName, RandomCategory, and RandomServices. Each document has a variable.

    You want to divide the list into two categories based on the PaymentType defined in RandomRec -> RandomServices -> RandomService -> ServiceInfo -> PaymentType. If the user enters “postpaid,” you need to return the records that contain “postpaid”; otherwise, return the records that contain “prepaid”
    please advise me whether the solution java code or flow service .
    Thank you .


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: I have a problem in filtering

    Posted 06/13/23 08:29 AM

    Hi Mohammad,

    what about the following approach:

    initialize three empty lists (postpaid, prepaid, generic) based on sub doctype RandomService
    Loop over /RandomRec/RandomServices/RandomService
    - Branch over /RandomRec/RandomServices/RandomService/ServiceInfo/PaymentType
    -- Postpaid: add the RandomService Item to postpaid list
    -- $default: add the RandomService Item to prepaid list
    Branch on (userInput)/PaymentType
    - Postpaid: map postpaid list to generic output list
    - $default: map prepaid list to generic output list
    return generic output list to the user
    

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: I have a problem in filtering

    Posted 06/14/23 05:08 AM

    I am trying to do this but it’s not working .


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: I have a problem in filtering

    Posted 06/13/23 11:28 AM

    If you are publishing this document to a queue you can filter the messages in the trigger. This should be the most resource effective solution. Otherwise I would stick with Holgars solution. Check this document for filters configuration and try not to create multiple triggers for the same queue. You can use single trigger with multiple processes and conditions.


    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: I have a problem in filtering

    Posted 06/13/23 12:34 PM

    Hi,

    I am not sure if filtering is working with lists, when the list contains several entries with the same value for the field which is used for flitering.
    The sample in the original post shows 2 entries, one for postpaid and one for prepaid, but what happens when there are several entries for postpaid and several entries for prepaid.

    For readability reasons I would prefer to implement my suggestion in my previous post in Flow language, most of the steps can be done with built in services or by using predefined steps from Designer.
    When postpaid step and $default step are put under a Sequence Step, you can add more processing in the Sequences.
    Move the labels postpaid and $default to the Sequence Step then instead of the add step.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: I have a problem in filtering

    Posted 06/13/23 12:42 PM

    They need to publish the elements of the list to a queue to get that filtered result. I don’t know anyway to filter the list from single message. Its still pretty easy and resource friendly though.


    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: I have a problem in filtering

    Posted 06/13/23 01:09 PM

    Hi Engin,

    in this case we would need to know more about the facts what should happen with the data after filtering.

    @Mohammad: can you provide some more details, how you want to continue processing the data after you have filtered the list, please?

    Currently I do not see the neccessity to publish the lists to a queue, but this depends on the fact how the user wants to get the data presented.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: I have a problem in filtering

    Posted 06/14/23 05:10 AM


  • 9.  RE: I have a problem in filtering

    Posted 06/14/23 05:10 AM

    I will try to use this thank you


    #webMethods
    #Integration-Server-and-ESB


  • 10.  RE: I have a problem in filtering

    Posted 06/16/23 03:08 AM

    You should use flow service.


    #webMethods
    #Integration-Server-and-ESB