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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Understanding variables in pipelines

  • 1.  Understanding variables in pipelines

    Posted Tue March 04, 2025 03:19 PM

    Here's what is confusing me, abstracted a bit. I run a simple flow with an invoke step (in this case, it invokes a Natural subprogram via RPC). It comes back with an output "Document". Great. I try to map a single field from that document (in this case, the last ISN read) to a "top-level" field. It shows the link in the designer, but when I run the flow, no such variable exists in the pipeline.

    It doesn't matter either way if I make the top-level field an "output" field.

    Is this possible? What am I misunderstanding about variables in pipelines?



    ------------------------------
    Adam Connor
    ------------------------------


  • 2.  RE: Understanding variables in pipelines

    Posted Wed March 05, 2025 02:43 AM
    Edited by Kailash Kumar Mishra Wed March 05, 2025 02:48 AM

    Hi Adam,

    As you mentioned that when you run the Flow Service the variable is not available post service execution indicating the mapping is not working.

    Have you tried debugging the flow service and immediately after the Invoke step where you have performed the mapping do you see the mapped variable ? Any Dropping of variables in the subsequent steps post the mapping? Is pub.flow:clearPipeline service being invoked in the flow service and hence your variable is cleared from the pipeline?

    Perhaps if you can share Screenshots of the mapping and/or the Flow service it might help to assist



    ------------------------------
    Kailash Kumar Mishra
    ------------------------------



  • 3.  RE: Understanding variables in pipelines

    Posted Wed March 05, 2025 12:39 PM

    The service is simple:

    The mapping step takes a single field, LAST-ISN, and tries to map it to "last_isn":

    If I run it in the debugger, after MAP I see

    (no "last_isn") which is the same thing I see if I run it normally and look at the results.




    ------------------------------
    Adam Connor
    ------------------------------



  • 4.  RE: Understanding variables in pipelines

    Posted Thu March 06, 2025 01:09 AM

    Hi Adam,

    Your service is indeed simple and the mapping should work ideally. 

    Have noticed that the Source Field LAST_IN is of number type ( has 64 mentioned ) whereas Target Variable last_in is normal string ( has Abc mentioned ) not sure if this is preventing the mapping from taking place.

    Perhaps you can make the variable last_in too as numeric type 64  of the same type as Source field and try once and see if the mapping works



    ------------------------------
    Kailash Kumar Mishra
    ------------------------------



  • 5.  RE: Understanding variables in pipelines

    Posted Thu March 06, 2025 10:47 AM

    In truth, those indicators are too small to really see on a high resolution monitor. Interesting. When you add a variable to a pipeline, you can't really specify a type like Int64. I can make is an "object" type, though. And then it works, so thank you. Still disturbing that there is no error raised.



    ------------------------------
    Adam Connor
    ------------------------------



  • 6.  RE: Understanding variables in pipelines

    Posted Thu March 06, 2025 11:06 AM

    Hi Adam,

    Glad you were able to figure it out.

    Also as @Theo Ezell suggested in case you want to map from variable of Type Numeric 64 to variable of String type you may use the In-built service pub.string:objectToString as a Transformer in that MAP while linking the Source and Target Variables.

    Also if you have an option to change the Output Field Type for variable LAST-IN in the RFC call then you may change it to type String



    ------------------------------
    Kailash Kumar Mishra
    ------------------------------



  • 7.  RE: Understanding variables in pipelines

    Posted Thu March 06, 2025 11:40 AM

    After adding the variable to the output pipeline, right click on it and select "Properties".

    In this dialogue you can change the type of the variable.

    See "Working with Designer" Guide and the "Service Development Help" Reference Guide for details.

    Regards,

    Holger



    ------------------------------
    Holger von Thomsen
    Software Developer
    Deutsche Telekom IT GmbH
    Darmstadt
    ------------------------------



  • 8.  RE: Understanding variables in pipelines

    Posted Thu March 06, 2025 10:22 AM

    I'm thinking it's because you are mapping from a double to a string. I suggest adding an objectToString transformer to your map.



    ------------------------------
    Theo Ezell
    ------------------------------



  • 9.  RE: Understanding variables in pipelines

    Posted Thu March 06, 2025 12:45 PM

    Actually, at least from the UI, it isn't easy to tell what the type is. If I select the LAST-ISN field coming from Natural, I see properties that look like this:

    That part is all based on the IDL parsing, but the actual field is P10 or N10, so I would think some kind of integer would be more likely.

    I'll go re-read the indicated docs. I don't doubt that it's doable, although I have some reservations about whether writing flows in designer is productive.



    ------------------------------
    Adam Connor
    ------------------------------



  • 10.  RE: Understanding variables in pipelines

    Posted Thu March 06, 2025 01:13 PM

    FWIW, I can see all the types in the relevant Adapter Service. The issue is that all the data returned by the invoke, represented by the "outRec" document, does not specify those types -- it's more general. I suppose that is because the interface representing the invoke cannot know what is getting returned. But the result is that the "strong typing" of the design is kind of lost when you are mapping results from an invocation, and apparently you have to re-apply your knowledge. This seems very kludgey, because all that information was available in the adapter service in the first place.

    But I will go back and re-read.



    ------------------------------
    Adam Connor
    ------------------------------



  • 11.  RE: Understanding variables in pipelines

    Posted Fri March 07, 2025 11:36 AM

    Hi @Adam Connor,

    As of the size of the pipeline fields' annotation, yes they are indeed quite small, but believe me, once get the hang of it, you'll be able to identify them at a glance, whatever your screen resolution.

    Regarding field type, yes you can specify the required Java type: once you create a new Object field (Data type: Object), from the Java wrapper type dropdown list select one of the supported Java Type, so in your case java.lang.Long



    ------------------------------
    Mathieu Aguesse
    webMethods Delivery Consultant
    IBM France
    ------------------------------



  • 12.  RE: Understanding variables in pipelines

    Posted Fri March 07, 2025 12:04 PM

    Thanks, this is helpful. And I've realized I can also type the fields in documents.

    TBH, what I think this part of webmethods needs is a better overview, building the mental model necessary to use webmethods successfully. It presumes a certain outlook (very Java-y, and I was a Java developer for some years, but we mostly use more dynamic languages now.)



    ------------------------------
    Adam Connor
    ------------------------------



  • 13.  RE: Understanding variables in pipelines

    Posted Fri March 07, 2025 12:53 PM

    For others on high resolution  monitors in Windows... this makes the icons in Eclipse easier to see: https://stackoverflow.com/a/52869905/306262



    ------------------------------
    Adam Connor
    ------------------------------



  • 14.  RE: Understanding variables in pipelines

    Posted Mon March 10, 2025 09:37 AM

    It sounds like the field isn't being properly extracted from the document. Try explicitly mapping it using a transformer or ensuring the document structure matches what's expected. Also, check if the document is properly populated before mapping.



    ------------------------------
    Zafar khan
    ------------------------------



  • 15.  RE: Understanding variables in pipelines

    Posted Thu March 13, 2025 03:15 PM

    I'd like to add that if you use objectToString, it throws an exception if the input variable is null, so be careful. I usually add validation when using that transformer.



    ------------------------------
    Pedro Dinis dos Reis Pereira da Silva
    Integration Engineer
    Nokia
    ------------------------------