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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

Generating Error mail along with the package name

  • 1.  Generating Error mail along with the package name

    Posted 06/29/06 08:27 PM

    hi all,

    i didnt find a suitable forum for this , so im posting my query in webmethidsEDI.

    When ever an error comes i need to send generate the mail.
    im generating the mail using smtp builtin service which is already available in webMethods.

    In the body of the mail im getting the service name but i want the package name also

    packagename.foldername.subfoldername:serviceName

    at present how im getting is

    foldername.subfoldername:serviceName

    pls advice me how do i achive this

    thnx


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 2.  RE: Generating Error mail along with the package name

    Posted 06/29/06 08:37 PM

    in WM normally if you select the service and copy and paste in the editor it will give you fully qualified name (foldername.subfoldername:serviceName).
    That’s the way it should behave as the folder is the namespace not package.

    If you want the package also the you have to do it mannually( add the Package name in front of the fully qualified name to make it as needed by you ‘packagename.foldername.subfoldername:serviceName’)

    HTH
    PRY


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 3.  RE: Generating Error mail along with the package name

    Posted 06/29/06 09:10 PM

    Hi PRY

    I cant hard code all the packge names right.
    Im writing a common service to move files, this common service im calling in my applications. for ex PKG_A , PKG_B, PKG_C
    These three packages are three different applications which use common service moveA2AFiles.

    which ever application fails to transfer files , generating the error mail , in the body of the error mail im able to get the service name as i have mentioned before.

    In this scenario i think its not advisable to hard code the package name.

    any other way to customize this???


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 4.  RE: Generating Error mail along with the package name

    Posted 06/29/06 11:22 PM

    normally fully qualified name starts with the top level folder inside the package. In you case foldername.subfoldername:serviceName.

    I don’t think is there is any way to get the package name associated to it.

    But why do you need the package name as is doenot count to the qualified namespace?

    Other thing What I understand is

    you are calling a common service(moveA2AFiles) from 3 PKG’s.
    and where do set the said service name ( I Mean foldername.subfoldername:serviceName).

    IMO, have a variable as input to this common service.
    whenever you call the common service send the fully qualified name (even the attached package name ) as this input.

    In the common service, if you have errors copy the variable contents to the body of the email that u send out.

    HTH
    PRY


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 5.  RE: Generating Error mail along with the package name

    Posted 06/30/06 01:31 PM

    Hi,
    As in webMethods package name will not come under fully qualified name we have to hard cord the package name if required. As it also not possible create one folder under the package with same name and in that package create the package structure which you want to wish… and copy the service name…

    Regards,
    Haribabu


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 6.  RE: Generating Error mail along with the package name

    Posted 06/30/06 03:37 PM

    If you can modify the package structure then it would be good idea to have the same name for the package and the top level folder in it.
    By this when you make a copy of the service it will give you the foldername.subfoldername:serviceName (foldername is same as package name). But if you call the common service from 3 pkg’s u still need to pass the varaible (for representing the fully qualified name) as mentioned earlier.

    but incase you don’t want to change the package structure then go with my previous post.

    HTH
    PRY


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: Generating Error mail along with the package name

    Posted 06/30/06 04:59 PM

    Shaik,

    When ever you create a new custom packages its best practice to keep the folder interface name same as package name this will accomplish your requirement.This is the standard practice.

    PurchaseOrder(packagename)
    —PurchaseOrder(higher folder name same as package name)
    ----maps (sub folder name)
    finally PurchaseOrder.maps…

    HTH,
    RMG


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Generating Error mail along with the package name

    Posted 06/30/06 05:14 PM

    Well, naming the top-level folder, the same as the package name is one style for naming folders, but I would not call it a best practice or standard practice.

    If, however, you are using this style of naming your folders, then you don’t need to do anything special to obtain the package name.

    The real question is “why do you think that you need the package name?”. If there’s no good reason, then this whole thread is moot.

    Mark


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 9.  RE: Generating Error mail along with the package name

    Posted 06/30/06 05:33 PM

    That’s was one of my doubt’s expressed earlier.

    PRY


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 10.  RE: Generating Error mail along with the package name

    Posted 06/30/06 05:39 PM

    I’d call it a “very common practice.” I’ve seen it virtually in every project I’ve worked. Granted, I’m the reason the practice is followed in some of the cases :slight_smile: but the practice seems to me to be so prevalent that it’s more or less a de facto standard.

    I think there was a thread on this some time back but it might be worth reviewing the subject again. When would one not want to use this technique? My position is that this technique should be followed always but perhaps I’m being myopic.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 11.  RE: Generating Error mail along with the package name

    Posted 06/30/06 10:23 PM

    AFAIK, this naming technique certainly simplifies matters in tracking down services and their dependencies in major projects (containing several packages). The only drawback would be a longer qualified name for a service (due to the highest folder). Think we can live with that. :slight_smile:


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 12.  RE: Generating Error mail along with the package name

    Posted 07/03/06 04:54 PM

    Hi All

    I think what Sheik wants is a flowservice that can let him figure out the current running flowservice, so instead of hard coding the flowservice name in each service, he can just call this service and map the output to email body.

    I have a similar issue , where I have a common error handling service for a lot of services. I need to figure out the last called flowservice (before the error handler) from this error handling service with out passing the service name to it. Any ideas or am I asking for too much :smiley:

    best regards
    Rajoy


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 13.  RE: Generating Error mail along with the package name

    Posted 07/03/06 06:39 PM

    Basically you can use wM JAVA API to get current service name,see this old thread.

    [URL=“wmusers.com”]wmusers.com

    HTH,
    RMG


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 14.  RE: Generating Error mail along with the package name

    Posted 07/04/06 09:06 AM