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.  Element Object Check

    Posted 04/30/20 07:14 AM

    Hi All,

    I hope you and your families are safe and well.

    I have a document which I loop over, say…

    /xmldoc/segment1/segment2/segment3/segment4

    Segment4(a selection of grouped elements) is only put into the outcoming document by the ERP when certain conditions are met in the order. Like i said I loop /xmldoc/segment1/segment2/segment3/segment4 but could someone tell me what the expression would be to check that it exists and then run the mapping according if it does?

    I’ve tried

    Loop
    –>Branch
    –>–> Sequence %/xmldoc/segment1/segment2/segment3/segment4% = null
    –>—>Sequence

    but it doesn’t pick it up

    Thank you in advance


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 2.  RE: Element Object Check

    Posted 04/30/20 12:30 PM

    Hi,

    please provide some more details about your implementation:

    • What is the input array of the loop step?
    • Is the branch set to “evaluate labels” or “switch”?

    Can you provide a screen shot of the loop snippet of your service?

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 3.  RE: Element Object Check

    Posted 04/30/20 05:26 PM

    Hi Holger,

    Really kind of you to reply. I hope you and your family are safe and well.

    So Holger1 shows my initial mapping from the entire document (Holger0) to a single ‘E1EDP20’ record which I call ‘E1EDP20_Temp’ in the pipeline.

    Holger2 shows the record/segment definition.

    Holger3 shows my Loop and sequence. Please ignore ‘$default’ I appreciate they are wrong.

    As I said, E1EDP20 doesn’t always appear in the document, therefore would not populate ‘E1EDP20_Temp’ … My question is how do I check with a regular expression that ‘E1EDP20_Temp’ is populated with any data so that I can branch using whether it has data or it does not.

    Thank you sooo much for responding Holger
    Holger1.JPG
    Holger2.JPG


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 4.  RE: Element Object Check

    Posted 04/30/20 05:32 PM


  • 5.  RE: Element Object Check



  • 6.  RE: Element Object Check

    Posted 05/05/20 12:35 PM

    Hi John,

    I would prefer to check if the original structure has data before mapping it and only map it when it has data.
    This is easier to check as doing it afterwards.
    Might be that the target will be initialized with "null"s when source does not exist.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 7.  RE: Element Object Check

    Posted 05/06/20 05:13 PM

    Dear Holger,

    Thank you soo much for responding. Very kind of you as always.

    That makes sense but could you tell me how to check the, “original structure has data before mapping it and only map it when it has data.”??

    Hope you and your family is save and well

    John


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Element Object Check

    Posted 05/11/20 03:42 PM

    Hi John,

    you will need a BRANCH to check the structure for $null or “” (empty string) and only map if this validates to false.
    When this results in true just skip the step for the mapping.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General