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
  • 1.  Get Context ID of a flow

    Posted Mon June 21, 2004 02:37 PM

    Does anybody knows how to get the Context ID of a flow in run time?

    I would like to return the Context ID to the client that invokes the service. How can I do this ?

    Thanks

    João Caseiro


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


  • 2.  RE: Get Context ID of a flow

    Posted Mon June 21, 2004 03:09 PM

    Joao,

    Use the webMethods JavaAPI reference(com.wm.app.b2b.client.Context)class
    and diff TContext() methods to accompish this task.

    In the Developer tool under Help menu see the Java API Reference section.

    HTH,


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


  • 3.  RE: Get Context ID of a flow

    Posted Tue July 27, 2004 12:33 AM

    I am trying to do the same thing… I have looked at the documentation for the Context and TContext classes and cannot find any reference to the “ContextId” property.

    thanks in advance


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


  • 4.  RE: Get Context ID of a flow

    Posted Fri July 30, 2004 02:45 AM

    Sorry for the repeat post… but does anyone know how to do this? It seems like a reasonable thing to want to do.

    We want the context id so that we can include a link to the monitor application in our error notifications. This would allow support to immediately see the full details of the service that failed, and possibly to resubmit after corrective action has been taken.

    The “Context” classes in the API seem like they are for invoking services… not for querying the current context.

    Any ideas?


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


  • 5.  RE: Get Context ID of a flow

    Posted Wed February 23, 2005 07:59 PM

    Imports:
    com.wm.app.b2b.server.InvokeState
    com.wm.app.audit.IAuditRuntime

    Service:
    InvokeState is = InvokeState.getCurrentState();
    IAuditRuntime ar = is.getAuditRuntime();
    String context = ar.getContextStack();

    IDataCursor pipelineCursor = pipeline.getCursor();
    IDataUtil.put(pipelineCursor,“context”, context);
    pipelineCursor.destroy();

    This returns a string list of context IDs. One problem with this is that the string of context ids are not necessarily in order. I would like a way to explicitly take the context ID that I want (i.e. root/parent/current). Can anyone make this happen?


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