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.  Variable Movement From DocumentList to Pipeline

    Posted 03/08/08 11:59 AM

    Hi Forum,

    I seem to be having a strange problem. I have a few variables in the form of a DocumentList of the type

    Paramater[0]
    key
    paramater
    Paramater[1]
    key
    paramater

    My problem is that i have a particular variable in the key and this varaibale needs to be passed as an input to another target service that i am calling using the invoke function.
    i.e In the Paramater[0]/key the value is ipaddress and the Paramater[0]/paramater is 192.168.25.23. The ipaddress is an input paramater to my invoked service using remoteInvoke function. I am not getting a way as to how to pass a variable to the pipeline dynamically i.e a variable with name ipaddress with value 192.168.25.23 should be fed to the pipeline so that my target service gets correctly invoked.

    Any ideas are more than welcomed…

    thanks,
    nightfox.


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


  • 2.  RE: Variable Movement From DocumentList to Pipeline

    Posted 03/10/08 05:12 AM

    You can create a Java service to read this document list and then create IData Objects(variable) in the pipeline as desired using the Parameter Key as IData Object name and Parameter Value as IData Object value.


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


  • 3.  RE: Variable Movement From DocumentList to Pipeline

    Posted 03/10/08 03:28 PM

    Or you can simply loop over the DocumentList and Branch underneath which checks if the key value is “ipaddress” then map the parameter to desired variable or service.

    HTH


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


  • 4.  RE: Variable Movement From DocumentList to Pipeline

    Posted 03/11/08 04:54 AM

    Talah,

    Firstly thanks for the response.
    The problem is that i had given that ipaddress field as an example, i mean it can be any variable it can be ipaddress or text or link or anything so it wouldnt be possible to anticipate writing the all the branches for the same.

    Has any one got any idea as to how to go about doing the same in flow lang. i.e creating a variable dynamically in the pipeline on the fly.

    Ajay,

    I can use your option as a last resort as i do want to know as to how to simulate the same scenario in flow.

    nightfox…!


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


  • 5.  RE: Variable Movement From DocumentList to Pipeline

    Posted 03/11/08 06:22 AM

    Create one Java Service with two inputs “key” and “parameter” and use below code -

    // pipeline
    IDataCursor pipelineCursor = pipeline.getCursor();
    String key = IDataUtil.getString( pipelineCursor, “key” );
    String parameter = IDataUtil.getString( pipelineCursor, “parameter” );
    IDataUtil.remove(pipelineCursor,“key”);
    IDataUtil.remove(pipelineCursor,“parameter”);
    pipelineCursor.destroy();

    // pipeline
    IDataCursor pipelineCursor_1 = pipeline.getCursor();
    IDataUtil.put( pipelineCursor_1, key, parameter );
    pipelineCursor_1.destroy();

    Use this java service as tranformer inside a loop over your listItems and it will create these variables on the fly.

    Hope this helps !


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