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.  Io: how to set a property to null?

    Posted Sun September 29, 2024 05:00 PM

    In on premise webMethods I can set a property to $null in a transform pipeline. How do I do this in the cloud version?


    #webMethods-cloud
    #webMethods
    #webMethods-io-Integration


  • 2.  RE: Io: how to set a property to null?

    Posted Tue October 01, 2024 03:28 PM

    Double-click the variable to open the set value dialog. Don’t enter a value, but make sure “Include empty values for string types” is checked.
    empyValue


    #webMethods-io-Integration
    #webMethods
    #webMethods-cloud


  • 3.  RE: Io: how to set a property to null?

    Posted Wed October 02, 2024 11:10 AM

    That’s not null, that’s an empty string, no?

    @bastiaanr – can you clarify exactly where you are specifying $null? This “magic” literal cannot be used to set anything. It can be used to check if a var is null in a BRANCH in some other cases.

    Setting a string var to “” is not equivalent to null. Such a var will not match $null.

    If you need a var to be in the pipeline and explicitly set to null (which is rare – usually just drop the var) you can create Java service that accepts an input var that holds the name of the variable you want to create with a null value. But really, should just drop the var.

    If you have more details about your specific scenario, the guidance can be refined.


    #webMethods-cloud
    #webMethods-io-Integration
    #webMethods


  • 4.  RE: Io: how to set a property to null?

    Posted Thu October 03, 2024 03:09 AM

    Thank you for the answers. I’m talking about the cloud version of webMethods and want to set an attribute to null in a transform pipeline. I want it null because I want that the attribute still exists in the document but has no value. In my preference the existance attributes in a document is the same at runtime and design time.


    #webMethods
    #webMethods-cloud
    #webMethods-io-Integration


  • 5.  RE: Io: how to set a property to null?

    Posted Thu October 03, 2024 10:29 AM

    If empty string works for you, go for it. Using null for a purpose other then checking if it exists or not is usually a bad idea. Even if your document validation requires it, I recommend updating your schema to accept empty string and use it that way. null is not a value, and it shouldn’t be used as value.


    #webMethods-io-Integration
    #webMethods
    #webMethods-cloud


  • 6.  RE: Io: how to set a property to null?

    Posted Thu October 03, 2024 11:05 AM

    Sure, but just keep in mind that null and empty string are not the same. As such, a var set to “” will not match $null.


    #webMethods
    #webMethods-io-Integration
    #webMethods-cloud


  • 7.  RE: Io: how to set a property to null?

    Posted Wed October 30, 2024 08:55 AM

    Hi Bastiaan Rodenburg,

    on cloud platform use “” to set null property.
    see this implementation I’ve done earlier.
    {F0C70533-0347-4F2B-9AB9-7D7E3F6A8B25}

    Hope this will help you!

    Regards,
    Zainul Abideen


    #webMethods-cloud
    #webMethods
    #webMethods-io-Integration


  • 8.  RE: Io: how to set a property to null?

    Posted Wed October 30, 2024 11:13 AM

    That is not null. That is an empty string. That will not match $null.

    But if it does match in iPaaS with something like

    BRANCH on ‘/leaveType’
    …$null: SEQUENCE

    Then that is good to know. But it is does not behave that way in Integration Server on-prem. An empty string is not the same as null.


    #webMethods-cloud
    #webMethods
    #webMethods-io-Integration