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.

 View Only
Expand all | Collapse all

Example of Flow and Java Service

  • 1.  Example of Flow and Java Service

    Posted Fri May 05, 2006 10:44 AM

    Hi,

    I’m a learner for webMethods. I am trying to create a sample Flow service and Java service using WMDeveloper.

    Can someone provide me with simple example so that I can proceed further?

    Thanks,
    Asawari


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


  • 2.  RE: Example of Flow and Java Service

    Posted Fri May 05, 2006 11:55 AM

    Hi Asawari,

    Let us say that you want to concatenate two strings. You can write a java service as :

    // pipeline
    IDataCursor pipelineCursor = pipeline.getCursor();
    String str1 = IDataUtil.getString( pipelineCursor, “str1” );
    String str2 = IDataUtil.getString( pipelineCursor, “str2” );
    pipelineCursor.destroy();
    String strFinal = str1 + str2 ;
    // pipeline
    IDataCursor pipelineCursor_1 = pipeline.getCursor();
    IDataUtil.put( pipelineCursor_1, “strFinal”, strFinal );
    pipelineCursor_1.destroy();

    or you can write a flow service as :
    Using try catch block —

    SEQUENCE (exit on Success) MAIN
    ----SEQUENCE (exit on failure) TRY
    --------pub.string:concat
    ----SEQUENCE (exit on done) CATCH
    --------getLastError

    Please go through the documentation to know more about the services available.

    Regards,
    Sandesh


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


  • 3.  RE: Example of Flow and Java Service

    Posted Fri May 05, 2006 12:59 PM

    Thanks for your help.

    Is there any user manual / tutorial from where I can get the help when needed?


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


  • 4.  RE: Example of Flow and Java Service

    Posted Fri May 05, 2006 01:51 PM

    You can download webMethods_Documentation_Library_6.1.zip from advantage.webmethods.com . This should suffice.

    Regards,
    Sandesh Tak


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


  • 5.  RE: Example of Flow and Java Service

    Posted Fri May 05, 2006 03:09 PM

    I’d also recommend downloading the Developer 4.6 Tutorial from Advantage. There are a few differences in the Developer user interface and some services have been renamed, but the core Flow language is still the same.

    Mark


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


  • 6.  RE: Example of Flow and Java Service

    Posted Mon May 08, 2006 09:57 AM

    Hi
    In string concatenation example in Flow service, it is giving “null” as concatenated value. Where I am going wrong?

    • I created one document type which contains 2 string inputs. Set its Publishable property as TRUE.
    • Created new flow service. Added that document type as Input for flow service. For output, created one string variable.

    [SIZE=2]Use try catch block —
    –SEQUENCE (exit on failure)
    –pub.string:concat
    –SEQUENCE (exit on done)
    –getLastError

    [/size]- Clicked on Run. It asked me for input ie. 2 strings to concat.

    • I entered 2 strings and clicked on OK.
    • It showes me str1 as “asa”, str2 as “wari” and value (ie. output) as “null”.

    What can I do? Or let me know the fresh procedure to do the same.
    How to specify Try-catch block in Flow service code?

    Thanks
    Asawari


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


  • 7.  RE: Example of Flow and Java Service

    Posted Mon May 08, 2006 11:21 AM

    Hi Asawari,

    Since your pipeline variable names (str1 & str2) are different from Service In variable names (instring1 & instring2) you need to link those explicitly in the pipeline.

    With same variable names there is no need to link explicitly in the pipeline.

    Bharat Varma


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


  • 8.  RE: Example of Flow and Java Service

    Posted Mon May 08, 2006 11:55 AM


  • 9.  RE: Example of Flow and Java Service

    Posted Tue February 26, 2019 03:34 AM

    Hi Mark ,
    What is Advantage.Is it some portal that is retired ?Or is it called Empower now?


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


  • 10.  RE: Example of Flow and Java Service

    Posted Tue February 26, 2019 12:57 PM

    Hi Ankit,

    yes, Advantage has been retired after Software AG acquired webMethods.

    Documentations is now available in Empower or in the TechCommunity.

    Developer ist now called Service Development and is one part of Designer.

    Regards,
    Holger


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