webMethods

webMethods

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.

 View Only
  • 1.  IData document and Recursive Flow

    Posted Mon February 25, 2019 01:19 PM

    Hi,
    I have a flow service (we will named fs1 which call another flow service fs2 which all fs1 recursively.
    In fs2 I have a document (we call doc1).

    In first step doc1 is initialized with value (for instance value1).
    In second step doc1 is initialized with another valuer (for instance value2).

    After debuging the service I see after calling fs2 the value of my doc (which must be value1) because we come back in first step is value2 and I don’t understand why.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: IData document and Recursive Flow

    Posted Mon February 25, 2019 01:32 PM

    Sorry sorry sorry,
    It’s me,
    Obviously my document was not correctly dropped in my sub call of fs1


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: IData document and Recursive Flow

    Posted Mon February 25, 2019 02:15 PM

    Hi Vital,

    you can try to invoke the service by using a map step with transfromer instead of direct invoke.

    This will ensure proper handling of the inputs/outputs of the service being called.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: IData document and Recursive Flow

    Posted Mon February 25, 2019 02:16 PM


  • 5.  RE: IData document and Recursive Flow

    Posted Mon February 25, 2019 03:02 PM

    Calling the service via trasformer or via invoke will not affect how the doc is handled. If you pass the doc into the call and then change a value inside the doc, you will change the value in the original since the doc is passed by reference. Drops will not help here, only a deep copy (clone).


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 6.  RE: IData document and Recursive Flow

    Posted Tue February 26, 2019 01:34 PM

    I am completely agree with you fml2. I think I thougt the same thing when you post you reply.
    Instead of put my value value1 to doc1 with a map step.
    I define value in previous step doc1 to void. (As we make Something like IData doc1 = new IData(); in Java to instance an object. Even if it is not possible in this case because IData is an interface).
    And thats work.
    Because if I do not this, I do doc1.value = value1; (in Java) and if my doc1 exist as reference it is modified.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods