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

How to make node.ndf files as configurable

  • 1.  How to make node.ndf files as configurable

    Posted Thu April 03, 2014 08:02 AM

    Hello,

    I’m looking for a way to make audit property “include pipeline” as configurable via a configuration file.
    I know the value of this property is present in the node.ndf file in the flow service folder under the IS machine.

    I’d like to know how to make this file as configurable. Do you have any suggestions?

    Thanking you.


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: How to make node.ndf files as configurable

    Posted Thu April 03, 2014 02:45 PM

    Hi,
    Can you explain briefly on the above requirement please.


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 3.  RE: How to make node.ndf files as configurable

    Posted Thu April 03, 2014 05:14 PM

    I don’t think swapping node file is a good idea.
    If you are looking at an easy way to consistently turn on auditing info, you can create a new flow service template which have “Include Pipeline” turned on. Then when creating new services, you can just use this template instead of the default one.

    you can create new template at:
    Preference>Software AG>Service Development>Element Property Template
    HTH,


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 4.  RE: How to make node.ndf files as configurable

    Posted Fri April 04, 2014 12:05 AM

    You can use the code below to configure the Include Pipeline property:

    
    NSNode nsNode = Namespace.current().getNode(serviceName);
    if (nsNode instanceof NSService){
    NSService serviceNode = (NSService)nsNode;
    serviceNode.setPipelineOption(NSService.NO_PIPELINE);
    }

    There are four pipeline options: NO_PIPELINE, SAVE_PIPELINE, RESTORE_PIPELINE_NO_MERGE, RESTORE_PIPELINE_MERGE
    Don’t forget to import:
    com.wm.lang.ns.NSNode
    com.wm.lang.ns.NSService
    com.wm.app.b2b.server.ns.Namespace


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: How to make node.ndf files as configurable

    Posted Mon April 07, 2014 11:09 AM

    I’m going to explain my requirement :

    I have a study to do. The goal is to determine if it is possible to make “include pipeline” property as configurable.
    This would allow to set by default all audit pipeline properties to “On error only” and change this property to “always” if an analyse is needed.

    Proposition 1:
    We have a list of flow services requiring an audit property to “always” in a configuration file. The application roll-out set the “include Pipeline” property of these services to “always”.

    Proposition 2:
    I would like to set out the “include pipeline” property of my flow services in a configuration file in order to allow the production team to edit this property when they want to check the pipeline. The production team can use neither the developer/designer nor node.ndf files. That’s why the configuration file idea is proposed. This configuration file would be used via a UI and looks like that:

    X* X* ... ...

    *where X can be set to 0 (never), 1 (on error only) or 2 (always).

    Is it more clear?

    Thanking you.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 6.  RE: How to make node.ndf files as configurable

    Posted Mon April 07, 2014 12:02 PM

    Hi Mike,

    This is very interesting requirement and I hope SAG is listening.

    The good practice is to put Audit properties of a flow service as:

    Enable Auditing: When top-level service only
    Log on: Error Only
    Include Pipeline: On errors only

    It is suggested to check the service audit in MWS in case of such scenarios.

    Properties → Audit is static characteristic, not configurable at run-time [by default].

    You need to modify the code to check flags at every run of service, which is not a good design.

    will watch, what other experts have to say.

    Thanks,
    Rankesh


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: How to make node.ndf files as configurable

    Posted Tue April 08, 2014 10:28 AM

    (I’m on wM 7.2.1)

    I developed a Java Service allowing to change the “include Pipeline” property to “always” for a given service name.

    However, I have a persistence issue. Indeed, the java service change the property in the code, BUT not in the node.ndf file. Consequently, when I reload the package, the property comes back to the previous value…

    This is the code :

    
    int audit = 0;
    
    IDataCursor pipelineCursor = pipeline.getCursor();
    String serviceName = IDataUtil.getString(pipelineCursor, "serviceName");
    pipelineCursor.destroy();
    
    NSNode nsNode = Namespace.current().getNode(serviceName);
    if (nsNode instanceof NSService){
    NSService serviceNode = (NSService)nsNode;
    AuditSettings auditSettings = serviceNode.getAuditSettings();
    auditSettings.enableDocumentAudit(2);
    serviceNode.setAuditSettings(auditSettings);
    audit = auditSettings.isDocumentAuditEnabled();
    }
    
    pipelineCursor = pipeline.getCursor();
    IDataUtil.put(pipelineCursor, "audit", audit);
    pipelineCursor.destroy();

    Do you have a solution ?


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 8.  RE: How to make node.ndf files as configurable

    Posted Tue April 08, 2014 12:07 PM

    Sounds interesting.

    Please open an idea in Brainstorm for that.

    [url]http://brainstorm.softwareag.com/BrainstormHome[/url]

    Lets see what happens there.

    Regards,
    Holger


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: How to make node.ndf files as configurable

    Posted Tue April 08, 2014 12:09 PM

    You can add this service as a startup service to your package, so it will get executed every time the package loads.


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 10.  RE: How to make node.ndf files as configurable

    Posted Tue April 08, 2014 02:52 PM

    @Holger von Thomsen

    I think the problem would be the same : no writing on the disk, only in memory.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 11.  RE: How to make node.ndf files as configurable

    Posted Tue April 08, 2014 03:36 PM

    You are right, but at least it will serve as a workaround as upon the package load the value read from the node.ndf will be overridden with the value specified in your config.

    There are some more properties for which such a feature can be of interest:

    • Caching enabled/disabled
    • Cache Expiration TimeOut
    • Retry Settings

    Therefor I asked for submitting an idea on Brainstorm to see what SAG R&D is thinking about it.
    Maybe we get a sustainable solution for this in one of the next releases when we all vote for this idea.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 12.  RE: How to make node.ndf files as configurable

    Posted Wed April 09, 2014 06:46 AM

    I added the service in start-up services and reloaded the packages. Finally, the result is the same : the value is modified in the code but not in the node.ndf file.


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 13.  RE: How to make node.ndf files as configurable

    Posted Thu April 10, 2014 08:12 AM

    Just make it clear:

    Adding the service for changing the values as a StartupService will not lead to effect that the new values will be persisted in the node.ndf.

    It just makes sure, that upon every load (or reload) of the package the originally persisted values will be replaced in memory with those read from the config-file.

    Additionally (as already stated in this thread by other authors) it is not really a good idea to manipulate the node.ndf-files manually. If there goes any thing wrong upon save the service will not be loaded upon next load of the package.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods